File: Mathlib/ModelTheory/Semantics.lean

full_name: FirstOrder.Language.Term.realize
code: /-- A term `t` with variables indexed by `α` can be evaluated by giving a value to each variable. -/
def realize (v : α → M) : ∀ _t : L.Term α, M
  
goal: M

full_name: FirstOrder.Language.Term.realize_var
code: @[simp]
theorem realize_var (v : α → M) (k) : realize v (var k : L.Term α) = v k 
goal: FirstOrder.Language.Term.realize v (FirstOrder.Language.var k) = v k

full_name: FirstOrder.Language.Term.realize_func
code: @[simp]
theorem realize_func (v : α → M) {n} (f : L.Functions n) (ts) :
    realize v (func f ts : L.Term α) = funMap f fun i => (ts i).realize v 
goal: FirstOrder.Language.Term.realize v (FirstOrder.Language.func f ts) =
  FirstOrder.Language.Structure.funMap f fun i => FirstOrder.Language.Term.realize v (ts i)

full_name: FirstOrder.Language.Term.realize_relabel
code: @[simp]
theorem realize_relabel {t : L.Term α} {g : α → β} {v : β → M} :
    (t.relabel g).realize v = t.realize (v ∘ g) 
goal: FirstOrder.Language.Term.realize v (FirstOrder.Language.Term.relabel g t) = FirstOrder.Language.Term.realize (v ∘ g) t

full_name: FirstOrder.Language.Term.realize_liftAt
code: @[simp]
theorem realize_liftAt {n n' m : ℕ} {t : L.Term (α ⊕ (Fin n))} {v : α ⊕ (Fin (n + n')) → M} :
    (t.liftAt n' m).realize v =
      t.realize (v ∘ Sum.map id fun i : Fin _ =>
        if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') 
goal: FirstOrder.Language.Term.realize v (FirstOrder.Language.Term.liftAt n' m t) =
  FirstOrder.Language.Term.realize (v ∘ Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else i.addNat n') t

full_name: FirstOrder.Language.Term.realize_constants
code: @[simp]
theorem realize_constants {c : L.Constants} {v : α → M} : c.term.realize v = c 
goal: FirstOrder.Language.Term.realize v c.term = ↑c

full_name: FirstOrder.Language.Term.realize_functions_apply₁
code: @[simp]
theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term α} {v : α → M} :
    (f.apply₁ t).realize v = funMap f ![t.realize v] 
goal: FirstOrder.Language.Term.realize v (f.apply₁ t) =
  FirstOrder.Language.Structure.funMap f ![FirstOrder.Language.Term.realize v t]

full_name: FirstOrder.Language.Term.realize_functions_apply₂
code: @[simp]
theorem realize_functions_apply₂ {f : L.Functions 2} {t₁ t₂ : L.Term α} {v : α → M} :
    (f.apply₂ t₁ t₂).realize v = funMap f ![t₁.realize v, t₂.realize v] 
goal: FirstOrder.Language.Term.realize v (f.apply₂ t₁ t₂) =
  FirstOrder.Language.Structure.funMap f ![FirstOrder.Language.Term.realize v t₁, FirstOrder.Language.Term.realize v t₂]

full_name: FirstOrder.Language.Term.realize_con
code: theorem realize_con {A : Set M} {a : A} {v : α → M} : (L.con a).term.realize v = a 
goal: FirstOrder.Language.Term.realize v (L.con a).term = ↑a

full_name: FirstOrder.Language.Term.realize_subst
code: @[simp]
theorem realize_subst {t : L.Term α} {tf : α → L.Term β} {v : β → M} :
    (t.subst tf).realize v = t.realize fun a => (tf a).realize v 
goal: FirstOrder.Language.Term.realize v (t.subst tf) =
  FirstOrder.Language.Term.realize (fun a => FirstOrder.Language.Term.realize v (tf a)) t

full_name: FirstOrder.Language.Term.realize_restrictVar
code: @[simp]
theorem realize_restrictVar [DecidableEq α] {t : L.Term α} {s : Set α} (h : ↑t.varFinset ⊆ s)
    {v : α → M} : (t.restrictVar (Set.inclusion h)).realize (v ∘ (↑)) = t.realize v 
goal: FirstOrder.Language.Term.realize (v ∘ Subtype.val) (t.restrictVar (Set.inclusion h)) =
  FirstOrder.Language.Term.realize v t

full_name: FirstOrder.Language.Term.realize_restrictVarLeft
code: @[simp]
theorem realize_restrictVarLeft [DecidableEq α] {γ : Type*} {t : L.Term (α ⊕ γ)} {s : Set α}
    (h : ↑t.varFinsetLeft ⊆ s) {v : α → M} {xs : γ → M} :
    (t.restrictVarLeft (Set.inclusion h)).realize (Sum.elim (v ∘ (↑)) xs) =
      t.realize (Sum.elim v xs) 
goal: FirstOrder.Language.Term.realize (Sum.elim (v ∘ Subtype.val) xs) (t.restrictVarLeft (Set.inclusion h)) =
  FirstOrder.Language.Term.realize (Sum.elim v xs) t

full_name: FirstOrder.Language.Term.realize_constantsToVars
code: @[simp]
theorem realize_constantsToVars [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
    {t : L[[α]].Term β} {v : β → M} :
    t.constantsToVars.realize (Sum.elim (fun a => ↑(L.con a)) v) = t.realize v 
goal: FirstOrder.Language.Term.realize (Sum.elim (fun a => ↑(L.con a)) v) t.constantsToVars =
  FirstOrder.Language.Term.realize v t

full_name: FirstOrder.Language.Term.realize_varsToConstants
code: @[simp]
theorem realize_varsToConstants [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
    {t : L.Term (α ⊕ β)} {v : β → M} :
    t.varsToConstants.realize v = t.realize (Sum.elim (fun a => ↑(L.con a)) v) 
goal: FirstOrder.Language.Term.realize v t.varsToConstants =
  FirstOrder.Language.Term.realize (Sum.elim (fun a => ↑(L.con a)) v) t

full_name: FirstOrder.Language.Term.realize_constantsVarsEquivLeft
code: theorem realize_constantsVarsEquivLeft [L[[α]].Structure M]
    [(lhomWithConstants L α).IsExpansionOn M] {n} {t : L[[α]].Term (β ⊕ (Fin n))} {v : β → M}
    {xs : Fin n → M} :
    (constantsVarsEquivLeft t).realize (Sum.elim (Sum.elim (fun a => ↑(L.con a)) v) xs) =
      t.realize (Sum.elim v xs) 
goal: FirstOrder.Language.Term.realize (Sum.elim (Sum.elim (fun a => ↑(L.con a)) v) xs)
    (FirstOrder.Language.Term.constantsVarsEquivLeft t) =
  FirstOrder.Language.Term.realize (Sum.elim v xs) t

full_name: FirstOrder.Language.LHom.realize_onTerm
code: @[simp]
theorem realize_onTerm [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] (t : L.Term α)
    (v : α → M) : (φ.onTerm t).realize v = t.realize v 
goal: FirstOrder.Language.Term.realize v (φ.onTerm t) = FirstOrder.Language.Term.realize v t

full_name: FirstOrder.Language.Hom.realize_term
code: @[simp]
theorem Hom.realize_term (g : M →[L] N) {t : L.Term α} {v : α → M} :
    t.realize (g ∘ v) = g (t.realize v) 
goal: FirstOrder.Language.Term.realize (⇑g ∘ v) t = g (FirstOrder.Language.Term.realize v t)

full_name: FirstOrder.Language.Embedding.realize_term
code: @[simp]
theorem Embedding.realize_term {v : α → M} (t : L.Term α) (g : M ↪[L] N) :
    t.realize (g ∘ v) = g (t.realize v) 
goal: FirstOrder.Language.Term.realize (⇑g ∘ v) t = g (FirstOrder.Language.Term.realize v t)

full_name: FirstOrder.Language.Equiv.realize_term
code: @[simp]
theorem Equiv.realize_term {v : α → M} (t : L.Term α) (g : M ≃[L] N) :
    t.realize (g ∘ v) = g (t.realize v) 
goal: FirstOrder.Language.Term.realize (⇑g ∘ v) t = g (FirstOrder.Language.Term.realize v t)

full_name: FirstOrder.Language.BoundedFormula.Realize
code: /-- A bounded formula can be evaluated as true or false by giving values to each free variable. -/
def Realize : ∀ {l} (_f : L.BoundedFormula α l) (_v : α → M) (_xs : Fin l → M), Prop
  
goal: Prop

full_name: FirstOrder.Language.BoundedFormula.realize_bot
code: @[simp]
theorem realize_bot : (⊥ : L.BoundedFormula α l).Realize v xs ↔ False 
goal: ⊥.Realize v xs ↔ False

full_name: FirstOrder.Language.BoundedFormula.realize_not
code: @[simp]
theorem realize_not : φ.not.Realize v xs ↔ ¬φ.Realize v xs 
goal: φ.not.Realize v xs ↔ ¬φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_bdEqual
code: @[simp]
theorem realize_bdEqual (t₁ t₂ : L.Term (α ⊕ (Fin l))) :
    (t₁.bdEqual t₂).Realize v xs ↔ t₁.realize (Sum.elim v xs) = t₂.realize (Sum.elim v xs) 
goal: (t₁.bdEqual t₂).Realize v xs ↔
  FirstOrder.Language.Term.realize (Sum.elim v xs) t₁ = FirstOrder.Language.Term.realize (Sum.elim v xs) t₂

full_name: FirstOrder.Language.BoundedFormula.realize_top
code: @[simp]
theorem realize_top : (⊤ : L.BoundedFormula α l).Realize v xs ↔ True 
goal: ⊤.Realize v xs ↔ True

full_name: FirstOrder.Language.BoundedFormula.realize_inf
code: @[simp]
theorem realize_inf : (φ ⊓ ψ).Realize v xs ↔ φ.Realize v xs ∧ ψ.Realize v xs 
goal: (φ ⊓ ψ).Realize v xs ↔ φ.Realize v xs ∧ ψ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_foldr_inf
code: @[simp]
theorem realize_foldr_inf (l : List (L.BoundedFormula α n)) (v : α → M) (xs : Fin n → M) :
    (l.foldr (· ⊓ ·) ⊤).Realize v xs ↔ ∀ φ ∈ l, BoundedFormula.Realize φ v xs 
goal: (List.foldr (fun x x_1 => x ⊓ x_1) ⊤ l).Realize v xs ↔ ∀ φ ∈ l, φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_imp
code: @[simp]
theorem realize_imp : (φ.imp ψ).Realize v xs ↔ φ.Realize v xs → ψ.Realize v xs 
goal: (φ.imp ψ).Realize v xs ↔ φ.Realize v xs → ψ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_rel
code: @[simp]
theorem realize_rel {k : ℕ} {R : L.Relations k} {ts : Fin k → L.Term _} :
    (R.boundedFormula ts).Realize v xs ↔ RelMap R fun i => (ts i).realize (Sum.elim v xs) 
goal: (R.boundedFormula ts).Realize v xs ↔
  FirstOrder.Language.Structure.RelMap R fun i => FirstOrder.Language.Term.realize (Sum.elim v xs) (ts i)

full_name: FirstOrder.Language.BoundedFormula.realize_rel₁
code: @[simp]
theorem realize_rel₁ {R : L.Relations 1} {t : L.Term _} :
    (R.boundedFormula₁ t).Realize v xs ↔ RelMap R ![t.realize (Sum.elim v xs)] 
goal: (R.boundedFormula₁ t).Realize v xs ↔
  FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize (Sum.elim v xs) t]

full_name: FirstOrder.Language.BoundedFormula.realize_rel₂
code: @[simp]
theorem realize_rel₂ {R : L.Relations 2} {t₁ t₂ : L.Term _} :
    (R.boundedFormula₂ t₁ t₂).Realize v xs ↔
      RelMap R ![t₁.realize (Sum.elim v xs), t₂.realize (Sum.elim v xs)] 
goal: (R.boundedFormula₂ t₁ t₂).Realize v xs ↔
  FirstOrder.Language.Structure.RelMap R
    ![FirstOrder.Language.Term.realize (Sum.elim v xs) t₁, FirstOrder.Language.Term.realize (Sum.elim v xs) t₂]

full_name: FirstOrder.Language.BoundedFormula.realize_sup
code: @[simp]
theorem realize_sup : (φ ⊔ ψ).Realize v xs ↔ φ.Realize v xs ∨ ψ.Realize v xs 
goal: (φ ⊔ ψ).Realize v xs ↔ φ.Realize v xs ∨ ψ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_foldr_sup
code: @[simp]
theorem realize_foldr_sup (l : List (L.BoundedFormula α n)) (v : α → M) (xs : Fin n → M) :
    (l.foldr (· ⊔ ·) ⊥).Realize v xs ↔ ∃ φ ∈ l, BoundedFormula.Realize φ v xs 
goal: (List.foldr (fun x x_1 => x ⊔ x_1) ⊥ l).Realize v xs ↔ ∃ φ ∈ l, φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_all
code: @[simp]
theorem realize_all : (all θ).Realize v xs ↔ ∀ a : M, θ.Realize v (Fin.snoc xs a) 
goal: θ.all.Realize v xs ↔ ∀ (a : M), θ.Realize v (Fin.snoc xs a)

full_name: FirstOrder.Language.BoundedFormula.realize_ex
code: @[simp]
theorem realize_ex : θ.ex.Realize v xs ↔ ∃ a : M, θ.Realize v (Fin.snoc xs a) 
goal: θ.ex.Realize v xs ↔ ∃ a, θ.Realize v (Fin.snoc xs a)

full_name: FirstOrder.Language.BoundedFormula.realize_iff
code: @[simp]
theorem realize_iff : (φ.iff ψ).Realize v xs ↔ (φ.Realize v xs ↔ ψ.Realize v xs) 
goal: (φ.iff ψ).Realize v xs ↔ (φ.Realize v xs ↔ ψ.Realize v xs)

full_name: FirstOrder.Language.BoundedFormula.realize_castLE_of_eq
code: theorem realize_castLE_of_eq {m n : ℕ} (h : m = n) {h' : m ≤ n} {φ : L.BoundedFormula α m}
    {v : α → M} {xs : Fin n → M} : (φ.castLE h').Realize v xs ↔ φ.Realize v (xs ∘ cast h) 
goal: (FirstOrder.Language.BoundedFormula.castLE h' φ).Realize v xs ↔ φ.Realize v (xs ∘ Fin.cast h)

full_name: FirstOrder.Language.BoundedFormula.realize_mapTermRel_id
code: theorem realize_mapTermRel_id [L'.Structure M]
    {ft : ∀ n, L.Term (α ⊕ (Fin n)) → L'.Term (β ⊕ (Fin n))}
    {fr : ∀ n, L.Relations n → L'.Relations n} {n} {φ : L.BoundedFormula α n} {v : α → M}
    {v' : β → M} {xs : Fin n → M}
    (h1 :
      ∀ (n) (t : L.Term (α ⊕ (Fin n))) (xs : Fin n → M),
        (ft n t).realize (Sum.elim v' xs) = t.realize (Sum.elim v xs))
    (h2 : ∀ (n) (R : L.Relations n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x) :
    (φ.mapTermRel ft fr fun _ => id).Realize v' xs ↔ φ.Realize v xs 
goal: (FirstOrder.Language.BoundedFormula.mapTermRel ft fr (fun x => id) φ).Realize v' xs ↔ φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_mapTermRel_add_castLe
code: theorem realize_mapTermRel_add_castLe [L'.Structure M] {k : ℕ}
    {ft : ∀ n, L.Term (α ⊕ (Fin n)) → L'.Term (β ⊕ (Fin (k + n)))}
    {fr : ∀ n, L.Relations n → L'.Relations n} {n} {φ : L.BoundedFormula α n}
    (v : ∀ {n}, (Fin (k + n) → M) → α → M) {v' : β → M} (xs : Fin (k + n) → M)
    (h1 :
      ∀ (n) (t : L.Term (α ⊕ (Fin n))) (xs' : Fin (k + n) → M),
        (ft n t).realize (Sum.elim v' xs') = t.realize (Sum.elim (v xs') (xs' ∘ Fin.natAdd _)))
    (h2 : ∀ (n) (R : L.Relations n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x)
    (hv : ∀ (n) (xs : Fin (k + n) → M) (x : M), @v (n + 1) (snoc xs x : Fin _ → M) = v xs) :
    (φ.mapTermRel ft fr fun n => castLE (add_assoc _ _ _).symm.le).Realize v' xs ↔
      φ.Realize (v xs) (xs ∘ Fin.natAdd _) 
goal: (FirstOrder.Language.BoundedFormula.mapTermRel ft fr (fun n => FirstOrder.Language.BoundedFormula.castLE ⋯) φ).Realize
    v' xs ↔
  φ.Realize (v xs) (xs ∘ Fin.natAdd k)

full_name: FirstOrder.Language.BoundedFormula.realize_relabel
code: @[simp]
theorem realize_relabel {m n : ℕ} {φ : L.BoundedFormula α n} {g : α → β ⊕ (Fin m)} {v : β → M}
    {xs : Fin (m + n) → M} :
    (φ.relabel g).Realize v xs ↔
      φ.Realize (Sum.elim v (xs ∘ Fin.castAdd n) ∘ g) (xs ∘ Fin.natAdd m) 
goal: (FirstOrder.Language.BoundedFormula.relabel g φ).Realize v xs ↔
  φ.Realize (Sum.elim v (xs ∘ Fin.castAdd n) ∘ g) (xs ∘ Fin.natAdd m)

full_name: FirstOrder.Language.BoundedFormula.realize_liftAt
code: theorem realize_liftAt {n n' m : ℕ} {φ : L.BoundedFormula α n} {v : α → M} {xs : Fin (n + n') → M}
    (hmn : m + n' ≤ n + 1) :
    (φ.liftAt n' m).Realize v xs ↔
      φ.Realize v (xs ∘ fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') 
goal: (FirstOrder.Language.BoundedFormula.liftAt n' m φ).Realize v xs ↔
  φ.Realize v (xs ∘ fun i => if ↑i < m then Fin.castAdd n' i else i.addNat n')

full_name: FirstOrder.Language.BoundedFormula.realize_liftAt_one
code: theorem realize_liftAt_one {n m : ℕ} {φ : L.BoundedFormula α n} {v : α → M} {xs : Fin (n + 1) → M}
    (hmn : m ≤ n) :
    (φ.liftAt 1 m).Realize v xs ↔
      φ.Realize v (xs ∘ fun i => if ↑i < m then castSucc i else i.succ) 
goal: (FirstOrder.Language.BoundedFormula.liftAt 1 m φ).Realize v xs ↔
  φ.Realize v (xs ∘ fun i => if ↑i < m then i.castSucc else i.succ)

full_name: FirstOrder.Language.BoundedFormula.realize_liftAt_one_self
code: @[simp]
theorem realize_liftAt_one_self {n : ℕ} {φ : L.BoundedFormula α n} {v : α → M}
    {xs : Fin (n + 1) → M} : (φ.liftAt 1 n).Realize v xs ↔ φ.Realize v (xs ∘ castSucc) 
goal: (FirstOrder.Language.BoundedFormula.liftAt 1 n φ).Realize v xs ↔ φ.Realize v (xs ∘ Fin.castSucc)

full_name: FirstOrder.Language.BoundedFormula.realize_subst
code: @[simp]
theorem realize_subst {φ : L.BoundedFormula α n} {tf : α → L.Term β} {v : β → M} {xs : Fin n → M} :
    (φ.subst tf).Realize v xs ↔ φ.Realize (fun a => (tf a).realize v) xs 
goal: (φ.subst tf).Realize v xs ↔ φ.Realize (fun a => FirstOrder.Language.Term.realize v (tf a)) xs

full_name: FirstOrder.Language.BoundedFormula.realize_restrictFreeVar
code: @[simp]
theorem realize_restrictFreeVar [DecidableEq α] {n : ℕ} {φ : L.BoundedFormula α n} {s : Set α}
    (h : ↑φ.freeVarFinset ⊆ s) {v : α → M} {xs : Fin n → M} :
    (φ.restrictFreeVar (Set.inclusion h)).Realize (v ∘ (↑)) xs ↔ φ.Realize v xs 
goal: (φ.restrictFreeVar (Set.inclusion h)).Realize (v ∘ Subtype.val) xs ↔ φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_constantsVarsEquiv
code: theorem realize_constantsVarsEquiv [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
    {n} {φ : L[[α]].BoundedFormula β n} {v : β → M} {xs : Fin n → M} :
    (constantsVarsEquiv φ).Realize (Sum.elim (fun a => ↑(L.con a)) v) xs ↔ φ.Realize v xs 
goal: (FirstOrder.Language.BoundedFormula.constantsVarsEquiv φ).Realize (Sum.elim (fun a => ↑(L.con a)) v) xs ↔ φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_relabelEquiv
code: @[simp]
theorem realize_relabelEquiv {g : α ≃ β} {k} {φ : L.BoundedFormula α k} {v : β → M}
    {xs : Fin k → M} : (relabelEquiv g φ).Realize v xs ↔ φ.Realize (v ∘ g) xs 
goal: ((FirstOrder.Language.BoundedFormula.relabelEquiv g) φ).Realize v xs ↔ φ.Realize (v ∘ ⇑g) xs

full_name: FirstOrder.Language.BoundedFormula.realize_all_liftAt_one_self
code: theorem realize_all_liftAt_one_self {n : ℕ} {φ : L.BoundedFormula α n} {v : α → M}
    {xs : Fin n → M} : (φ.liftAt 1 n).all.Realize v xs ↔ φ.Realize v xs 
goal: (FirstOrder.Language.BoundedFormula.liftAt 1 n φ).all.Realize v xs ↔ φ.Realize v xs

full_name: FirstOrder.Language.LHom.realize_onBoundedFormula
code: @[simp]
theorem realize_onBoundedFormula [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] {n : ℕ}
    (ψ : L.BoundedFormula α n) {v : α → M} {xs : Fin n → M} :
    (φ.onBoundedFormula ψ).Realize v xs ↔ ψ.Realize v xs 
goal: (φ.onBoundedFormula ψ).Realize v xs ↔ ψ.Realize v xs

full_name: FirstOrder.Language.Formula.Realize
code: /-- A formula can be evaluated as true or false by giving values to each free variable. -/
nonrec def Realize (φ : L.Formula α) (v : α → M) : Prop 
goal: Prop

full_name: FirstOrder.Language.Formula.realize_not
code: @[simp]
theorem realize_not : φ.not.Realize v ↔ ¬φ.Realize v 
goal: φ.not.Realize v ↔ ¬φ.Realize v

full_name: FirstOrder.Language.Formula.realize_bot
code: @[simp]
theorem realize_bot : (⊥ : L.Formula α).Realize v ↔ False 
goal: ⊥.Realize v ↔ False

full_name: FirstOrder.Language.Formula.realize_top
code: @[simp]
theorem realize_top : (⊤ : L.Formula α).Realize v ↔ True 
goal: ⊤.Realize v ↔ True

full_name: FirstOrder.Language.Formula.realize_inf
code: @[simp]
theorem realize_inf : (φ ⊓ ψ).Realize v ↔ φ.Realize v ∧ ψ.Realize v 
goal: (φ ⊓ ψ).Realize v ↔ φ.Realize v ∧ ψ.Realize v

full_name: FirstOrder.Language.Formula.realize_imp
code: @[simp]
theorem realize_imp : (φ.imp ψ).Realize v ↔ φ.Realize v → ψ.Realize v 
goal: (φ.imp ψ).Realize v ↔ φ.Realize v → ψ.Realize v

full_name: FirstOrder.Language.Formula.realize_rel
code: @[simp]
theorem realize_rel {k : ℕ} {R : L.Relations k} {ts : Fin k → L.Term α} :
    (R.formula ts).Realize v ↔ RelMap R fun i => (ts i).realize v 
goal: (R.formula ts).Realize v ↔ FirstOrder.Language.Structure.RelMap R fun i => FirstOrder.Language.Term.realize v (ts i)

full_name: FirstOrder.Language.Formula.realize_rel₁
code: @[simp]
theorem realize_rel₁ {R : L.Relations 1} {t : L.Term _} :
    (R.formula₁ t).Realize v ↔ RelMap R ![t.realize v] 
goal: (R.formula₁ t).Realize v ↔ FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize v t]

full_name: FirstOrder.Language.Formula.realize_rel₂
code: @[simp]
theorem realize_rel₂ {R : L.Relations 2} {t₁ t₂ : L.Term _} :
    (R.formula₂ t₁ t₂).Realize v ↔ RelMap R ![t₁.realize v, t₂.realize v] 
goal: (R.formula₂ t₁ t₂).Realize v ↔
  FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize v t₁, FirstOrder.Language.Term.realize v t₂]

full_name: FirstOrder.Language.Formula.realize_sup
code: @[simp]
theorem realize_sup : (φ ⊔ ψ).Realize v ↔ φ.Realize v ∨ ψ.Realize v 
goal: (φ ⊔ ψ).Realize v ↔ φ.Realize v ∨ ψ.Realize v

full_name: FirstOrder.Language.Formula.realize_iff
code: @[simp]
theorem realize_iff : (φ.iff ψ).Realize v ↔ (φ.Realize v ↔ ψ.Realize v) 
goal: (φ.iff ψ).Realize v ↔ (φ.Realize v ↔ ψ.Realize v)

full_name: FirstOrder.Language.Formula.realize_relabel
code: @[simp]
theorem realize_relabel {φ : L.Formula α} {g : α → β} {v : β → M} :
    (φ.relabel g).Realize v ↔ φ.Realize (v ∘ g) 
goal: (FirstOrder.Language.Formula.relabel g φ).Realize v ↔ φ.Realize (v ∘ g)

full_name: FirstOrder.Language.Formula.realize_relabel_sum_inr
code: theorem realize_relabel_sum_inr (φ : L.Formula (Fin n)) {v : Empty → M} {x : Fin n → M} :
    (BoundedFormula.relabel Sum.inr φ).Realize v x ↔ φ.Realize x 
goal: (FirstOrder.Language.BoundedFormula.relabel Sum.inr φ).Realize v x ↔ φ.Realize x

full_name: FirstOrder.Language.Formula.realize_equal
code: @[simp]
theorem realize_equal {t₁ t₂ : L.Term α} {x : α → M} :
    (t₁.equal t₂).Realize x ↔ t₁.realize x = t₂.realize x 
goal: (t₁.equal t₂).Realize x ↔ FirstOrder.Language.Term.realize x t₁ = FirstOrder.Language.Term.realize x t₂

full_name: FirstOrder.Language.Formula.realize_graph
code: @[simp]
theorem realize_graph {f : L.Functions n} {x : Fin n → M} {y : M} :
    (Formula.graph f).Realize (Fin.cons y x : _ → M) ↔ funMap f x = y 
goal: (FirstOrder.Language.Formula.graph f).Realize (Fin.cons y x) ↔ FirstOrder.Language.Structure.funMap f x = y

full_name: FirstOrder.Language.LHom.realize_onFormula
code: @[simp]
theorem LHom.realize_onFormula [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] (ψ : L.Formula α)
    {v : α → M} : (φ.onFormula ψ).Realize v ↔ ψ.Realize v 
goal: (φ.onFormula ψ).Realize v ↔ ψ.Realize v

full_name: FirstOrder.Language.LHom.setOf_realize_onFormula
code: @[simp]
theorem LHom.setOf_realize_onFormula [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M]
    (ψ : L.Formula α) : (setOf (φ.onFormula ψ).Realize : Set (α → M)) = setOf ψ.Realize 
goal: setOf (φ.onFormula ψ).Realize = setOf ψ.Realize

full_name: FirstOrder.Language.Sentence.Realize
code: /-- A sentence can be evaluated as true or false in a structure. -/
nonrec def Sentence.Realize (φ : L.Sentence) : Prop 
goal: Prop

full_name: FirstOrder.Language.«_aux_Mathlib_ModelTheory_Semantics___macroRules_FirstOrder_Language_term_⊨__1»
code: @[inherit_doc Sentence.Realize]
infixl:51 " ⊨ " => Sentence.Realize
goal: Lean.Macro

full_name: FirstOrder.Language._aux_Mathlib_ModelTheory_Semantics___unexpand_FirstOrder_Language_Sentence_Realize_1
code: @[inherit_doc Sentence.Realize]
infixl:51 " ⊨ " => Sentence.Realize
goal: Lean.PrettyPrinter.Unexpander

full_name: FirstOrder.Language.Sentence.realize_not
code: @[simp]
theorem Sentence.realize_not {φ : L.Sentence} : M ⊨ φ.not ↔ ¬M ⊨ φ 
goal: M ⊨ FirstOrder.Language.Formula.not φ ↔ ¬M ⊨ φ

full_name: FirstOrder.Language.Formula.realize_equivSentence_symm_con
code: @[simp]
theorem realize_equivSentence_symm_con [L[[α]].Structure M]
    [(L.lhomWithConstants α).IsExpansionOn M] (φ : L[[α]].Sentence) :
    ((equivSentence.symm φ).Realize fun a => (L.con a : M)) ↔ φ.Realize M 
goal: ((FirstOrder.Language.Formula.equivSentence.symm φ).Realize fun a => ↑(L.con a)) ↔ M ⊨ φ

full_name: FirstOrder.Language.Formula.realize_equivSentence
code: @[simp]
theorem realize_equivSentence [L[[α]].Structure M] [(L.lhomWithConstants α).IsExpansionOn M]
    (φ : L.Formula α) : (equivSentence φ).Realize M ↔ φ.Realize fun a => (L.con a : M) 
goal: M ⊨ FirstOrder.Language.Formula.equivSentence φ ↔ φ.Realize fun a => ↑(L.con a)

full_name: FirstOrder.Language.Formula.realize_equivSentence_symm
code: theorem realize_equivSentence_symm (φ : L[[α]].Sentence) (v : α → M) :
    (equivSentence.symm φ).Realize v ↔
      @Sentence.Realize _ M (@Language.withConstantsStructure L M _ α (constantsOn.structure v))
        φ 
goal: (FirstOrder.Language.Formula.equivSentence.symm φ).Realize v ↔ M ⊨ φ

full_name: FirstOrder.Language.LHom.realize_onSentence
code: @[simp]
theorem LHom.realize_onSentence [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M]
    (ψ : L.Sentence) : M ⊨ φ.onSentence ψ ↔ M ⊨ ψ 
goal: M ⊨ φ.onSentence ψ ↔ M ⊨ ψ

full_name: FirstOrder.Language.completeTheory
code: /-- The complete theory of a structure `M` is the set of all sentences `M` satisfies. -/
def completeTheory : L.Theory 
goal: L.Theory

full_name: FirstOrder.Language.ElementarilyEquivalent
code: /-- Two structures are elementarily equivalent when they satisfy the same sentences. -/
def ElementarilyEquivalent : Prop 
goal: Prop

full_name: FirstOrder.«_aux_Mathlib_ModelTheory_Semantics___macroRules_FirstOrder_term_≅[_]__1»
code: @[inherit_doc FirstOrder.Language.ElementarilyEquivalent]
scoped[FirstOrder]
  notation:25 A " ≅[" L "] " B:50 => FirstOrder.Language.ElementarilyEquivalent L A B
goal: Lean.Macro

full_name: FirstOrder._aux_Mathlib_ModelTheory_Semantics___unexpand_FirstOrder_Language_ElementarilyEquivalent_1
code: @[inherit_doc FirstOrder.Language.ElementarilyEquivalent]
scoped[FirstOrder]
  notation:25 A " ≅[" L "] " B:50 => FirstOrder.Language.ElementarilyEquivalent L A B
goal: Lean.PrettyPrinter.Unexpander

full_name: FirstOrder.Language.mem_completeTheory
code: @[simp]
theorem mem_completeTheory {φ : Sentence L} : φ ∈ L.completeTheory M ↔ M ⊨ φ 
goal: φ ∈ L.completeTheory M ↔ M ⊨ φ

full_name: FirstOrder.Language.elementarilyEquivalent_iff
code: theorem elementarilyEquivalent_iff : M ≅[L] N ↔ ∀ φ : L.Sentence, M ⊨ φ ↔ N ⊨ φ 
goal: L.ElementarilyEquivalent M N ↔ ∀ (φ : L.Sentence), M ⊨ φ ↔ N ⊨ φ

full_name: FirstOrder.Language.Theory.Model
code: /-- A model of a theory is a structure in which every sentence is realized as true. -/
class Theory.Model (T : L.Theory) : Prop where
  realize_of_mem : ∀ φ ∈ T, M ⊨ φ
goal: Prop

full_name: FirstOrder.Language.Theory.Model.realize_of_mem
code: /-- A model of a theory is a structure in which every sentence is realized as true. -/
class Theory.Model (T : L.Theory) : Prop where
  realize_of_mem : ∀ φ ∈ T, M ⊨ φ
goal: φ ∈ T → M ⊨ φ

full_name: FirstOrder.Language._aux_Mathlib_ModelTheory_Semantics___unexpand_FirstOrder_Language_Theory_Model_1
code: @[inherit_doc Theory.Model]
infixl:51 " ⊨ " => Theory.Model
goal: Lean.PrettyPrinter.Unexpander

full_name: FirstOrder.Language.«_aux_Mathlib_ModelTheory_Semantics___macroRules_FirstOrder_Language_term_⊨__1_1»
code: @[inherit_doc Theory.Model]
infixl:51 " ⊨ " => Theory.Model
goal: Lean.Macro

full_name: FirstOrder.Language.Theory.model_iff
code: @[simp default-10]
theorem Theory.model_iff : M ⊨ T ↔ ∀ φ ∈ T, M ⊨ φ 
goal: M ⊨ T ↔ ∀ φ ∈ T, M ⊨ φ

full_name: FirstOrder.Language.Theory.realize_sentence_of_mem
code: theorem Theory.realize_sentence_of_mem [M ⊨ T] {φ : L.Sentence} (h : φ ∈ T) : M ⊨ φ 
goal: M ⊨ φ

full_name: FirstOrder.Language.LHom.onTheory_model
code: @[simp]
theorem LHom.onTheory_model [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] (T : L.Theory) :
    M ⊨ φ.onTheory T ↔ M ⊨ T 
goal: M ⊨ φ.onTheory T ↔ M ⊨ T

full_name: FirstOrder.Language.model_empty
code: instance model_empty : M ⊨ (∅ : L.Theory) 
goal: M ⊨ ∅

full_name: FirstOrder.Language.Theory.Model.mono
code: theorem Model.mono {T' : L.Theory} (_h : M ⊨ T') (hs : T ⊆ T') : M ⊨ T 
goal: M ⊨ T

full_name: FirstOrder.Language.Theory.Model.union
code: theorem Model.union {T' : L.Theory} (h : M ⊨ T) (h' : M ⊨ T') : M ⊨ T ∪ T' 
goal: M ⊨ T ∪ T'

full_name: FirstOrder.Language.Theory.model_union_iff
code: @[simp]
theorem model_union_iff {T' : L.Theory} : M ⊨ T ∪ T' ↔ M ⊨ T ∧ M ⊨ T' 
goal: M ⊨ T ∪ T' ↔ M ⊨ T ∧ M ⊨ T'

full_name: FirstOrder.Language.Theory.model_singleton_iff
code: theorem model_singleton_iff {φ : L.Sentence} : M ⊨ ({φ} : L.Theory) ↔ M ⊨ φ 
goal: M ⊨ {φ} ↔ M ⊨ φ

full_name: FirstOrder.Language.Theory.model_iff_subset_completeTheory
code: theorem model_iff_subset_completeTheory : M ⊨ T ↔ T ⊆ L.completeTheory M 
goal: M ⊨ T ↔ T ⊆ L.completeTheory M

full_name: FirstOrder.Language.Theory.completeTheory.subset
code: theorem completeTheory.subset [MT : M ⊨ T] : T ⊆ L.completeTheory M 
goal: T ⊆ L.completeTheory M

full_name: FirstOrder.Language.model_completeTheory
code: instance model_completeTheory : M ⊨ L.completeTheory M 
goal: M ⊨ L.completeTheory M

full_name: FirstOrder.Language.realize_iff_of_model_completeTheory
code: theorem realize_iff_of_model_completeTheory [N ⊨ L.completeTheory M] (φ : L.Sentence) :
    N ⊨ φ ↔ M ⊨ φ 
goal: N ⊨ φ ↔ M ⊨ φ

full_name: FirstOrder.Language.BoundedFormula.realize_alls
code: @[simp]
theorem realize_alls {φ : L.BoundedFormula α n} {v : α → M} :
    φ.alls.Realize v ↔ ∀ xs : Fin n → M, φ.Realize v xs 
goal: φ.alls.Realize v ↔ ∀ (xs : Fin n → M), φ.Realize v xs

full_name: FirstOrder.Language.BoundedFormula.realize_exs
code: @[simp]
theorem realize_exs {φ : L.BoundedFormula α n} {v : α → M} :
    φ.exs.Realize v ↔ ∃ xs : Fin n → M, φ.Realize v xs 
goal: φ.exs.Realize v ↔ ∃ xs, φ.Realize v xs

full_name: FirstOrder.Language.Formula.realize_iAlls
code: @[simp]
theorem _root_.FirstOrder.Language.Formula.realize_iAlls
    [Finite γ] {f : α → β ⊕ γ}
    {φ : L.Formula α} {v : β → M} : (φ.iAlls f).Realize v ↔
      ∀ (i : γ → M), φ.Realize (fun a => Sum.elim v i (f a)) 
goal: (FirstOrder.Language.Formula.iAlls f φ).Realize v ↔ ∀ (i : γ → M), φ.Realize fun a => Sum.elim v i (f a)

full_name: FirstOrder.Language.BoundedFormula.realize_iAlls
code: @[simp]
theorem realize_iAlls [Finite γ] {f : α → β ⊕ γ}
    {φ : L.Formula α} {v : β → M} {v' : Fin 0 → M} :
    BoundedFormula.Realize (φ.iAlls f) v v' ↔
      ∀ (i : γ → M), φ.Realize (fun a => Sum.elim v i (f a)) 
goal: FirstOrder.Language.BoundedFormula.Realize (FirstOrder.Language.Formula.iAlls f φ) v v' ↔
  ∀ (i : γ → M), φ.Realize fun a => Sum.elim v i (f a)

full_name: FirstOrder.Language.Formula.realize_iExs
code: @[simp]
theorem _root_.FirstOrder.Language.Formula.realize_iExs
    [Finite γ] {f : α → β ⊕ γ}
    {φ : L.Formula α} {v : β → M} : (φ.iExs f).Realize v ↔
      ∃ (i : γ → M), φ.Realize (fun a => Sum.elim v i (f a)) 
goal: (FirstOrder.Language.Formula.iExs f φ).Realize v ↔ ∃ i, φ.Realize fun a => Sum.elim v i (f a)

full_name: FirstOrder.Language.BoundedFormula.realize_iExs
code: @[simp]
theorem realize_iExs [Finite γ] {f : α → β ⊕ γ}
    {φ : L.Formula α} {v : β → M} {v' : Fin 0 → M} :
    BoundedFormula.Realize (φ.iExs f) v v' ↔
      ∃ (i : γ → M), φ.Realize (fun a => Sum.elim v i (f a)) 
goal: FirstOrder.Language.BoundedFormula.Realize (FirstOrder.Language.Formula.iExs f φ) v v' ↔
  ∃ i, φ.Realize fun a => Sum.elim v i (f a)

full_name: FirstOrder.Language.BoundedFormula.realize_toFormula
code: @[simp]
theorem realize_toFormula (φ : L.BoundedFormula α n) (v : α ⊕ (Fin n) → M) :
    φ.toFormula.Realize v ↔ φ.Realize (v ∘ Sum.inl) (v ∘ Sum.inr) 
goal: φ.toFormula.Realize v ↔ φ.Realize (v ∘ Sum.inl) (v ∘ Sum.inr)

full_name: FirstOrder.Language.BoundedFormula.realize_iSup
code: @[simp]
theorem realize_iSup (s : Finset β) (f : β → L.BoundedFormula α n)
    (v : α → M) (v' : Fin n → M) :
    (iSup s f).Realize v v' ↔ ∃ b ∈ s, (f b).Realize v v' 
goal: (FirstOrder.Language.BoundedFormula.iSup s f).Realize v v' ↔ ∃ b ∈ s, (f b).Realize v v'

full_name: FirstOrder.Language.BoundedFormula.realize_iInf
code: @[simp]
theorem realize_iInf (s : Finset β) (f : β → L.BoundedFormula α n)
    (v : α → M) (v' : Fin n → M) :
    (iInf s f).Realize v v' ↔ ∀ b ∈ s, (f b).Realize v v' 
goal: (FirstOrder.Language.BoundedFormula.iInf s f).Realize v v' ↔ ∀ b ∈ s, (f b).Realize v v'

full_name: FirstOrder.Language.Equiv.realize_boundedFormula
code: @[simp]
theorem realize_boundedFormula (g : M ≃[L] N) (φ : L.BoundedFormula α n) {v : α → M}
    {xs : Fin n → M} : φ.Realize (g ∘ v) (g ∘ xs) ↔ φ.Realize v xs 
goal: φ.Realize (⇑g ∘ v) (⇑g ∘ xs) ↔ φ.Realize v xs

full_name: FirstOrder.Language.Equiv.realize_formula
code: @[simp]
theorem realize_formula (g : M ≃[L] N) (φ : L.Formula α) {v : α → M} :
    φ.Realize (g ∘ v) ↔ φ.Realize v 
goal: φ.Realize (⇑g ∘ v) ↔ φ.Realize v

full_name: FirstOrder.Language.Equiv.realize_sentence
code: theorem realize_sentence (g : M ≃[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ 
goal: M ⊨ φ ↔ N ⊨ φ

full_name: FirstOrder.Language.Equiv.theory_model
code: theorem theory_model (g : M ≃[L] N) [M ⊨ T] : N ⊨ T 
goal: N ⊨ T

full_name: FirstOrder.Language.Equiv.elementarilyEquivalent
code: theorem elementarilyEquivalent (g : M ≃[L] N) : M ≅[L] N 
goal: L.ElementarilyEquivalent M N

full_name: FirstOrder.Language.Relations.realize_reflexive
code: @[simp]
theorem realize_reflexive : M ⊨ r.reflexive ↔ Reflexive fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.reflexive ↔ Reflexive fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Relations.realize_irreflexive
code: @[simp]
theorem realize_irreflexive : M ⊨ r.irreflexive ↔ Irreflexive fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.irreflexive ↔ Irreflexive fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Relations.realize_symmetric
code: @[simp]
theorem realize_symmetric : M ⊨ r.symmetric ↔ Symmetric fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.symmetric ↔ Symmetric fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Relations.realize_antisymmetric
code: @[simp]
theorem realize_antisymmetric :
    M ⊨ r.antisymmetric ↔ AntiSymmetric fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.antisymmetric ↔ AntiSymmetric fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Relations.realize_transitive
code: @[simp]
theorem realize_transitive : M ⊨ r.transitive ↔ Transitive fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.transitive ↔ Transitive fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Relations.realize_total
code: @[simp]
theorem realize_total : M ⊨ r.total ↔ Total fun x y : M => RelMap r ![x, y] 
goal: M ⊨ r.total ↔ Total fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]

full_name: FirstOrder.Language.Sentence.realize_cardGe
code: @[simp]
theorem Sentence.realize_cardGe (n) : M ⊨ Sentence.cardGe L n ↔ ↑n ≤ #M 
goal: M ⊨ FirstOrder.Language.Sentence.cardGe L n ↔ ↑n ≤ Cardinal.mk M

full_name: FirstOrder.Language.model_infiniteTheory_iff
code: @[simp]
theorem model_infiniteTheory_iff : M ⊨ L.infiniteTheory ↔ Infinite M 
goal: M ⊨ L.infiniteTheory ↔ Infinite M

full_name: FirstOrder.Language.model_infiniteTheory
code: instance model_infiniteTheory [h : Infinite M] : M ⊨ L.infiniteTheory 
goal: M ⊨ L.infiniteTheory

full_name: FirstOrder.Language.model_nonemptyTheory_iff
code: @[simp]
theorem model_nonemptyTheory_iff : M ⊨ L.nonemptyTheory ↔ Nonempty M 
goal: M ⊨ L.nonemptyTheory ↔ Nonempty M

full_name: FirstOrder.Language.model_nonempty
code: instance model_nonempty [h : Nonempty M] : M ⊨ L.nonemptyTheory 
goal: M ⊨ L.nonemptyTheory

full_name: FirstOrder.Language.model_distinctConstantsTheory
code: theorem model_distinctConstantsTheory {M : Type w} [L[[α]].Structure M] (s : Set α) :
    M ⊨ L.distinctConstantsTheory s ↔ Set.InjOn (fun i : α => (L.con i : M)) s 
goal: M ⊨ L.distinctConstantsTheory s ↔ Set.InjOn (fun i => ↑(L.con i)) s

full_name: FirstOrder.Language.card_le_of_model_distinctConstantsTheory
code: theorem card_le_of_model_distinctConstantsTheory (s : Set α) (M : Type w) [L[[α]].Structure M]
    [h : M ⊨ L.distinctConstantsTheory s] : Cardinal.lift.{w} #s ≤ Cardinal.lift.{u'} #M 
goal: Cardinal.lift.{w, u'} (Cardinal.mk ↑s) ≤ Cardinal.lift.{u', w} (Cardinal.mk M)

full_name: FirstOrder.Language.ElementarilyEquivalent.symm
code: @[symm]
nonrec theorem symm (h : M ≅[L] N) : N ≅[L] M 
goal: L.ElementarilyEquivalent N M

full_name: FirstOrder.Language.ElementarilyEquivalent.trans
code: @[trans]
nonrec theorem trans (MN : M ≅[L] N) (NP : N ≅[L] P) : M ≅[L] P 
goal: L.ElementarilyEquivalent M P

full_name: FirstOrder.Language.ElementarilyEquivalent.completeTheory_eq
code: theorem completeTheory_eq (h : M ≅[L] N) : L.completeTheory M = L.completeTheory N 
goal: L.completeTheory M = L.completeTheory N

full_name: FirstOrder.Language.ElementarilyEquivalent.realize_sentence
code: theorem realize_sentence (h : M ≅[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ 
goal: M ⊨ φ ↔ N ⊨ φ

full_name: FirstOrder.Language.ElementarilyEquivalent.theory_model_iff
code: theorem theory_model_iff (h : M ≅[L] N) : M ⊨ T ↔ N ⊨ T 
goal: M ⊨ T ↔ N ⊨ T

full_name: FirstOrder.Language.ElementarilyEquivalent.theory_model
code: theorem theory_model [MT : M ⊨ T] (h : M ≅[L] N) : N ⊨ T 
goal: N ⊨ T

full_name: FirstOrder.Language.ElementarilyEquivalent.nonempty_iff
code: theorem nonempty_iff (h : M ≅[L] N) : Nonempty M ↔ Nonempty N 
goal: Nonempty M ↔ Nonempty N

full_name: FirstOrder.Language.ElementarilyEquivalent.nonempty
code: theorem nonempty [Mn : Nonempty M] (h : M ≅[L] N) : Nonempty N 
goal: Nonempty N

full_name: FirstOrder.Language.ElementarilyEquivalent.infinite_iff
code: theorem infinite_iff (h : M ≅[L] N) : Infinite M ↔ Infinite N 
goal: Infinite M ↔ Infinite N

full_name: FirstOrder.Language.ElementarilyEquivalent.infinite
code: theorem infinite [Mi : Infinite M] (h : M ≅[L] N) : Infinite N 
goal: Infinite N