File: Mathlib/ModelTheory/ElementarySubstructures.lean

full_name: FirstOrder.Language.Substructure.IsElementary
code: /-- A substructure is elementary when every formula applied to a tuple in the substructure
  agrees with its value in the overall structure. -/
def Substructure.IsElementary (S : L.Substructure M) : Prop 
goal: Prop

full_name: FirstOrder.Language.ElementarySubstructure.toSubstructure
code: /-- An elementary substructure is one in which every formula applied to a tuple in the substructure
  agrees with its value in the overall structure. -/
structure ElementarySubstructure where
  toSubstructure : L.Substructure M
  isElementary' : toSubstructure.IsElementary
goal: L.Substructure M

full_name: FirstOrder.Language.ElementarySubstructure.isElementary'
code: /-- An elementary substructure is one in which every formula applied to a tuple in the substructure
  agrees with its value in the overall structure. -/
structure ElementarySubstructure where
  toSubstructure : L.Substructure M
  isElementary' : toSubstructure.IsElementary
goal: (↑self).IsElementary

full_name: FirstOrder.Language.ElementarySubstructure
code: /-- An elementary substructure is one in which every formula applied to a tuple in the substructure
  agrees with its value in the overall structure. -/
structure ElementarySubstructure where
  toSubstructure : L.Substructure M
  isElementary' : toSubstructure.IsElementary
goal: Type u_1

full_name: FirstOrder.Language.ElementarySubstructure.instCoe
code: instance instCoe : Coe (L.ElementarySubstructure M) (L.Substructure M) 
goal: Coe (L.ElementarySubstructure M) (L.Substructure M)

full_name: FirstOrder.Language.ElementarySubstructure.instSetLike
code: instance instSetLike : SetLike (L.ElementarySubstructure M) M 
goal: SetLike (L.ElementarySubstructure M) M

full_name: FirstOrder.Language.ElementarySubstructure.inducedStructure
code: instance inducedStructure (S : L.ElementarySubstructure M) : L.Structure S 
goal: L.Structure ↥S

full_name: FirstOrder.Language.ElementarySubstructure.isElementary
code: @[simp]
theorem isElementary (S : L.ElementarySubstructure M) : (S : L.Substructure M).IsElementary 
goal: (↑S).IsElementary

full_name: FirstOrder.Language.ElementarySubstructure.subtype
code: /-- The natural embedding of an `L.Substructure` of `M` into `M`. -/
def subtype (S : L.ElementarySubstructure M) : S ↪ₑ[L] M 
goal: ↥S ↪ₑ[L] M

full_name: FirstOrder.Language.ElementarySubstructure.coeSubtype
code: @[simp]
theorem coeSubtype {S : L.ElementarySubstructure M} : ⇑S.subtype = ((↑) : S → M) 
goal: ⇑S.subtype = Subtype.val

full_name: FirstOrder.Language.ElementarySubstructure.instTop
code: /-- The substructure `M` of the structure `M` is elementary. -/
instance instTop : Top (L.ElementarySubstructure M) 
goal: Top (L.ElementarySubstructure M)

full_name: FirstOrder.Language.ElementarySubstructure.instInhabited
code: instance instInhabited : Inhabited (L.ElementarySubstructure M) 
goal: Inhabited (L.ElementarySubstructure M)

full_name: FirstOrder.Language.ElementarySubstructure.mem_top
code: @[simp]
theorem mem_top (x : M) : x ∈ (⊤ : L.ElementarySubstructure M) 
goal: x ∈ ⊤

full_name: FirstOrder.Language.ElementarySubstructure.coe_top
code: @[simp]
theorem coe_top : ((⊤ : L.ElementarySubstructure M) : Set M) = Set.univ 
goal: ↑⊤ = Set.univ

full_name: FirstOrder.Language.ElementarySubstructure.realize_sentence
code: @[simp]
theorem realize_sentence (S : L.ElementarySubstructure M) (φ : L.Sentence) : S ⊨ φ ↔ M ⊨ φ 
goal: ↥S ⊨ φ ↔ M ⊨ φ

full_name: FirstOrder.Language.ElementarySubstructure.theory_model_iff
code: @[simp]
theorem theory_model_iff (S : L.ElementarySubstructure M) (T : L.Theory) : S ⊨ T ↔ M ⊨ T 
goal: ↥S ⊨ T ↔ M ⊨ T

full_name: FirstOrder.Language.ElementarySubstructure.theory_model
code: instance theory_model {T : L.Theory} [h : M ⊨ T] {S : L.ElementarySubstructure M} : S ⊨ T 
goal: ↥S ⊨ T

full_name: FirstOrder.Language.ElementarySubstructure.instNonempty
code: instance instNonempty [Nonempty M] {S : L.ElementarySubstructure M} : Nonempty S 
goal: Nonempty ↥S

full_name: FirstOrder.Language.ElementarySubstructure.elementarilyEquivalent
code: theorem elementarilyEquivalent (S : L.ElementarySubstructure M) : S ≅[L] M 
goal: ↥S ≅[L] M

full_name: FirstOrder.Language.Substructure.isElementary_of_exists
code: /-- The Tarski-Vaught test for elementarity of a substructure. -/
theorem isElementary_of_exists (S : L.Substructure M)
    (htv :
      ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → S) (a : M),
        φ.Realize default (Fin.snoc ((↑) ∘ x) a : _ → M) →
          ∃ b : S, φ.Realize default (Fin.snoc ((↑) ∘ x) b : _ → M)) :
    S.IsElementary 
goal: S.IsElementary

full_name: FirstOrder.Language.Substructure.toElementarySubstructure_toSubstructure
code: /-- Bundles a substructure satisfying the Tarski-Vaught test as an elementary substructure. -/
@[simps]
def toElementarySubstructure (S : L.Substructure M)
    (htv :
      ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → S) (a : M),
        φ.Realize default (Fin.snoc ((↑) ∘ x) a : _ → M) →
          ∃ b : S, φ.Realize default (Fin.snoc ((↑) ∘ x) b : _ → M)) :
    L.ElementarySubstructure M 
goal: ↑(S.toElementarySubstructure htv) = S

full_name: FirstOrder.Language.Substructure.toElementarySubstructure
code: /-- Bundles a substructure satisfying the Tarski-Vaught test as an elementary substructure. -/
@[simps]
def toElementarySubstructure (S : L.Substructure M)
    (htv :
      ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → S) (a : M),
        φ.Realize default (Fin.snoc ((↑) ∘ x) a : _ → M) →
          ∃ b : S, φ.Realize default (Fin.snoc ((↑) ∘ x) b : _ → M)) :
    L.ElementarySubstructure M 
goal: L.ElementarySubstructure M