File: Mathlib/ModelTheory/Types.lean

full_name: FirstOrder.Language.Theory.CompleteType.toTheory
code: /-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal
goal: L[[α]].Theory

full_name: FirstOrder.Language.Theory.CompleteType.subset'
code: /-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal
goal: (L.lhomWithConstants α).onTheory T ⊆ ↑self

full_name: FirstOrder.Language.Theory.CompleteType
code: /-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal
goal: Type (max (max u v) w)

full_name: FirstOrder.Language.Theory.CompleteType.isMaximal'
code: /-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal
goal: (↑self).IsMaximal

full_name: FirstOrder.Language.Theory.CompleteType.Sentence.instSetLike
code: instance Sentence.instSetLike : SetLike (T.CompleteType α) (L[[α]].Sentence) 
goal: SetLike (T.CompleteType α) L[[α]].Sentence

full_name: FirstOrder.Language.Theory.CompleteType.isMaximal
code: theorem isMaximal (p : T.CompleteType α) : IsMaximal (p : L[[α]].Theory) 
goal: FirstOrder.Language.Theory.IsMaximal ↑p

full_name: FirstOrder.Language.Theory.CompleteType.subset
code: theorem subset (p : T.CompleteType α) : (L.lhomWithConstants α).onTheory T ⊆ (p : L[[α]].Theory) 
goal: (L.lhomWithConstants α).onTheory T ⊆ ↑p

full_name: FirstOrder.Language.Theory.CompleteType.mem_or_not_mem
code: theorem mem_or_not_mem (p : T.CompleteType α) (φ : L[[α]].Sentence) : φ ∈ p ∨ φ.not ∈ p 
goal: φ ∈ p ∨ FirstOrder.Language.Formula.not φ ∈ p

full_name: FirstOrder.Language.Theory.CompleteType.mem_of_models
code: theorem mem_of_models (p : T.CompleteType α) {φ : L[[α]].Sentence}
    (h : (L.lhomWithConstants α).onTheory T ⊨ᵇ φ) : φ ∈ p 
goal: φ ∈ p

full_name: FirstOrder.Language.Theory.CompleteType.not_mem_iff
code: theorem not_mem_iff (p : T.CompleteType α) (φ : L[[α]].Sentence) : φ.not ∈ p ↔ ¬φ ∈ p 
goal: FirstOrder.Language.Formula.not φ ∈ p ↔ φ ∉ p

full_name: FirstOrder.Language.Theory.CompleteType.compl_setOf_mem
code: @[simp]
theorem compl_setOf_mem {φ : L[[α]].Sentence} :
    { p : T.CompleteType α | φ ∈ p }ᶜ = { p : T.CompleteType α | φ.not ∈ p } 
goal: {p | φ ∈ p}ᶜ = {p | FirstOrder.Language.Formula.not φ ∈ p}

full_name: FirstOrder.Language.Theory.CompleteType.setOf_subset_eq_empty_iff
code: theorem setOf_subset_eq_empty_iff (S : L[[α]].Theory) :
    { p : T.CompleteType α | S ⊆ ↑p } = ∅ ↔
      ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable 
goal: {p | S ⊆ ↑p} = ∅ ↔ ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable

full_name: FirstOrder.Language.Theory.CompleteType.setOf_mem_eq_univ_iff
code: theorem setOf_mem_eq_univ_iff (φ : L[[α]].Sentence) :
    { p : T.CompleteType α | φ ∈ p } = Set.univ ↔ (L.lhomWithConstants α).onTheory T ⊨ᵇ φ 
goal: {p | φ ∈ p} = Set.univ ↔ (L.lhomWithConstants α).onTheory T ⊨ᵇ φ

full_name: FirstOrder.Language.Theory.CompleteType.setOf_subset_eq_univ_iff
code: theorem setOf_subset_eq_univ_iff (S : L[[α]].Theory) :
    { p : T.CompleteType α | S ⊆ ↑p } = Set.univ ↔
      ∀ φ, φ ∈ S → (L.lhomWithConstants α).onTheory T ⊨ᵇ φ 
goal: {p | S ⊆ ↑p} = Set.univ ↔ ∀ φ ∈ S, (L.lhomWithConstants α).onTheory T ⊨ᵇ φ

full_name: FirstOrder.Language.Theory.CompleteType.nonempty_iff
code: theorem nonempty_iff : Nonempty (T.CompleteType α) ↔ T.IsSatisfiable 
goal: Nonempty (T.CompleteType α) ↔ T.IsSatisfiable

full_name: FirstOrder.Language.Theory.CompleteType.instNonempty
code: instance instNonempty : Nonempty (CompleteType (∅ : L.Theory) α) 
goal: Nonempty (∅.CompleteType α)

full_name: FirstOrder.Language.Theory.CompleteType.iInter_setOf_subset
code: theorem iInter_setOf_subset {ι : Type*} (S : ι → L[[α]].Theory) :
    ⋂ i : ι, { p : T.CompleteType α | S i ⊆ p } =
      { p : T.CompleteType α | ⋃ i : ι, S i ⊆ p } 
goal: ⋂ i, {p | S i ⊆ ↑p} = {p | ⋃ i, S i ⊆ ↑p}

full_name: FirstOrder.Language.Theory.CompleteType.toList_foldr_inf_mem
code: theorem toList_foldr_inf_mem {p : T.CompleteType α} {t : Finset (L[[α]]).Sentence} :
    t.toList.foldr (· ⊓ ·) ⊤ ∈ p ↔ (t : L[[α]].Theory) ⊆ ↑p 
goal: List.foldr (fun x x_1 => x ⊓ x_1) ⊤ t.toList ∈ p ↔ ↑t ⊆ ↑p

full_name: FirstOrder.Language.Theory.typeOf
code: /-- The set of all formulas true at a tuple in a structure forms a complete type. -/
def typeOf (v : α → M) : T.CompleteType α 
goal: T.CompleteType α

full_name: FirstOrder.Language.Theory.CompleteType.mem_typeOf
code: @[simp]
theorem mem_typeOf {φ : L[[α]].Sentence} :
    φ ∈ T.typeOf v ↔ (Formula.equivSentence.symm φ).Realize v 
goal: φ ∈ T.typeOf v ↔ (FirstOrder.Language.Formula.equivSentence.symm φ).Realize v

full_name: FirstOrder.Language.Theory.CompleteType.formula_mem_typeOf
code: theorem formula_mem_typeOf {φ : L.Formula α} :
    Formula.equivSentence φ ∈ T.typeOf v ↔ φ.Realize v 
goal: FirstOrder.Language.Formula.equivSentence φ ∈ T.typeOf v ↔ φ.Realize v

full_name: FirstOrder.Language.Theory.realizedTypes
code: /-- A complete type `p` is realized in a particular structure when there is some
  tuple `v` whose type is `p`. -/
@[simp]
def realizedTypes (α : Type w) : Set (T.CompleteType α) 
goal: Set (T.CompleteType α)

full_name: FirstOrder.Language.Theory.exists_modelType_is_realized_in
code: theorem exists_modelType_is_realized_in (p : T.CompleteType α) :
    ∃ M : Theory.ModelType.{u, v, max u v w} T, p ∈ T.realizedTypes M α 
goal: ∃ M, p ∈ T.realizedTypes (↑M) α