@@ -902,6 +902,47 @@ theorem realize_iExsUnique [Finite γ] {φ : L.Formula (α ⊕ γ)} {v : α →
902902
903903end BoundedFormula
904904
905+ namespace Formula
906+
907+ @[simp]
908+ theorem realize_exClosure [DecidableEq α] (φ : L.Formula α) :
909+ φ.exClosure.Realize M ↔
910+ ∃ v : φ.freeVarFinset → M, Formula.Realize (φ.restrictFreeVar id) v := by
911+ simp [Sentence.Realize, Formula.exClosure, Formula.realize_iExs]
912+
913+ theorem realize_exClosure_of_realize_equivSentence [DecidableEq α] [L[[α]].Structure M]
914+ [(L.lhomWithConstants α).IsExpansionOn M] {φ : L.Formula α}
915+ (h : (Formula.equivSentence φ).Realize M) : φ.exClosure.Realize M := by
916+ rw [Formula.realize_exClosure]
917+ exists fun a => (L.con (a : α) : M)
918+ apply (BoundedFormula.realize_restrictFreeVar'
919+ (s := (φ.freeVarFinset : Set α)) Set.Subset.rfl
920+ (v := fun a => (L.con a : M))).2
921+ exact (φ.realize_equivSentence M).1 h
922+
923+ theorem exists_realize_equivSentence_of_realize_exClosure [DecidableEq α] [Nonempty M]
924+ {φ : L.Formula α} (h : φ.exClosure.Realize (M := M)) :
925+ ∃ v : α → M,
926+ @Sentence.Realize _ M (@Language.withConstantsStructure L M _ α (constantsOn.structure v))
927+ (Formula.equivSentence φ) := by
928+ classical
929+ obtain ⟨v, hv⟩ := (φ.realize_exClosure (M := M)).1 h
930+ let v' : α → M := fun a =>
931+ if hmem : a ∈ φ.freeVarFinset then v ⟨a, hmem⟩ else Classical.choice inferInstance
932+ exists v'
933+ have hvEq : v' ∘ (↑) = v := by aesop
934+ have hv' : Formula.Realize (φ.restrictFreeVar id) (v' ∘ (↑)) := by
935+ simp_all only [realize_exClosure]
936+ have hφ : φ.Realize v' := by
937+ apply
938+ (BoundedFormula.realize_restrictFreeVar' (s := (φ.freeVarFinset : Set α))
939+ Set.Subset.rfl).1
940+ simpa [Set.inclusion_eq_id] using hv'
941+ exact
942+ (Formula.realize_equivSentence_symm M (Formula.equivSentence φ) v').1 (by simpa)
943+
944+ end Formula
945+
905946namespace StrongHomClass
906947
907948variable {F : Type *} [EquivLike F M N] [StrongHomClass L F M N] (g : F)
0 commit comments