model_theory.satisfiabilityMathlib.ModelTheory.Satisfiability

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -167,7 +167,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable :=
   by
   haveI : Inhabited M := Classical.inhabited_of_nonempty inferInstance
-  rw [Cardinal.lift_mk_le'] at h 
+  rw [Cardinal.lift_mk_le'] at h
   letI : (constants_on α).Structure M := constants_on.Structure (Function.extend coe h.some default)
   have : M ⊨ (L.Lhom_with_constants α).onTheory T ∪ L.distinct_constants_theory s :=
     by
@@ -230,7 +230,7 @@ theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T :
       _⟩
   rw [is_satisfiable_iff_is_finitely_satisfiable]
   intro s hs
-  rw [Set.iUnion_eq_iUnion_finset] at hs 
+  rw [Set.iUnion_eq_iUnion_finset] at hs
   obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
   · exact (h t).mono ht
   ·
@@ -257,7 +257,7 @@ theorem exists_elementaryEmbedding_card_eq_of_le (M : Type w') [L.Structure M] [
   obtain ⟨S, _, hS⟩ := exists_elementary_substructure_card_eq L ∅ κ h1 (by simp) h2 h3
   have : Small.{w} S :=
     by
-    rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS 
+    rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS
     exact small_iff_lift_mk_lt_univ.2 (lt_of_eq_of_lt hS κ.lift_lt_univ')
   refine'
     ⟨(equivShrink S).bundledInduced L,
@@ -278,7 +278,7 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
   by
   obtain ⟨N0, hN0⟩ := (L.elementary_diagram M).exists_large_model_of_infinite_model κ M
   let f0 := elementary_embedding.of_models_elementary_diagram L M N0
-  rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2 
+  rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2
   obtain ⟨N, ⟨NN0⟩, hN⟩ :=
     exists_elementary_embedding_card_eq_of_le (L[[M]]) N0 κ
       (aleph_0_le_lift.1 ((aleph_0_le_lift.2 (aleph_0_le_mk M)).trans h2)) _ (hN0.trans _)
@@ -289,7 +289,7 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
     apply elementary_embedding.of_models_elementary_diagram L M N
   · simp only [card_with_constants, lift_add, lift_lift]
     rw [add_comm, add_eq_max (aleph_0_le_lift.2 (infinite_iff.1 iM)), max_le_iff]
-    rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1 
+    rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1
     exact ⟨h2, h1⟩
   · rw [← lift_umax', lift_id]
 #align first_order.language.exists_elementary_embedding_card_eq_of_ge FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_ge
@@ -393,7 +393,7 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
         (h1 (h2.some.subtheory_Model (Set.subset_union_left _ _))),
       fun h M => _⟩
   contrapose! h
-  rw [← sentence.realize_not] at h 
+  rw [← sentence.realize_not] at h
   refine'
     ⟨{  carrier := M
         is_model := ⟨fun ψ hψ => hψ.elim (realize_sentence_of_mem _) fun h' => _⟩ }⟩
@@ -410,7 +410,7 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
 theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ φ) (M : Type _)
     [L.Structure M] [M ⊨ T] [Nonempty M] : M ⊨ φ :=
   by
-  rw [models_iff_not_satisfiable] at h 
+  rw [models_iff_not_satisfiable] at h
   contrapose! h
   have : M ⊨ T ∪ {formula.not φ} :=
     by
@@ -494,7 +494,7 @@ theorem IsMaximal.mem_or_not_mem (h : T.IsMaximal) (φ : L.Sentence) : φ ∈ T
 theorem IsMaximal.mem_of_models (h : T.IsMaximal) {φ : L.Sentence} (hφ : T ⊨ φ) : φ ∈ T :=
   by
   refine' (h.mem_or_not_mem φ).resolve_right fun con => _
-  rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem Con] at hφ 
+  rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem Con] at hφ
   exact hφ h.1
 #align first_order.language.Theory.is_maximal.mem_of_models FirstOrder.Language.Theory.IsMaximal.mem_of_models
 -/
@@ -828,9 +828,9 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     obtain ⟨N, hN⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
     by_contra con
-    push_neg at con 
+    push_neg at con
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := Con
-    rw [sentence.realize_not, Classical.not_not] at hMT 
+    rw [sentence.realize_not, Classical.not_not] at hMT
     refine' hMF _
     haveI := hT MT
     haveI := hT MF
Diff
@@ -106,7 +106,11 @@ theorem isSatisfiable_of_isSatisfiable_onTheory {L' : Language.{w, w'}} (φ : L
 
 #print FirstOrder.Language.Theory.isSatisfiable_onTheory_iff /-
 theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) :
-    (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by classical
+    (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by
+  classical
+  refine' ⟨is_satisfiable_of_is_satisfiable_on_Theory φ, fun h' => _⟩
+  haveI : Inhabited h'.some := Classical.inhabited_of_nonempty'
+  exact model.is_satisfiable (h'.some.default_expansion h)
 #align first_order.language.Theory.is_satisfiable_on_Theory_iff FirstOrder.Language.Theory.isSatisfiable_onTheory_iff
 -/
 
@@ -122,7 +126,23 @@ theorem IsSatisfiable.isFinitelySatisfiable (h : T.IsSatisfiable) : T.IsFinitely
 finitely satisfiable. -/
 theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
     T.IsSatisfiable ↔ T.IsFinitelySatisfiable :=
-  ⟨Theory.IsSatisfiable.isFinitelySatisfiable, fun h => by classical⟩
+  ⟨Theory.IsSatisfiable.isFinitelySatisfiable, fun h => by
+    classical
+    set M : ∀ T0 : Finset T, Type max u v := fun T0 =>
+      (h (T0.map (Function.Embedding.subtype fun x => x ∈ T)) T0.map_subtype_subset).some with hM
+    let M' := Filter.Product (↑(Ultrafilter.of (Filter.atTop : Filter (Finset T)))) M
+    have h' : M' ⊨ T := by
+      refine' ⟨fun φ hφ => _⟩
+      rw [ultraproduct.sentence_realize]
+      refine'
+        Filter.Eventually.filter_mono (Ultrafilter.of_le _)
+          (Filter.eventually_atTop.2
+            ⟨{⟨φ, hφ⟩}, fun s h' =>
+              Theory.realize_sentence_of_mem (s.map (Function.Embedding.subtype fun x => x ∈ T)) _⟩)
+      simp only [Finset.coe_map, Function.Embedding.coe_subtype, Set.mem_image, Finset.mem_coe,
+        Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
+      exact ⟨hφ, h' (Finset.mem_singleton_self _)⟩
+    exact ⟨Model.of T M'⟩⟩
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 -/
 
@@ -167,7 +187,17 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
 #print FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite /-
 theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
-    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by classical
+    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
+  classical
+  rw [distinct_constants_theory_eq_Union, Set.union_iUnion, is_satisfiable_directed_union_iff]
+  ·
+    exact fun t =>
+      is_satisfiable_union_distinct_constants_theory_of_card_le T _ M
+        ((lift_le_aleph_0.2 (finset_card_lt_aleph_0 _).le).trans
+          (aleph_0_le_lift.2 (aleph_0_le_mk M)))
+  · refine' (monotone_const.union (monotone_distinct_constants_theory.comp _)).directed_le
+    simp only [Finset.coe_map, Function.Embedding.coe_subtype]
+    exact set.monotone_image.comp fun _ _ => Finset.coe_subset.2
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite
 -/
 
@@ -193,7 +223,20 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
 
 #print FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset /-
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
-    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by classical
+    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
+  classical
+  refine'
+    ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _), fun h =>
+      _⟩
+  rw [is_satisfiable_iff_is_finitely_satisfiable]
+  intro s hs
+  rw [Set.iUnion_eq_iUnion_finset] at hs 
+  obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
+  · exact (h t).mono ht
+  ·
+    exact
+      Monotone.directed_le fun t1 t2 h =>
+        Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
 #align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset
 -/
 
Diff
@@ -106,11 +106,7 @@ theorem isSatisfiable_of_isSatisfiable_onTheory {L' : Language.{w, w'}} (φ : L
 
 #print FirstOrder.Language.Theory.isSatisfiable_onTheory_iff /-
 theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) :
-    (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by
-  classical
-  refine' ⟨is_satisfiable_of_is_satisfiable_on_Theory φ, fun h' => _⟩
-  haveI : Inhabited h'.some := Classical.inhabited_of_nonempty'
-  exact model.is_satisfiable (h'.some.default_expansion h)
+    (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by classical
 #align first_order.language.Theory.is_satisfiable_on_Theory_iff FirstOrder.Language.Theory.isSatisfiable_onTheory_iff
 -/
 
@@ -126,23 +122,7 @@ theorem IsSatisfiable.isFinitelySatisfiable (h : T.IsSatisfiable) : T.IsFinitely
 finitely satisfiable. -/
 theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
     T.IsSatisfiable ↔ T.IsFinitelySatisfiable :=
-  ⟨Theory.IsSatisfiable.isFinitelySatisfiable, fun h => by
-    classical
-    set M : ∀ T0 : Finset T, Type max u v := fun T0 =>
-      (h (T0.map (Function.Embedding.subtype fun x => x ∈ T)) T0.map_subtype_subset).some with hM
-    let M' := Filter.Product (↑(Ultrafilter.of (Filter.atTop : Filter (Finset T)))) M
-    have h' : M' ⊨ T := by
-      refine' ⟨fun φ hφ => _⟩
-      rw [ultraproduct.sentence_realize]
-      refine'
-        Filter.Eventually.filter_mono (Ultrafilter.of_le _)
-          (Filter.eventually_atTop.2
-            ⟨{⟨φ, hφ⟩}, fun s h' =>
-              Theory.realize_sentence_of_mem (s.map (Function.Embedding.subtype fun x => x ∈ T)) _⟩)
-      simp only [Finset.coe_map, Function.Embedding.coe_subtype, Set.mem_image, Finset.mem_coe,
-        Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
-      exact ⟨hφ, h' (Finset.mem_singleton_self _)⟩
-    exact ⟨Model.of T M'⟩⟩
+  ⟨Theory.IsSatisfiable.isFinitelySatisfiable, fun h => by classical⟩
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 -/
 
@@ -187,17 +167,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
 #print FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite /-
 theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
-    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
-  classical
-  rw [distinct_constants_theory_eq_Union, Set.union_iUnion, is_satisfiable_directed_union_iff]
-  ·
-    exact fun t =>
-      is_satisfiable_union_distinct_constants_theory_of_card_le T _ M
-        ((lift_le_aleph_0.2 (finset_card_lt_aleph_0 _).le).trans
-          (aleph_0_le_lift.2 (aleph_0_le_mk M)))
-  · refine' (monotone_const.union (monotone_distinct_constants_theory.comp _)).directed_le
-    simp only [Finset.coe_map, Function.Embedding.coe_subtype]
-    exact set.monotone_image.comp fun _ _ => Finset.coe_subset.2
+    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by classical
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite
 -/
 
@@ -223,20 +193,7 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
 
 #print FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset /-
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
-    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
-  classical
-  refine'
-    ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _), fun h =>
-      _⟩
-  rw [is_satisfiable_iff_is_finitely_satisfiable]
-  intro s hs
-  rw [Set.iUnion_eq_iUnion_finset] at hs 
-  obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
-  · exact (h t).mono ht
-  ·
-    exact
-      Monotone.directed_le fun t1 t2 h =>
-        Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
+    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by classical
 #align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset
 -/
 
Diff
@@ -440,7 +440,7 @@ theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ φ.Not ↔ 
   by
   cases' h.2 φ with hφ hφn
   · simp only [hφ, not_true, iff_false_iff]
-    rw [models_sentence_iff, not_forall]
+    rw [models_sentence_iff, Classical.not_forall]
     refine' ⟨h.1.some, _⟩
     simp only [sentence.realize_not, Classical.not_not]
     exact models_sentence_iff.1 hφ _
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
 -/
-import Mathbin.ModelTheory.Ultraproducts
-import Mathbin.ModelTheory.Bundled
-import Mathbin.ModelTheory.Skolem
+import ModelTheory.Ultraproducts
+import ModelTheory.Bundled
+import ModelTheory.Skolem
 
 #align_import model_theory.satisfiability from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
-
-! This file was ported from Lean 3 source module model_theory.satisfiability
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.ModelTheory.Ultraproducts
 import Mathbin.ModelTheory.Bundled
 import Mathbin.ModelTheory.Skolem
 
+#align_import model_theory.satisfiability from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # First-Order Satisfiability
 
Diff
@@ -149,6 +149,7 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 -/
 
+#print FirstOrder.Language.Theory.isSatisfiable_directed_union_iff /-
 theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι → L.Theory}
     (h : Directed (· ⊆ ·) T) : Theory.IsSatisfiable (⋃ i, T i) ↔ ∀ i, (T i).IsSatisfiable :=
   by
@@ -158,9 +159,11 @@ theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι →
   obtain ⟨i, hi⟩ := h.exists_mem_subset_of_finset_subset_bUnion hT0
   exact (h' i).mono hi
 #align first_order.language.Theory.is_satisfiable_directed_union_iff FirstOrder.Language.Theory.isSatisfiable_directed_union_iff
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le /-
 theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
     (M : Type w') [Nonempty M] [L.Structure M] [M ⊨ T]
     (h : Cardinal.lift.{w'} (#s) ≤ Cardinal.lift.{w} (#M)) :
@@ -181,8 +184,10 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
           (ab.trans (subtype.coe_injective.extend_apply h.some default ⟨b, bs⟩)))
   exact model.is_satisfiable M
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite /-
 theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
@@ -197,6 +202,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
     simp only [Finset.coe_map, Function.Embedding.coe_subtype]
     exact set.monotone_image.comp fun _ _ => Finset.coe_subset.2
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -218,6 +224,7 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
 -/
 
+#print FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset /-
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
@@ -234,6 +241,7 @@ theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T :
       Monotone.directed_le fun t1 t2 h =>
         Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
 #align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset
+-/
 
 end Theory
 
@@ -346,7 +354,6 @@ def ModelsBoundedFormula (φ : L.BoundedFormula α n) : Prop :=
 #align first_order.language.Theory.models_bounded_formula FirstOrder.Language.Theory.ModelsBoundedFormula
 -/
 
--- mathport name: models_bounded_formula
 infixl:51
   " ⊨ " =>-- input using \|= or \vDash, but not using \models
   ModelsBoundedFormula
@@ -377,6 +384,7 @@ theorem models_sentence_of_mem {φ : L.Sentence} (h : φ ∈ T) : T ⊨ φ :=
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.models_iff_not_satisfiable /-
 theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfiable (T ∪ {φ.Not}) :=
   by
   rw [models_sentence_iff, is_satisfiable]
@@ -395,11 +403,13 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
   rw [Set.mem_singleton_iff.1 h']
   exact h
 #align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiable
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence /-
 theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ φ) (M : Type _)
     [L.Structure M] [M ⊨ T] [Nonempty M] : M ⊨ φ :=
   by
@@ -413,6 +423,7 @@ theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ φ) (
     exact ⟨h, inferInstance⟩
   exact model.is_satisfiable M
 #align first_order.language.Theory.models_bounded_formula.realize_sentence FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -446,6 +457,7 @@ theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ φ.Not ↔ 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.IsComplete.realize_sentence_iff /-
 theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type _) [L.Structure M]
     [M ⊨ T] [Nonempty M] : M ⊨ φ ↔ T ⊨ φ :=
   by
@@ -456,6 +468,7 @@ theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type _) [
       iff_of_false ((sentence.realize_not M).1 (hφn.realize_sentence M))
         ((h.models_not_iff φ).1 hφn)
 #align first_order.language.Theory.is_complete.realize_sentence_iff FirstOrder.Language.Theory.IsComplete.realize_sentence_iff
+-/
 
 end IsComplete
 
Diff
@@ -111,9 +111,9 @@ theorem isSatisfiable_of_isSatisfiable_onTheory {L' : Language.{w, w'}} (φ : L
 theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) :
     (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by
   classical
-    refine' ⟨is_satisfiable_of_is_satisfiable_on_Theory φ, fun h' => _⟩
-    haveI : Inhabited h'.some := Classical.inhabited_of_nonempty'
-    exact model.is_satisfiable (h'.some.default_expansion h)
+  refine' ⟨is_satisfiable_of_is_satisfiable_on_Theory φ, fun h' => _⟩
+  haveI : Inhabited h'.some := Classical.inhabited_of_nonempty'
+  exact model.is_satisfiable (h'.some.default_expansion h)
 #align first_order.language.Theory.is_satisfiable_on_Theory_iff FirstOrder.Language.Theory.isSatisfiable_onTheory_iff
 -/
 
@@ -131,22 +131,21 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
     T.IsSatisfiable ↔ T.IsFinitelySatisfiable :=
   ⟨Theory.IsSatisfiable.isFinitelySatisfiable, fun h => by
     classical
-      set M : ∀ T0 : Finset T, Type max u v := fun T0 =>
-        (h (T0.map (Function.Embedding.subtype fun x => x ∈ T)) T0.map_subtype_subset).some with hM
-      let M' := Filter.Product (↑(Ultrafilter.of (Filter.atTop : Filter (Finset T)))) M
-      have h' : M' ⊨ T := by
-        refine' ⟨fun φ hφ => _⟩
-        rw [ultraproduct.sentence_realize]
-        refine'
-          Filter.Eventually.filter_mono (Ultrafilter.of_le _)
-            (Filter.eventually_atTop.2
-              ⟨{⟨φ, hφ⟩}, fun s h' =>
-                Theory.realize_sentence_of_mem (s.map (Function.Embedding.subtype fun x => x ∈ T))
-                  _⟩)
-        simp only [Finset.coe_map, Function.Embedding.coe_subtype, Set.mem_image, Finset.mem_coe,
-          Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
-        exact ⟨hφ, h' (Finset.mem_singleton_self _)⟩
-      exact ⟨Model.of T M'⟩⟩
+    set M : ∀ T0 : Finset T, Type max u v := fun T0 =>
+      (h (T0.map (Function.Embedding.subtype fun x => x ∈ T)) T0.map_subtype_subset).some with hM
+    let M' := Filter.Product (↑(Ultrafilter.of (Filter.atTop : Filter (Finset T)))) M
+    have h' : M' ⊨ T := by
+      refine' ⟨fun φ hφ => _⟩
+      rw [ultraproduct.sentence_realize]
+      refine'
+        Filter.Eventually.filter_mono (Ultrafilter.of_le _)
+          (Filter.eventually_atTop.2
+            ⟨{⟨φ, hφ⟩}, fun s h' =>
+              Theory.realize_sentence_of_mem (s.map (Function.Embedding.subtype fun x => x ∈ T)) _⟩)
+      simp only [Finset.coe_map, Function.Embedding.coe_subtype, Set.mem_image, Finset.mem_coe,
+        Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
+      exact ⟨hφ, h' (Finset.mem_singleton_self _)⟩
+    exact ⟨Model.of T M'⟩⟩
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 -/
 
@@ -188,15 +187,15 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
   classical
-    rw [distinct_constants_theory_eq_Union, Set.union_iUnion, is_satisfiable_directed_union_iff]
-    ·
-      exact fun t =>
-        is_satisfiable_union_distinct_constants_theory_of_card_le T _ M
-          ((lift_le_aleph_0.2 (finset_card_lt_aleph_0 _).le).trans
-            (aleph_0_le_lift.2 (aleph_0_le_mk M)))
-    · refine' (monotone_const.union (monotone_distinct_constants_theory.comp _)).directed_le
-      simp only [Finset.coe_map, Function.Embedding.coe_subtype]
-      exact set.monotone_image.comp fun _ _ => Finset.coe_subset.2
+  rw [distinct_constants_theory_eq_Union, Set.union_iUnion, is_satisfiable_directed_union_iff]
+  ·
+    exact fun t =>
+      is_satisfiable_union_distinct_constants_theory_of_card_le T _ M
+        ((lift_le_aleph_0.2 (finset_card_lt_aleph_0 _).le).trans
+          (aleph_0_le_lift.2 (aleph_0_le_mk M)))
+  · refine' (monotone_const.union (monotone_distinct_constants_theory.comp _)).directed_le
+    simp only [Finset.coe_map, Function.Embedding.coe_subtype]
+    exact set.monotone_image.comp fun _ _ => Finset.coe_subset.2
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -222,18 +221,18 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
-    refine'
-      ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _),
-        fun h => _⟩
-    rw [is_satisfiable_iff_is_finitely_satisfiable]
-    intro s hs
-    rw [Set.iUnion_eq_iUnion_finset] at hs 
-    obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
-    · exact (h t).mono ht
-    ·
-      exact
-        Monotone.directed_le fun t1 t2 h =>
-          Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
+  refine'
+    ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _), fun h =>
+      _⟩
+  rw [is_satisfiable_iff_is_finitely_satisfiable]
+  intro s hs
+  rw [Set.iUnion_eq_iUnion_finset] at hs 
+  obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
+  · exact (h t).mono ht
+  ·
+    exact
+      Monotone.directed_le fun t1 t2 h =>
+        Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
 #align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset
 
 end Theory
@@ -819,7 +818,7 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     obtain ⟨N, hN⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
     by_contra con
-    push_neg  at con 
+    push_neg at con 
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := Con
     rw [sentence.realize_not, Classical.not_not] at hMT 
     refine' hMF _
Diff
@@ -168,7 +168,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable :=
   by
   haveI : Inhabited M := Classical.inhabited_of_nonempty inferInstance
-  rw [Cardinal.lift_mk_le'] at h
+  rw [Cardinal.lift_mk_le'] at h 
   letI : (constants_on α).Structure M := constants_on.Structure (Function.extend coe h.some default)
   have : M ⊨ (L.Lhom_with_constants α).onTheory T ∪ L.distinct_constants_theory s :=
     by
@@ -227,7 +227,7 @@ theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T :
         fun h => _⟩
     rw [is_satisfiable_iff_is_finitely_satisfiable]
     intro s hs
-    rw [Set.iUnion_eq_iUnion_finset] at hs
+    rw [Set.iUnion_eq_iUnion_finset] at hs 
     obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
     · exact (h t).mono ht
     ·
@@ -253,7 +253,7 @@ theorem exists_elementaryEmbedding_card_eq_of_le (M : Type w') [L.Structure M] [
   obtain ⟨S, _, hS⟩ := exists_elementary_substructure_card_eq L ∅ κ h1 (by simp) h2 h3
   have : Small.{w} S :=
     by
-    rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS
+    rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS 
     exact small_iff_lift_mk_lt_univ.2 (lt_of_eq_of_lt hS κ.lift_lt_univ')
   refine'
     ⟨(equivShrink S).bundledInduced L,
@@ -274,7 +274,7 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
   by
   obtain ⟨N0, hN0⟩ := (L.elementary_diagram M).exists_large_model_of_infinite_model κ M
   let f0 := elementary_embedding.of_models_elementary_diagram L M N0
-  rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2
+  rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2 
   obtain ⟨N, ⟨NN0⟩, hN⟩ :=
     exists_elementary_embedding_card_eq_of_le (L[[M]]) N0 κ
       (aleph_0_le_lift.1 ((aleph_0_le_lift.2 (aleph_0_le_mk M)).trans h2)) _ (hN0.trans _)
@@ -285,7 +285,7 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
     apply elementary_embedding.of_models_elementary_diagram L M N
   · simp only [card_with_constants, lift_add, lift_lift]
     rw [add_comm, add_eq_max (aleph_0_le_lift.2 (infinite_iff.1 iM)), max_le_iff]
-    rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1
+    rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1 
     exact ⟨h2, h1⟩
   · rw [← lift_umax', lift_id]
 #align first_order.language.exists_elementary_embedding_card_eq_of_ge FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_ge
@@ -389,7 +389,7 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
         (h1 (h2.some.subtheory_Model (Set.subset_union_left _ _))),
       fun h M => _⟩
   contrapose! h
-  rw [← sentence.realize_not] at h
+  rw [← sentence.realize_not] at h 
   refine'
     ⟨{  carrier := M
         is_model := ⟨fun ψ hψ => hψ.elim (realize_sentence_of_mem _) fun h' => _⟩ }⟩
@@ -404,7 +404,7 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
 theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ φ) (M : Type _)
     [L.Structure M] [M ⊨ T] [Nonempty M] : M ⊨ φ :=
   by
-  rw [models_iff_not_satisfiable] at h
+  rw [models_iff_not_satisfiable] at h 
   contrapose! h
   have : M ⊨ T ∪ {formula.not φ} :=
     by
@@ -485,7 +485,7 @@ theorem IsMaximal.mem_or_not_mem (h : T.IsMaximal) (φ : L.Sentence) : φ ∈ T
 theorem IsMaximal.mem_of_models (h : T.IsMaximal) {φ : L.Sentence} (hφ : T ⊨ φ) : φ ∈ T :=
   by
   refine' (h.mem_or_not_mem φ).resolve_right fun con => _
-  rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem Con] at hφ
+  rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem Con] at hφ 
   exact hφ h.1
 #align first_order.language.Theory.is_maximal.mem_of_models FirstOrder.Language.Theory.IsMaximal.mem_of_models
 -/
@@ -819,9 +819,9 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     obtain ⟨N, hN⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
     by_contra con
-    push_neg  at con
+    push_neg  at con 
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := Con
-    rw [sentence.realize_not, Classical.not_not] at hMT
+    rw [sentence.realize_not, Classical.not_not] at hMT 
     refine' hMF _
     haveI := hT MT
     haveI := hT MF
Diff
@@ -52,7 +52,7 @@ universe u v w w'
 
 open Cardinal CategoryTheory
 
-open Cardinal FirstOrder
+open scoped Cardinal FirstOrder
 
 namespace FirstOrder
 
Diff
@@ -150,12 +150,6 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 -/
 
-/- warning: first_order.language.Theory.is_satisfiable_directed_union_iff -> FirstOrder.Language.Theory.isSatisfiable_directed_union_iff is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {ι : Type.{u3}} [_inst_1 : Nonempty.{succ u3} ι] {T : ι -> (FirstOrder.Language.Theory.{u1, u2} L)}, (Directed.{max u1 u2, succ u3} (FirstOrder.Language.Theory.{u1, u2} L) ι (HasSubset.Subset.{max u1 u2} (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasSubset.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L))) T) -> (Iff (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => T i))) (forall (i : ι), FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (T i)))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {ι : Type.{u1}} [_inst_1 : Nonempty.{succ u1} ι] {T : ι -> (FirstOrder.Language.Theory.{u2, u3} L)}, (Directed.{max u2 u3, succ u1} (FirstOrder.Language.Theory.{u2, u3} L) ι (fun (x._@.Mathlib.ModelTheory.Satisfiability._hyg.858 : FirstOrder.Language.Theory.{u2, u3} L) (x._@.Mathlib.ModelTheory.Satisfiability._hyg.860 : FirstOrder.Language.Theory.{u2, u3} L) => HasSubset.Subset.{max u2 u3} (FirstOrder.Language.Theory.{u2, u3} L) (Set.instHasSubsetSet.{max u2 u3} (FirstOrder.Language.Sentence.{u2, u3} L)) x._@.Mathlib.ModelTheory.Satisfiability._hyg.858 x._@.Mathlib.ModelTheory.Satisfiability._hyg.860) T) -> (Iff (FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => T i))) (forall (i : ι), FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (T i)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_directed_union_iff FirstOrder.Language.Theory.isSatisfiable_directed_union_iffₓ'. -/
 theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι → L.Theory}
     (h : Directed (· ⊆ ·) T) : Theory.IsSatisfiable (⋃ i, T i) ↔ ∀ i, (T i).IsSatisfiable :=
   by
@@ -166,12 +160,6 @@ theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι →
   exact (h' i).mono hi
 #align first_order.language.Theory.is_satisfiable_directed_union_iff FirstOrder.Language.Theory.isSatisfiable_directed_union_iff
 
-/- warning: first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le -> FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : Nonempty.{succ u4} M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_3 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_2 T], (LE.le.{succ (max u3 u4)} Cardinal.{max u3 u4} Cardinal.hasLe.{max u3 u4} (Cardinal.lift.{u4, u3} (Cardinal.mk.{u3} (coeSort.{succ u3, succ (succ u3)} (Set.{u3} α) Type.{u3} (Set.hasCoeToSort.{u3} α) s))) (Cardinal.lift.{u3, u4} (Cardinal.mk.{u4} M))) -> (FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.hasUnion.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s)))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : Nonempty.{succ u4} M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_3 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_2 T], (LE.le.{max (succ u3) (succ u4)} Cardinal.{max u3 u4} Cardinal.instLECardinal.{max u3 u4} (Cardinal.lift.{u4, u3} (Cardinal.mk.{u3} (Set.Elem.{u3} α s))) (Cardinal.lift.{u3, u4} (Cardinal.mk.{u4} M))) -> (FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u2) u3} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instUnionSet.{max (max u1 u2) u3} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_leₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
@@ -195,12 +183,6 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
   exact model.is_satisfiable M
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le
 
-/- warning: first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite -> FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_1 T] [_inst_3 : Infinite.{succ u4} M], FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.hasUnion.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_1 T] [_inst_3 : Infinite.{succ u4} M], FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u2) u3} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instUnionSet.{max (max u1 u2) u3} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infiniteₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
@@ -237,12 +219,6 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
 -/
 
-/- warning: first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset -> FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {ι : Type.{u3}} (T : ι -> (FirstOrder.Language.Theory.{u1, u2} L)), Iff (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => T i))) (forall (s : Finset.{u3} ι), FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => Set.iUnion.{max u1 u2, 0} (FirstOrder.Language.Sentence.{u1, u2} L) (Membership.Mem.{u3, u3} ι (Finset.{u3} ι) (Finset.hasMem.{u3} ι) i s) (fun (H : Membership.Mem.{u3, u3} ι (Finset.{u3} ι) (Finset.hasMem.{u3} ι) i s) => T i))))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {ι : Type.{u1}} (T : ι -> (FirstOrder.Language.Theory.{u2, u3} L)), Iff (FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => T i))) (forall (s : Finset.{u1} ι), FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => Set.iUnion.{max u3 u2, 0} (FirstOrder.Language.Sentence.{u2, u3} L) (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) (fun (H : Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) => T i))))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finsetₓ'. -/
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
@@ -401,12 +377,6 @@ theorem models_sentence_of_mem {φ : L.Sentence} (h : φ ∈ T) : T ⊨ φ :=
 #align first_order.language.Theory.models_sentence_of_mem FirstOrder.Language.Theory.models_sentence_of_mem
 -/
 
-/- warning: first_order.language.Theory.models_iff_not_satisfiable -> FirstOrder.Language.Theory.models_iff_not_satisfiable is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} (φ : FirstOrder.Language.Sentence.{u1, u2} L), Iff (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ) (Not (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Union.union.{max u1 u2} (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasUnion.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) T (Singleton.singleton.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasSingleton.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) (FirstOrder.Language.Formula.not.{u1, u2, 0} L Empty φ)))))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} (φ : FirstOrder.Language.Sentence.{u1, u2} L), Iff (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ) (Not (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Union.union.{max u2 u1} (FirstOrder.Language.Theory.{u1, u2} L) (Set.instUnionSet.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) T (Singleton.singleton.{max u1 u2, max u1 u2} (FirstOrder.Language.Formula.{u1, u2, 0} L Empty) (FirstOrder.Language.Theory.{u1, u2} L) (Set.instSingletonSet.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) (FirstOrder.Language.Formula.not.{u1, u2, 0} L Empty φ)))))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiableₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfiable (T ∪ {φ.Not}) :=
   by
@@ -427,12 +397,6 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
   exact h
 #align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiable
 
-/- warning: first_order.language.Theory.models_bounded_formula.realize_sentence -> FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} {φ : FirstOrder.Language.Sentence.{u1, u2} L}, (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ) -> (forall (M : Type.{u3}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u3} L M _inst_1 T] [_inst_3 : Nonempty.{succ u3} M], FirstOrder.Language.Sentence.Realize.{u1, u2, u3} L M _inst_1 φ)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {T : FirstOrder.Language.Theory.{u2, u3} L} {φ : FirstOrder.Language.Sentence.{u2, u3} L}, (FirstOrder.Language.Theory.ModelsBoundedFormula.{u2, u3, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ) -> (forall (M : Type.{u1}) [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u1} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u2, u3, u1} L M _inst_1 T] [_inst_3 : Nonempty.{succ u1} M], FirstOrder.Language.Sentence.Realize.{u2, u3, u1} L M _inst_1 φ)
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.models_bounded_formula.realize_sentence FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentenceₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -480,12 +444,6 @@ theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ φ.Not ↔ 
 #align first_order.language.Theory.is_complete.models_not_iff FirstOrder.Language.Theory.IsComplete.models_not_iff
 -/
 
-/- warning: first_order.language.Theory.is_complete.realize_sentence_iff -> FirstOrder.Language.Theory.IsComplete.realize_sentence_iff is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L}, (FirstOrder.Language.Theory.IsComplete.{u1, u2} L T) -> (forall (φ : FirstOrder.Language.Sentence.{u1, u2} L) (M : Type.{u3}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u3} L M _inst_1 T] [_inst_3 : Nonempty.{succ u3} M], Iff (FirstOrder.Language.Sentence.Realize.{u1, u2, u3} L M _inst_1 φ) (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {T : FirstOrder.Language.Theory.{u2, u3} L}, (FirstOrder.Language.Theory.IsComplete.{u2, u3} L T) -> (forall (φ : FirstOrder.Language.Sentence.{u2, u3} L) (M : Type.{u1}) [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u1} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u2, u3, u1} L M _inst_1 T] [_inst_3 : Nonempty.{succ u1} M], Iff (FirstOrder.Language.Sentence.Realize.{u2, u3, u1} L M _inst_1 φ) (FirstOrder.Language.Theory.ModelsBoundedFormula.{u2, u3, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_complete.realize_sentence_iff FirstOrder.Language.Theory.IsComplete.realize_sentence_iffₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
Diff
@@ -723,9 +723,7 @@ theorem ex_semanticallyEquivalent_not_all_not (φ : L.BoundedFormula α (n + 1))
 
 #print FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt /-
 theorem semanticallyEquivalent_all_liftAt : T.SemanticallyEquivalent φ (φ.liftAt 1 n).all :=
-  fun M v xs => by
-  skip
-  rw [realize_iff, realize_all_lift_at_one_self]
+  fun M v xs => by skip; rw [realize_iff, realize_all_lift_at_one_self]
 #align first_order.language.bounded_formula.semantically_equivalent_all_lift_at FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt
 -/
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
 
 ! This file was ported from Lean 3 source module model_theory.satisfiability
-! leanprover-community/mathlib commit d565b3df44619c1498326936be16f1a935df0728
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.ModelTheory.Skolem
 
 /-!
 # First-Order Satisfiability
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
 This file deals with the satisfiability of first-order theories, as well as equivalence over them.
 
 ## Main Definitions
Diff
@@ -61,37 +61,50 @@ namespace Theory
 
 variable (T)
 
+#print FirstOrder.Language.Theory.IsSatisfiable /-
 /-- A theory is satisfiable if a structure models it. -/
 def IsSatisfiable : Prop :=
   Nonempty (ModelType.{u, v, max u v} T)
 #align first_order.language.Theory.is_satisfiable FirstOrder.Language.Theory.IsSatisfiable
+-/
 
+#print FirstOrder.Language.Theory.IsFinitelySatisfiable /-
 /-- A theory is finitely satisfiable if all of its finite subtheories are satisfiable. -/
 def IsFinitelySatisfiable : Prop :=
   ∀ T0 : Finset L.Sentence, (T0 : L.Theory) ⊆ T → (T0 : L.Theory).IsSatisfiable
 #align first_order.language.Theory.is_finitely_satisfiable FirstOrder.Language.Theory.IsFinitelySatisfiable
+-/
 
 variable {T} {T' : L.Theory}
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.Model.isSatisfiable /-
 theorem Model.isSatisfiable (M : Type w) [n : Nonempty M] [S : L.Structure M] [M ⊨ T] :
     T.IsSatisfiable :=
   ⟨((⊥ : Substructure _ (ModelType.of T M)).elementarySkolem₁Reduct.toModel T).Shrink⟩
 #align first_order.language.Theory.model.is_satisfiable FirstOrder.Language.Theory.Model.isSatisfiable
+-/
 
+#print FirstOrder.Language.Theory.IsSatisfiable.mono /-
 theorem IsSatisfiable.mono (h : T'.IsSatisfiable) (hs : T ⊆ T') : T.IsSatisfiable :=
   ⟨(Theory.Model.mono (ModelType.is_model h.some) hs).Bundled⟩
 #align first_order.language.Theory.is_satisfiable.mono FirstOrder.Language.Theory.IsSatisfiable.mono
+-/
 
+#print FirstOrder.Language.Theory.isSatisfiable_empty /-
 theorem isSatisfiable_empty (L : Language.{u, v}) : IsSatisfiable (∅ : L.Theory) :=
   ⟨default⟩
 #align first_order.language.Theory.is_satisfiable_empty FirstOrder.Language.Theory.isSatisfiable_empty
+-/
 
+#print FirstOrder.Language.Theory.isSatisfiable_of_isSatisfiable_onTheory /-
 theorem isSatisfiable_of_isSatisfiable_onTheory {L' : Language.{w, w'}} (φ : L →ᴸ L')
     (h : (φ.onTheory T).IsSatisfiable) : T.IsSatisfiable :=
   Model.isSatisfiable (h.some.reduct φ)
 #align first_order.language.Theory.is_satisfiable_of_is_satisfiable_on_Theory FirstOrder.Language.Theory.isSatisfiable_of_isSatisfiable_onTheory
+-/
 
+#print FirstOrder.Language.Theory.isSatisfiable_onTheory_iff /-
 theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) :
     (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by
   classical
@@ -99,12 +112,16 @@ theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h
     haveI : Inhabited h'.some := Classical.inhabited_of_nonempty'
     exact model.is_satisfiable (h'.some.default_expansion h)
 #align first_order.language.Theory.is_satisfiable_on_Theory_iff FirstOrder.Language.Theory.isSatisfiable_onTheory_iff
+-/
 
+#print FirstOrder.Language.Theory.IsSatisfiable.isFinitelySatisfiable /-
 theorem IsSatisfiable.isFinitelySatisfiable (h : T.IsSatisfiable) : T.IsFinitelySatisfiable :=
   fun _ => h.mono
 #align first_order.language.Theory.is_satisfiable.is_finitely_satisfiable FirstOrder.Language.Theory.IsSatisfiable.isFinitelySatisfiable
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable /-
 /-- The Compactness Theorem of first-order logic: A theory is satisfiable if and only if it is
 finitely satisfiable. -/
 theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
@@ -128,7 +145,14 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
         exact ⟨hφ, h' (Finset.mem_singleton_self _)⟩
       exact ⟨Model.of T M'⟩⟩
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
+-/
 
+/- warning: first_order.language.Theory.is_satisfiable_directed_union_iff -> FirstOrder.Language.Theory.isSatisfiable_directed_union_iff is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {ι : Type.{u3}} [_inst_1 : Nonempty.{succ u3} ι] {T : ι -> (FirstOrder.Language.Theory.{u1, u2} L)}, (Directed.{max u1 u2, succ u3} (FirstOrder.Language.Theory.{u1, u2} L) ι (HasSubset.Subset.{max u1 u2} (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasSubset.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L))) T) -> (Iff (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => T i))) (forall (i : ι), FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (T i)))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {ι : Type.{u1}} [_inst_1 : Nonempty.{succ u1} ι] {T : ι -> (FirstOrder.Language.Theory.{u2, u3} L)}, (Directed.{max u2 u3, succ u1} (FirstOrder.Language.Theory.{u2, u3} L) ι (fun (x._@.Mathlib.ModelTheory.Satisfiability._hyg.858 : FirstOrder.Language.Theory.{u2, u3} L) (x._@.Mathlib.ModelTheory.Satisfiability._hyg.860 : FirstOrder.Language.Theory.{u2, u3} L) => HasSubset.Subset.{max u2 u3} (FirstOrder.Language.Theory.{u2, u3} L) (Set.instHasSubsetSet.{max u2 u3} (FirstOrder.Language.Sentence.{u2, u3} L)) x._@.Mathlib.ModelTheory.Satisfiability._hyg.858 x._@.Mathlib.ModelTheory.Satisfiability._hyg.860) T) -> (Iff (FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => T i))) (forall (i : ι), FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (T i)))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_directed_union_iff FirstOrder.Language.Theory.isSatisfiable_directed_union_iffₓ'. -/
 theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι → L.Theory}
     (h : Directed (· ⊆ ·) T) : Theory.IsSatisfiable (⋃ i, T i) ↔ ∀ i, (T i).IsSatisfiable :=
   by
@@ -139,6 +163,12 @@ theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι →
   exact (h' i).mono hi
 #align first_order.language.Theory.is_satisfiable_directed_union_iff FirstOrder.Language.Theory.isSatisfiable_directed_union_iff
 
+/- warning: first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le -> FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : Nonempty.{succ u4} M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_3 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_2 T], (LE.le.{succ (max u3 u4)} Cardinal.{max u3 u4} Cardinal.hasLe.{max u3 u4} (Cardinal.lift.{u4, u3} (Cardinal.mk.{u3} (coeSort.{succ u3, succ (succ u3)} (Set.{u3} α) Type.{u3} (Set.hasCoeToSort.{u3} α) s))) (Cardinal.lift.{u3, u4} (Cardinal.mk.{u4} M))) -> (FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.hasUnion.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s)))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : Nonempty.{succ u4} M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_3 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_2 T], (LE.le.{max (succ u3) (succ u4)} Cardinal.{max u3 u4} Cardinal.instLECardinal.{max u3 u4} (Cardinal.lift.{u4, u3} (Cardinal.mk.{u3} (Set.Elem.{u3} α s))) (Cardinal.lift.{u3, u4} (Cardinal.mk.{u4} M))) -> (FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u2) u3} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instUnionSet.{max (max u1 u2) u3} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s)))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_leₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
@@ -162,6 +192,12 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s
   exact model.is_satisfiable M
 #align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_card_le FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_card_le
 
+/- warning: first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite -> FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infinite is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_1 T] [_inst_3 : Infinite.{succ u4} M], FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.hasUnion.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} (T : FirstOrder.Language.Theory.{u1, u2} L) (s : Set.{u3} α) (M : Type.{u4}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u4} L M _inst_1 T] [_inst_3 : Infinite.{succ u4} M], FirstOrder.Language.Theory.IsSatisfiable.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (Union.union.{max (max u1 u2) u3} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instUnionSet.{max (max u1 u2) u3} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))) (FirstOrder.Language.LHom.onTheory.{u1, u2, max u1 u3, u2} L (FirstOrder.Language.withConstants.{u1, u2, u3} L α) (FirstOrder.Language.lhomWithConstants.{u1, u2, u3} L α) T) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α s))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_union_distinct_constants_theory_of_infinite FirstOrder.Language.Theory.isSatisfiable_union_distinctConstantsTheory_of_infiniteₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
@@ -180,6 +216,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.exists_large_model_of_infinite_model /-
 /-- Any theory with an infinite model has arbitrarily large models. -/
 theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w}) (M : Type w')
     [L.Structure M] [M ⊨ T] [Infinite M] :
@@ -195,7 +232,14 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
   refine' (card_le_of_model_distinct_constants_theory L Set.univ N).trans (lift_le.1 _)
   rw [lift_lift]
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
+-/
 
+/- warning: first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset -> FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {ι : Type.{u3}} (T : ι -> (FirstOrder.Language.Theory.{u1, u2} L)), Iff (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => T i))) (forall (s : Finset.{u3} ι), FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Set.iUnion.{max u1 u2, succ u3} (FirstOrder.Language.Sentence.{u1, u2} L) ι (fun (i : ι) => Set.iUnion.{max u1 u2, 0} (FirstOrder.Language.Sentence.{u1, u2} L) (Membership.Mem.{u3, u3} ι (Finset.{u3} ι) (Finset.hasMem.{u3} ι) i s) (fun (H : Membership.Mem.{u3, u3} ι (Finset.{u3} ι) (Finset.hasMem.{u3} ι) i s) => T i))))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {ι : Type.{u1}} (T : ι -> (FirstOrder.Language.Theory.{u2, u3} L)), Iff (FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => T i))) (forall (s : Finset.{u1} ι), FirstOrder.Language.Theory.IsSatisfiable.{u2, u3} L (Set.iUnion.{max u3 u2, succ u1} (FirstOrder.Language.Sentence.{u2, u3} L) ι (fun (i : ι) => Set.iUnion.{max u3 u2, 0} (FirstOrder.Language.Sentence.{u2, u3} L) (Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) (fun (H : Membership.mem.{u1, u1} ι (Finset.{u1} ι) (Finset.instMembershipFinset.{u1} ι) i s) => T i))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finsetₓ'. -/
 theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
@@ -217,6 +261,7 @@ end Theory
 
 variable (L)
 
+#print FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_le /-
 /-- A version of The Downward Löwenheim–Skolem theorem where the structure `N` elementarily embeds
 into `M`, but is not by type a substructure of `M`, and thus can be chosen to belong to the universe
 of the cardinal `κ`.
@@ -237,8 +282,10 @@ theorem exists_elementaryEmbedding_card_eq_of_le (M : Type w') [L.Structure M] [
       lift_inj.1 (trans _ hS)⟩
   simp only [Equiv.bundledInduced_α, lift_mk_shrink']
 #align first_order.language.exists_elementary_embedding_card_eq_of_le FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_le
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_ge /-
 /-- The Upward Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the cardinalities of `L`
 and an infinite `L`-structure `M`, then `M` has an elementary extension of cardinality `κ`. -/
 theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [iM : Infinite M]
@@ -263,7 +310,9 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
     exact ⟨h2, h1⟩
   · rw [← lift_umax', lift_id]
 #align first_order.language.exists_elementary_embedding_card_eq_of_ge FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_ge
+-/
 
+#print FirstOrder.Language.exists_elementaryEmbedding_card_eq /-
 /-- The Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the cardinalities of `L`
 and an infinite `L`-structure `M`, then there is an elementary embedding in the appropriate
 direction between then `M` and a structure of cardinality `κ`. -/
@@ -277,7 +326,9 @@ theorem exists_elementaryEmbedding_card_eq (M : Type w') [L.Structure M] [iM : I
   · obtain ⟨N, hN1, hN2⟩ := exists_elementary_embedding_card_eq_of_ge L M κ h2 (le_of_lt h)
     exact ⟨N, Or.inr hN1, hN2⟩
 #align first_order.language.exists_elementary_embedding_card_eq FirstOrder.Language.exists_elementaryEmbedding_card_eq
+-/
 
+#print FirstOrder.Language.exists_elementarilyEquivalent_card_eq /-
 /-- A consequence of the Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the
 cardinalities of `L` and an infinite `L`-structure `M`, then there is a structure of cardinality `κ`
 elementarily equivalent to `M`. -/
@@ -289,11 +340,13 @@ theorem exists_elementarilyEquivalent_card_eq (M : Type w') [L.Structure M] [Inf
   · exact ⟨N, NM.some.elementarily_equivalent.symm, hNκ⟩
   · exact ⟨N, MN.some.elementarily_equivalent, hNκ⟩
 #align first_order.language.exists_elementarily_equivalent_card_eq FirstOrder.Language.exists_elementarilyEquivalent_card_eq
+-/
 
 variable {L}
 
 namespace Theory
 
+#print FirstOrder.Language.Theory.exists_model_card_eq /-
 theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite M) (κ : Cardinal.{w})
     (h1 : ℵ₀ ≤ κ) (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
     ∃ N : ModelType.{u, v, w} T, (#N) = κ :=
@@ -303,14 +356,17 @@ theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite
   haveI : Nonempty N := hN.nonempty
   exact ⟨hN.Theory_model.bundled, rfl⟩
 #align first_order.language.Theory.exists_model_card_eq FirstOrder.Language.Theory.exists_model_card_eq
+-/
 
 variable (T)
 
+#print FirstOrder.Language.Theory.ModelsBoundedFormula /-
 /-- A theory models a (bounded) formula when any of its nonempty models realizes that formula on all
   inputs.-/
 def ModelsBoundedFormula (φ : L.BoundedFormula α n) : Prop :=
   ∀ (M : ModelType.{u, v, max u v} T) (v : α → M) (xs : Fin n → M), φ.realize v xs
 #align first_order.language.Theory.models_bounded_formula FirstOrder.Language.Theory.ModelsBoundedFormula
+-/
 
 -- mathport name: models_bounded_formula
 infixl:51
@@ -320,22 +376,34 @@ infixl:51
 variable {T}
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.models_formula_iff /-
 theorem models_formula_iff {φ : L.Formula α} :
     T ⊨ φ ↔ ∀ (M : ModelType.{u, v, max u v} T) (v : α → M), φ.realize v :=
   forall_congr' fun M => forall_congr' fun v => Unique.forall_iff
 #align first_order.language.Theory.models_formula_iff FirstOrder.Language.Theory.models_formula_iff
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.models_sentence_iff /-
 theorem models_sentence_iff {φ : L.Sentence} : T ⊨ φ ↔ ∀ M : ModelType.{u, v, max u v} T, M ⊨ φ :=
   models_formula_iff.trans (forall_congr' fun M => Unique.forall_iff)
 #align first_order.language.Theory.models_sentence_iff FirstOrder.Language.Theory.models_sentence_iff
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.models_sentence_of_mem /-
 theorem models_sentence_of_mem {φ : L.Sentence} (h : φ ∈ T) : T ⊨ φ :=
   models_sentence_iff.2 fun _ => realize_sentence_of_mem T h
 #align first_order.language.Theory.models_sentence_of_mem FirstOrder.Language.Theory.models_sentence_of_mem
+-/
 
+/- warning: first_order.language.Theory.models_iff_not_satisfiable -> FirstOrder.Language.Theory.models_iff_not_satisfiable is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} (φ : FirstOrder.Language.Sentence.{u1, u2} L), Iff (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ) (Not (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Union.union.{max u1 u2} (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasUnion.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) T (Singleton.singleton.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasSingleton.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) (FirstOrder.Language.Formula.not.{u1, u2, 0} L Empty φ)))))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} (φ : FirstOrder.Language.Sentence.{u1, u2} L), Iff (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ) (Not (FirstOrder.Language.Theory.IsSatisfiable.{u1, u2} L (Union.union.{max u2 u1} (FirstOrder.Language.Theory.{u1, u2} L) (Set.instUnionSet.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) T (Singleton.singleton.{max u1 u2, max u1 u2} (FirstOrder.Language.Formula.{u1, u2, 0} L Empty) (FirstOrder.Language.Theory.{u1, u2} L) (Set.instSingletonSet.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) (FirstOrder.Language.Formula.not.{u1, u2, 0} L Empty φ)))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiableₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfiable (T ∪ {φ.Not}) :=
   by
@@ -356,6 +424,12 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ φ ↔ ¬IsSatisfia
   exact h
 #align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiable
 
+/- warning: first_order.language.Theory.models_bounded_formula.realize_sentence -> FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L} {φ : FirstOrder.Language.Sentence.{u1, u2} L}, (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ) -> (forall (M : Type.{u3}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u3} L M _inst_1 T] [_inst_3 : Nonempty.{succ u3} M], FirstOrder.Language.Sentence.Realize.{u1, u2, u3} L M _inst_1 φ)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {T : FirstOrder.Language.Theory.{u2, u3} L} {φ : FirstOrder.Language.Sentence.{u2, u3} L}, (FirstOrder.Language.Theory.ModelsBoundedFormula.{u2, u3, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ) -> (forall (M : Type.{u1}) [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u1} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u2, u3, u1} L M _inst_1 T] [_inst_3 : Nonempty.{succ u1} M], FirstOrder.Language.Sentence.Realize.{u2, u3, u1} L M _inst_1 φ)
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.models_bounded_formula.realize_sentence FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentenceₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -376,15 +450,18 @@ theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ φ) (
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.IsComplete /-
 /-- A theory is complete when it is satisfiable and models each sentence or its negation. -/
 def IsComplete (T : L.Theory) : Prop :=
   T.IsSatisfiable ∧ ∀ φ : L.Sentence, T ⊨ φ ∨ T ⊨ φ.Not
 #align first_order.language.Theory.is_complete FirstOrder.Language.Theory.IsComplete
+-/
 
 namespace IsComplete
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.IsComplete.models_not_iff /-
 theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ φ.Not ↔ ¬T ⊨ φ :=
   by
   cases' h.2 φ with hφ hφn
@@ -398,7 +475,14 @@ theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ φ.Not ↔ 
     rw [models_sentence_iff] at *
     exact hφn h.1.some (hφ _)
 #align first_order.language.Theory.is_complete.models_not_iff FirstOrder.Language.Theory.IsComplete.models_not_iff
+-/
 
+/- warning: first_order.language.Theory.is_complete.realize_sentence_iff -> FirstOrder.Language.Theory.IsComplete.realize_sentence_iff is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {T : FirstOrder.Language.Theory.{u1, u2} L}, (FirstOrder.Language.Theory.IsComplete.{u1, u2} L T) -> (forall (φ : FirstOrder.Language.Sentence.{u1, u2} L) (M : Type.{u3}) [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u1, u2, u3} L M _inst_1 T] [_inst_3 : Nonempty.{succ u3} M], Iff (FirstOrder.Language.Sentence.Realize.{u1, u2, u3} L M _inst_1 φ) (FirstOrder.Language.Theory.ModelsBoundedFormula.{u1, u2, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) φ))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {T : FirstOrder.Language.Theory.{u2, u3} L}, (FirstOrder.Language.Theory.IsComplete.{u2, u3} L T) -> (forall (φ : FirstOrder.Language.Sentence.{u2, u3} L) (M : Type.{u1}) [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u1} L M] [_inst_2 : FirstOrder.Language.Theory.Model.{u2, u3, u1} L M _inst_1 T] [_inst_3 : Nonempty.{succ u1} M], Iff (FirstOrder.Language.Sentence.Realize.{u2, u3, u1} L M _inst_1 φ) (FirstOrder.Language.Theory.ModelsBoundedFormula.{u2, u3, 0} L T Empty (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) φ))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Theory.is_complete.realize_sentence_iff FirstOrder.Language.Theory.IsComplete.realize_sentence_iffₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -415,49 +499,64 @@ theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type _) [
 
 end IsComplete
 
+#print FirstOrder.Language.Theory.IsMaximal /-
 /-- A theory is maximal when it is satisfiable and contains each sentence or its negation.
   Maximal theories are complete. -/
 def IsMaximal (T : L.Theory) : Prop :=
   T.IsSatisfiable ∧ ∀ φ : L.Sentence, φ ∈ T ∨ φ.Not ∈ T
 #align first_order.language.Theory.is_maximal FirstOrder.Language.Theory.IsMaximal
+-/
 
+#print FirstOrder.Language.Theory.IsMaximal.isComplete /-
 theorem IsMaximal.isComplete (h : T.IsMaximal) : T.IsComplete :=
   h.imp_right (forall_imp fun _ => Or.imp models_sentence_of_mem models_sentence_of_mem)
 #align first_order.language.Theory.is_maximal.is_complete FirstOrder.Language.Theory.IsMaximal.isComplete
+-/
 
+#print FirstOrder.Language.Theory.IsMaximal.mem_or_not_mem /-
 theorem IsMaximal.mem_or_not_mem (h : T.IsMaximal) (φ : L.Sentence) : φ ∈ T ∨ φ.Not ∈ T :=
   h.2 φ
 #align first_order.language.Theory.is_maximal.mem_or_not_mem FirstOrder.Language.Theory.IsMaximal.mem_or_not_mem
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.IsMaximal.mem_of_models /-
 theorem IsMaximal.mem_of_models (h : T.IsMaximal) {φ : L.Sentence} (hφ : T ⊨ φ) : φ ∈ T :=
   by
   refine' (h.mem_or_not_mem φ).resolve_right fun con => _
   rw [models_iff_not_satisfiable, Set.union_singleton, Set.insert_eq_of_mem Con] at hφ
   exact hφ h.1
 #align first_order.language.Theory.is_maximal.mem_of_models FirstOrder.Language.Theory.IsMaximal.mem_of_models
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.IsMaximal.mem_iff_models /-
 theorem IsMaximal.mem_iff_models (h : T.IsMaximal) (φ : L.Sentence) : φ ∈ T ↔ T ⊨ φ :=
   ⟨models_sentence_of_mem, h.mem_of_models⟩
 #align first_order.language.Theory.is_maximal.mem_iff_models FirstOrder.Language.Theory.IsMaximal.mem_iff_models
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.Theory.SemanticallyEquivalent /-
 /-- Two (bounded) formulas are semantically equivalent over a theory `T` when they have the same
 interpretation in every model of `T`. (This is also known as logical equivalence, which also has a
 proof-theoretic definition.) -/
 def SemanticallyEquivalent (T : L.Theory) (φ ψ : L.BoundedFormula α n) : Prop :=
   T ⊨ φ.Iff ψ
 #align first_order.language.Theory.semantically_equivalent FirstOrder.Language.Theory.SemanticallyEquivalent
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.refl /-
 @[refl]
 theorem SemanticallyEquivalent.refl (φ : L.BoundedFormula α n) : T.SemanticallyEquivalent φ φ :=
   fun M v xs => by rw [bounded_formula.realize_iff]
 #align first_order.language.Theory.semantically_equivalent.refl FirstOrder.Language.Theory.SemanticallyEquivalent.refl
+-/
 
 instance : IsRefl (L.BoundedFormula α n) T.SemanticallyEquivalent :=
   ⟨SemanticallyEquivalent.refl⟩
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.symm /-
 @[symm]
 theorem SemanticallyEquivalent.symm {φ ψ : L.BoundedFormula α n}
     (h : T.SemanticallyEquivalent φ ψ) : T.SemanticallyEquivalent ψ φ := fun M v xs =>
@@ -465,7 +564,9 @@ theorem SemanticallyEquivalent.symm {φ ψ : L.BoundedFormula α n}
   rw [bounded_formula.realize_iff, Iff.comm, ← bounded_formula.realize_iff]
   exact h M v xs
 #align first_order.language.Theory.semantically_equivalent.symm FirstOrder.Language.Theory.SemanticallyEquivalent.symm
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.trans /-
 @[trans]
 theorem SemanticallyEquivalent.trans {φ ψ θ : L.BoundedFormula α n}
     (h1 : T.SemanticallyEquivalent φ ψ) (h2 : T.SemanticallyEquivalent ψ θ) :
@@ -476,26 +577,34 @@ theorem SemanticallyEquivalent.trans {φ ψ θ : L.BoundedFormula α n}
   rw [bounded_formula.realize_iff] at *
   exact ⟨h2'.1 ∘ h1'.1, h1'.2 ∘ h2'.2⟩
 #align first_order.language.Theory.semantically_equivalent.trans FirstOrder.Language.Theory.SemanticallyEquivalent.trans
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.realize_bd_iff /-
 theorem SemanticallyEquivalent.realize_bd_iff {φ ψ : L.BoundedFormula α n} {M : Type max u v}
     [ne : Nonempty M] [str : L.Structure M] [hM : T.Model M] (h : T.SemanticallyEquivalent φ ψ)
     {v : α → M} {xs : Fin n → M} : φ.realize v xs ↔ ψ.realize v xs :=
   BoundedFormula.realize_iff.1 (h (ModelType.of T M) v xs)
 #align first_order.language.Theory.semantically_equivalent.realize_bd_iff FirstOrder.Language.Theory.SemanticallyEquivalent.realize_bd_iff
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.realize_iff /-
 theorem SemanticallyEquivalent.realize_iff {φ ψ : L.Formula α} {M : Type max u v} [ne : Nonempty M]
     [str : L.Structure M] (hM : T.Model M) (h : T.SemanticallyEquivalent φ ψ) {v : α → M} :
     φ.realize v ↔ ψ.realize v :=
   h.realize_bd_iff
 #align first_order.language.Theory.semantically_equivalent.realize_iff FirstOrder.Language.Theory.SemanticallyEquivalent.realize_iff
+-/
 
+#print FirstOrder.Language.Theory.semanticallyEquivalentSetoid /-
 /-- Semantic equivalence forms an equivalence relation on formulas. -/
 def semanticallyEquivalentSetoid (T : L.Theory) : Setoid (L.BoundedFormula α n)
     where
   R := SemanticallyEquivalent T
   iseqv := ⟨fun _ => refl _, fun a b h => h.symm, fun _ _ _ h1 h2 => h1.trans h2⟩
 #align first_order.language.Theory.semantically_equivalent_setoid FirstOrder.Language.Theory.semanticallyEquivalentSetoid
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.all /-
 protected theorem SemanticallyEquivalent.all {φ ψ : L.BoundedFormula α (n + 1)}
     (h : T.SemanticallyEquivalent φ ψ) : T.SemanticallyEquivalent φ.all ψ.all :=
   by
@@ -503,7 +612,9 @@ protected theorem SemanticallyEquivalent.all {φ ψ : L.BoundedFormula α (n + 1
     bounded_formula.realize_all]
   exact fun M v xs => forall_congr' fun a => h.realize_bd_iff
 #align first_order.language.Theory.semantically_equivalent.all FirstOrder.Language.Theory.SemanticallyEquivalent.all
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.ex /-
 protected theorem SemanticallyEquivalent.ex {φ ψ : L.BoundedFormula α (n + 1)}
     (h : T.SemanticallyEquivalent φ ψ) : T.SemanticallyEquivalent φ.ex ψ.ex :=
   by
@@ -511,7 +622,9 @@ protected theorem SemanticallyEquivalent.ex {φ ψ : L.BoundedFormula α (n + 1)
     bounded_formula.realize_ex]
   exact fun M v xs => exists_congr fun a => h.realize_bd_iff
 #align first_order.language.Theory.semantically_equivalent.ex FirstOrder.Language.Theory.SemanticallyEquivalent.ex
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.not /-
 protected theorem SemanticallyEquivalent.not {φ ψ : L.BoundedFormula α n}
     (h : T.SemanticallyEquivalent φ ψ) : T.SemanticallyEquivalent φ.Not ψ.Not :=
   by
@@ -519,7 +632,9 @@ protected theorem SemanticallyEquivalent.not {φ ψ : L.BoundedFormula α n}
     bounded_formula.realize_not]
   exact fun M v xs => not_congr h.realize_bd_iff
 #align first_order.language.Theory.semantically_equivalent.not FirstOrder.Language.Theory.SemanticallyEquivalent.not
+-/
 
+#print FirstOrder.Language.Theory.SemanticallyEquivalent.imp /-
 protected theorem SemanticallyEquivalent.imp {φ ψ φ' ψ' : L.BoundedFormula α n}
     (h : T.SemanticallyEquivalent φ ψ) (h' : T.SemanticallyEquivalent φ' ψ') :
     T.SemanticallyEquivalent (φ.imp φ') (ψ.imp ψ') :=
@@ -528,6 +643,7 @@ protected theorem SemanticallyEquivalent.imp {φ ψ φ' ψ' : L.BoundedFormula 
     bounded_formula.realize_imp]
   exact fun M v xs => imp_congr h.realize_bd_iff h'.realize_bd_iff
 #align first_order.language.Theory.semantically_equivalent.imp FirstOrder.Language.Theory.SemanticallyEquivalent.imp
+-/
 
 end Theory
 
@@ -535,21 +651,29 @@ namespace CompleteTheory
 
 variable (L) (M : Type w) [L.Structure M]
 
+#print FirstOrder.Language.completeTheory.isSatisfiable /-
 theorem isSatisfiable [Nonempty M] : (L.completeTheory M).IsSatisfiable :=
   Theory.Model.isSatisfiable M
 #align first_order.language.complete_theory.is_satisfiable FirstOrder.Language.completeTheory.isSatisfiable
+-/
 
+#print FirstOrder.Language.completeTheory.mem_or_not_mem /-
 theorem mem_or_not_mem (φ : L.Sentence) : φ ∈ L.completeTheory M ∨ φ.Not ∈ L.completeTheory M := by
   simp_rw [complete_theory, Set.mem_setOf_eq, sentence.realize, formula.realize_not, or_not]
 #align first_order.language.complete_theory.mem_or_not_mem FirstOrder.Language.completeTheory.mem_or_not_mem
+-/
 
+#print FirstOrder.Language.completeTheory.isMaximal /-
 theorem isMaximal [Nonempty M] : (L.completeTheory M).IsMaximal :=
   ⟨isSatisfiable L M, mem_or_not_mem L M⟩
 #align first_order.language.complete_theory.is_maximal FirstOrder.Language.completeTheory.isMaximal
+-/
 
+#print FirstOrder.Language.completeTheory.isComplete /-
 theorem isComplete [Nonempty M] : (L.completeTheory M).IsComplete :=
   (completeTheory.isMaximal L M).IsComplete
 #align first_order.language.complete_theory.is_complete FirstOrder.Language.completeTheory.isComplete
+-/
 
 end CompleteTheory
 
@@ -557,36 +681,50 @@ namespace BoundedFormula
 
 variable (φ ψ : L.BoundedFormula α n)
 
+#print FirstOrder.Language.BoundedFormula.semanticallyEquivalent_not_not /-
 theorem semanticallyEquivalent_not_not : T.SemanticallyEquivalent φ φ.Not.Not := fun M v xs => by
   simp
 #align first_order.language.bounded_formula.semantically_equivalent_not_not FirstOrder.Language.BoundedFormula.semanticallyEquivalent_not_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.imp_semanticallyEquivalent_not_sup /-
 theorem imp_semanticallyEquivalent_not_sup : T.SemanticallyEquivalent (φ.imp ψ) (φ.Not ⊔ ψ) :=
   fun M v xs => by simp [imp_iff_not_or]
 #align first_order.language.bounded_formula.imp_semantically_equivalent_not_sup FirstOrder.Language.BoundedFormula.imp_semanticallyEquivalent_not_sup
+-/
 
+#print FirstOrder.Language.BoundedFormula.sup_semanticallyEquivalent_not_inf_not /-
 theorem sup_semanticallyEquivalent_not_inf_not :
     T.SemanticallyEquivalent (φ ⊔ ψ) (φ.Not ⊓ ψ.Not).Not := fun M v xs => by simp [imp_iff_not_or]
 #align first_order.language.bounded_formula.sup_semantically_equivalent_not_inf_not FirstOrder.Language.BoundedFormula.sup_semanticallyEquivalent_not_inf_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.inf_semanticallyEquivalent_not_sup_not /-
 theorem inf_semanticallyEquivalent_not_sup_not :
     T.SemanticallyEquivalent (φ ⊓ ψ) (φ.Not ⊔ ψ.Not).Not := fun M v xs => by
   simp [and_iff_not_or_not]
 #align first_order.language.bounded_formula.inf_semantically_equivalent_not_sup_not FirstOrder.Language.BoundedFormula.inf_semanticallyEquivalent_not_sup_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.all_semanticallyEquivalent_not_ex_not /-
 theorem all_semanticallyEquivalent_not_ex_not (φ : L.BoundedFormula α (n + 1)) :
     T.SemanticallyEquivalent φ.all φ.Not.ex.Not := fun M v xs => by simp
 #align first_order.language.bounded_formula.all_semantically_equivalent_not_ex_not FirstOrder.Language.BoundedFormula.all_semanticallyEquivalent_not_ex_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.ex_semanticallyEquivalent_not_all_not /-
 theorem ex_semanticallyEquivalent_not_all_not (φ : L.BoundedFormula α (n + 1)) :
     T.SemanticallyEquivalent φ.ex φ.Not.all.Not := fun M v xs => by simp
 #align first_order.language.bounded_formula.ex_semantically_equivalent_not_all_not FirstOrder.Language.BoundedFormula.ex_semanticallyEquivalent_not_all_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt /-
 theorem semanticallyEquivalent_all_liftAt : T.SemanticallyEquivalent φ (φ.liftAt 1 n).all :=
   fun M v xs => by
   skip
   rw [realize_iff, realize_all_lift_at_one_self]
 #align first_order.language.bounded_formula.semantically_equivalent_all_lift_at FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt
+-/
 
 end BoundedFormula
 
@@ -594,28 +732,37 @@ namespace Formula
 
 variable (φ ψ : L.Formula α)
 
+#print FirstOrder.Language.Formula.semanticallyEquivalent_not_not /-
 theorem semanticallyEquivalent_not_not : T.SemanticallyEquivalent φ φ.Not.Not :=
   φ.semanticallyEquivalent_not_not
 #align first_order.language.formula.semantically_equivalent_not_not FirstOrder.Language.Formula.semanticallyEquivalent_not_not
+-/
 
+#print FirstOrder.Language.Formula.imp_semanticallyEquivalent_not_sup /-
 theorem imp_semanticallyEquivalent_not_sup : T.SemanticallyEquivalent (φ.imp ψ) (φ.Not ⊔ ψ) :=
   φ.imp_semanticallyEquivalent_not_sup ψ
 #align first_order.language.formula.imp_semantically_equivalent_not_sup FirstOrder.Language.Formula.imp_semanticallyEquivalent_not_sup
+-/
 
+#print FirstOrder.Language.Formula.sup_semanticallyEquivalent_not_inf_not /-
 theorem sup_semanticallyEquivalent_not_inf_not :
     T.SemanticallyEquivalent (φ ⊔ ψ) (φ.Not ⊓ ψ.Not).Not :=
   φ.sup_semanticallyEquivalent_not_inf_not ψ
 #align first_order.language.formula.sup_semantically_equivalent_not_inf_not FirstOrder.Language.Formula.sup_semanticallyEquivalent_not_inf_not
+-/
 
+#print FirstOrder.Language.Formula.inf_semanticallyEquivalent_not_sup_not /-
 theorem inf_semanticallyEquivalent_not_sup_not :
     T.SemanticallyEquivalent (φ ⊓ ψ) (φ.Not ⊔ ψ.Not).Not :=
   φ.inf_semanticallyEquivalent_not_sup_not ψ
 #align first_order.language.formula.inf_semantically_equivalent_not_sup_not FirstOrder.Language.Formula.inf_semanticallyEquivalent_not_sup_not
+-/
 
 end Formula
 
 namespace BoundedFormula
 
+#print FirstOrder.Language.BoundedFormula.IsQF.induction_on_sup_not /-
 theorem IsQF.induction_on_sup_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
     (h : IsQF φ) (hf : P (⊥ : L.BoundedFormula α n))
     (ha : ∀ ψ : L.BoundedFormula α n, IsAtomic ψ → P ψ)
@@ -626,7 +773,9 @@ theorem IsQF.induction_on_sup_not {P : L.BoundedFormula α n → Prop} {φ : L.B
   IsQF.rec_on h hf ha fun φ₁ φ₂ _ _ h1 h2 =>
     (hse (φ₁.imp_semanticallyEquivalent_not_sup φ₂)).2 (hsup (hnot h1) h2)
 #align first_order.language.bounded_formula.is_qf.induction_on_sup_not FirstOrder.Language.BoundedFormula.IsQF.induction_on_sup_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.IsQF.induction_on_inf_not /-
 theorem IsQF.induction_on_inf_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
     (h : IsQF φ) (hf : P (⊥ : L.BoundedFormula α n))
     (ha : ∀ ψ : L.BoundedFormula α n, IsAtomic ψ → P ψ)
@@ -639,12 +788,16 @@ theorem IsQF.induction_on_inf_not {P : L.BoundedFormula α n → Prop} {φ : L.B
       (hse (φ₁.sup_semanticallyEquivalent_not_inf_not φ₂)).2 (hnot (hinf (hnot h1) (hnot h2))))
     (fun _ => hnot) fun _ _ => hse
 #align first_order.language.bounded_formula.is_qf.induction_on_inf_not FirstOrder.Language.BoundedFormula.IsQF.induction_on_inf_not
+-/
 
+#print FirstOrder.Language.BoundedFormula.semanticallyEquivalent_toPrenex /-
 theorem semanticallyEquivalent_toPrenex (φ : L.BoundedFormula α n) :
     (∅ : L.Theory).SemanticallyEquivalent φ φ.toPrenex := fun M v xs => by
   rw [realize_iff, realize_to_prenex]
 #align first_order.language.bounded_formula.semantically_equivalent_to_prenex FirstOrder.Language.BoundedFormula.semanticallyEquivalent_toPrenex
+-/
 
+#print FirstOrder.Language.BoundedFormula.induction_on_all_ex /-
 theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ : L.BoundedFormula α n)
     (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQF ψ → P ψ)
     (hall : ∀ {m} {ψ : L.BoundedFormula α (m + 1)} (h : P ψ), P ψ.all)
@@ -661,7 +814,9 @@ theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ :
   · exact hall hφ
   · exact hex hφ
 #align first_order.language.bounded_formula.induction_on_all_ex FirstOrder.Language.BoundedFormula.induction_on_all_ex
+-/
 
+#print FirstOrder.Language.BoundedFormula.induction_on_exists_not /-
 theorem induction_on_exists_not {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ : L.BoundedFormula α n)
     (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQF ψ → P ψ)
     (hnot : ∀ {m} {φ : L.BoundedFormula α m} (h : P φ), P φ.Not)
@@ -674,6 +829,7 @@ theorem induction_on_exists_not {P : ∀ {m}, L.BoundedFormula α m → Prop} (
     (fun _ φ hφ => (hse φ.all_semanticallyEquivalent_not_ex_not).2 (hnot (hex (hnot hφ))))
     (fun _ _ => hex) fun _ _ _ => hse
 #align first_order.language.bounded_formula.induction_on_exists_not FirstOrder.Language.BoundedFormula.induction_on_exists_not
+-/
 
 end BoundedFormula
 
@@ -687,11 +843,14 @@ open FirstOrder FirstOrder.Language
 
 variable {L : Language.{u, v}} (κ : Cardinal.{w}) (T : L.Theory)
 
+#print Cardinal.Categorical /-
 /-- A theory is `κ`-categorical if all models of size `κ` are isomorphic. -/
 def Categorical : Prop :=
   ∀ M N : T.ModelType, (#M) = κ → (#N) = κ → Nonempty (M ≃[L] N)
 #align cardinal.categorical Cardinal.Categorical
+-/
 
+#print Cardinal.Categorical.isComplete /-
 /-- The Łoś–Vaught Test : a criterion for categorical theories to be complete. -/
 theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) (hS : T.IsSatisfiable)
@@ -715,16 +874,21 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
             ((TF.realize_sentence φ).trans (MNF.realize_sentence φ).symm)).1
         hMT⟩
 #align cardinal.categorical.is_complete Cardinal.Categorical.isComplete
+-/
 
+#print Cardinal.empty_theory_categorical /-
 theorem empty_theory_categorical (T : Language.empty.Theory) : κ.Categorical T := fun M N hM hN =>
   by rw [empty.nonempty_equiv_iff, hM, hN]
 #align cardinal.empty_Theory_categorical Cardinal.empty_theory_categorical
+-/
 
+#print Cardinal.empty_infinite_Theory_isComplete /-
 theorem empty_infinite_Theory_isComplete : Language.empty.infiniteTheory.IsComplete :=
   (empty_theory_categorical ℵ₀ _).IsComplete ℵ₀ _ le_rfl (by simp)
     ⟨Theory.Model.bundled ((model_infiniteTheory_iff Language.empty).2 Nat.infinite)⟩ fun M =>
     (model_infiniteTheory_iff Language.empty).1 M.is_model
 #align cardinal.empty_infinite_Theory_is_complete Cardinal.empty_infinite_Theory_isComplete
+-/
 
 end Cardinal
 
Diff
@@ -132,7 +132,7 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
 theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι → L.Theory}
     (h : Directed (· ⊆ ·) T) : Theory.IsSatisfiable (⋃ i, T i) ↔ ∀ i, (T i).IsSatisfiable :=
   by
-  refine' ⟨fun h' i => h'.mono (Set.subset_unionᵢ _ _), fun h' => _⟩
+  refine' ⟨fun h' i => h'.mono (Set.subset_iUnion _ _), fun h' => _⟩
   rw [is_satisfiable_iff_is_finitely_satisfiable, is_finitely_satisfiable]
   intro T0 hT0
   obtain ⟨i, hi⟩ := h.exists_mem_subset_of_finset_subset_bUnion hT0
@@ -167,7 +167,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
     (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
   classical
-    rw [distinct_constants_theory_eq_Union, Set.union_unionᵢ, is_satisfiable_directed_union_iff]
+    rw [distinct_constants_theory_eq_Union, Set.union_iUnion, is_satisfiable_directed_union_iff]
     ·
       exact fun t =>
         is_satisfiable_union_distinct_constants_theory_of_card_le T _ M
@@ -196,22 +196,22 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
   rw [lift_lift]
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
 
-theorem isSatisfiable_unionᵢ_iff_isSatisfiable_unionᵢ_finset {ι : Type _} (T : ι → L.Theory) :
+theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
     refine'
-      ⟨fun h s => h.mono (Set.unionᵢ_mono fun _ => Set.unionᵢ_subset_iff.2 fun _ => refl _),
+      ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _),
         fun h => _⟩
     rw [is_satisfiable_iff_is_finitely_satisfiable]
     intro s hs
-    rw [Set.unionᵢ_eq_unionᵢ_finset] at hs
-    obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_bunionᵢ _ hs
+    rw [Set.iUnion_eq_iUnion_finset] at hs
+    obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion _ hs
     · exact (h t).mono ht
     ·
       exact
         Monotone.directed_le fun t1 t2 h =>
-          Set.unionᵢ_mono fun _ => Set.unionᵢ_mono' fun h1 => ⟨h h1, refl _⟩
-#align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_unionᵢ_iff_isSatisfiable_unionᵢ_finset
+          Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
+#align first_order.language.Theory.is_satisfiable_Union_iff_is_satisfiable_Union_finset FirstOrder.Language.Theory.isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset
 
 end Theory
 
Diff
@@ -63,7 +63,7 @@ variable (T)
 
 /-- A theory is satisfiable if a structure models it. -/
 def IsSatisfiable : Prop :=
-  Nonempty (ModelCat.{u, v, max u v} T)
+  Nonempty (ModelType.{u, v, max u v} T)
 #align first_order.language.Theory.is_satisfiable FirstOrder.Language.Theory.IsSatisfiable
 
 /-- A theory is finitely satisfiable if all of its finite subtheories are satisfiable. -/
@@ -76,11 +76,11 @@ variable {T} {T' : L.Theory}
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem Model.isSatisfiable (M : Type w) [n : Nonempty M] [S : L.Structure M] [M ⊨ T] :
     T.IsSatisfiable :=
-  ⟨((⊥ : Substructure _ (ModelCat.of T M)).elementarySkolem₁Reduct.toModel T).Shrink⟩
+  ⟨((⊥ : Substructure _ (ModelType.of T M)).elementarySkolem₁Reduct.toModel T).Shrink⟩
 #align first_order.language.Theory.model.is_satisfiable FirstOrder.Language.Theory.Model.isSatisfiable
 
 theorem IsSatisfiable.mono (h : T'.IsSatisfiable) (hs : T ⊆ T') : T.IsSatisfiable :=
-  ⟨(Theory.Model.mono (ModelCat.is_model h.some) hs).Bundled⟩
+  ⟨(Theory.Model.mono (ModelType.is_model h.some) hs).Bundled⟩
 #align first_order.language.Theory.is_satisfiable.mono FirstOrder.Language.Theory.IsSatisfiable.mono
 
 theorem isSatisfiable_empty (L : Language.{u, v}) : IsSatisfiable (∅ : L.Theory) :=
@@ -183,7 +183,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
 /-- Any theory with an infinite model has arbitrarily large models. -/
 theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w}) (M : Type w')
     [L.Structure M] [M ⊨ T] [Infinite M] :
-    ∃ N : ModelCat.{_, _, max u v w} T, Cardinal.lift.{max u v w} κ ≤ (#N) :=
+    ∃ N : ModelType.{_, _, max u v w} T, Cardinal.lift.{max u v w} κ ≤ (#N) :=
   by
   obtain ⟨N⟩ :=
     is_satisfiable_union_distinct_constants_theory_of_infinite T (Set.univ : Set κ.out) M
@@ -294,9 +294,9 @@ variable {L}
 
 namespace Theory
 
-theorem exists_model_card_eq (h : ∃ M : ModelCat.{u, v, max u v} T, Infinite M) (κ : Cardinal.{w})
+theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite M) (κ : Cardinal.{w})
     (h1 : ℵ₀ ≤ κ) (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
-    ∃ N : ModelCat.{u, v, w} T, (#N) = κ :=
+    ∃ N : ModelType.{u, v, w} T, (#N) = κ :=
   by
   cases' h with M MI
   obtain ⟨N, hN, rfl⟩ := exists_elementarily_equivalent_card_eq L M κ h1 h2
@@ -309,7 +309,7 @@ variable (T)
 /-- A theory models a (bounded) formula when any of its nonempty models realizes that formula on all
   inputs.-/
 def ModelsBoundedFormula (φ : L.BoundedFormula α n) : Prop :=
-  ∀ (M : ModelCat.{u, v, max u v} T) (v : α → M) (xs : Fin n → M), φ.realize v xs
+  ∀ (M : ModelType.{u, v, max u v} T) (v : α → M) (xs : Fin n → M), φ.realize v xs
 #align first_order.language.Theory.models_bounded_formula FirstOrder.Language.Theory.ModelsBoundedFormula
 
 -- mathport name: models_bounded_formula
@@ -321,13 +321,13 @@ variable {T}
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem models_formula_iff {φ : L.Formula α} :
-    T ⊨ φ ↔ ∀ (M : ModelCat.{u, v, max u v} T) (v : α → M), φ.realize v :=
+    T ⊨ φ ↔ ∀ (M : ModelType.{u, v, max u v} T) (v : α → M), φ.realize v :=
   forall_congr' fun M => forall_congr' fun v => Unique.forall_iff
 #align first_order.language.Theory.models_formula_iff FirstOrder.Language.Theory.models_formula_iff
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem models_sentence_iff {φ : L.Sentence} : T ⊨ φ ↔ ∀ M : ModelCat.{u, v, max u v} T, M ⊨ φ :=
+theorem models_sentence_iff {φ : L.Sentence} : T ⊨ φ ↔ ∀ M : ModelType.{u, v, max u v} T, M ⊨ φ :=
   models_formula_iff.trans (forall_congr' fun M => Unique.forall_iff)
 #align first_order.language.Theory.models_sentence_iff FirstOrder.Language.Theory.models_sentence_iff
 
@@ -480,7 +480,7 @@ theorem SemanticallyEquivalent.trans {φ ψ θ : L.BoundedFormula α n}
 theorem SemanticallyEquivalent.realize_bd_iff {φ ψ : L.BoundedFormula α n} {M : Type max u v}
     [ne : Nonempty M] [str : L.Structure M] [hM : T.Model M] (h : T.SemanticallyEquivalent φ ψ)
     {v : α → M} {xs : Fin n → M} : φ.realize v xs ↔ ψ.realize v xs :=
-  BoundedFormula.realize_iff.1 (h (ModelCat.of T M) v xs)
+  BoundedFormula.realize_iff.1 (h (ModelType.of T M) v xs)
 #align first_order.language.Theory.semantically_equivalent.realize_bd_iff FirstOrder.Language.Theory.SemanticallyEquivalent.realize_bd_iff
 
 theorem SemanticallyEquivalent.realize_iff {φ ψ : L.Formula α} {M : Type max u v} [ne : Nonempty M]
@@ -689,13 +689,13 @@ variable {L : Language.{u, v}} (κ : Cardinal.{w}) (T : L.Theory)
 
 /-- A theory is `κ`-categorical if all models of size `κ` are isomorphic. -/
 def Categorical : Prop :=
-  ∀ M N : T.ModelCat, (#M) = κ → (#N) = κ → Nonempty (M ≃[L] N)
+  ∀ M N : T.ModelType, (#M) = κ → (#N) = κ → Nonempty (M ≃[L] N)
 #align cardinal.categorical Cardinal.Categorical
 
 /-- The Łoś–Vaught Test : a criterion for categorical theories to be complete. -/
 theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) (hS : T.IsSatisfiable)
-    (hT : ∀ M : Theory.ModelCat.{u, v, max u v} T, Infinite M) : T.IsComplete :=
+    (hT : ∀ M : Theory.ModelType.{u, v, max u v} T, Infinite M) : T.IsComplete :=
   ⟨hS, fun φ =>
     by
     obtain ⟨N, hN⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
Diff
@@ -616,19 +616,19 @@ end Formula
 
 namespace BoundedFormula
 
-theorem IsQf.induction_on_sup_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
-    (h : IsQf φ) (hf : P (⊥ : L.BoundedFormula α n))
+theorem IsQF.induction_on_sup_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
+    (h : IsQF φ) (hf : P (⊥ : L.BoundedFormula α n))
     (ha : ∀ ψ : L.BoundedFormula α n, IsAtomic ψ → P ψ)
     (hsup : ∀ {φ₁ φ₂} (h₁ : P φ₁) (h₂ : P φ₂), P (φ₁ ⊔ φ₂)) (hnot : ∀ {φ} (h : P φ), P φ.Not)
     (hse :
       ∀ {φ₁ φ₂ : L.BoundedFormula α n} (h : Theory.SemanticallyEquivalent ∅ φ₁ φ₂), P φ₁ ↔ P φ₂) :
     P φ :=
-  IsQf.rec_on h hf ha fun φ₁ φ₂ _ _ h1 h2 =>
+  IsQF.rec_on h hf ha fun φ₁ φ₂ _ _ h1 h2 =>
     (hse (φ₁.imp_semanticallyEquivalent_not_sup φ₂)).2 (hsup (hnot h1) h2)
-#align first_order.language.bounded_formula.is_qf.induction_on_sup_not FirstOrder.Language.BoundedFormula.IsQf.induction_on_sup_not
+#align first_order.language.bounded_formula.is_qf.induction_on_sup_not FirstOrder.Language.BoundedFormula.IsQF.induction_on_sup_not
 
-theorem IsQf.induction_on_inf_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
-    (h : IsQf φ) (hf : P (⊥ : L.BoundedFormula α n))
+theorem IsQF.induction_on_inf_not {P : L.BoundedFormula α n → Prop} {φ : L.BoundedFormula α n}
+    (h : IsQF φ) (hf : P (⊥ : L.BoundedFormula α n))
     (ha : ∀ ψ : L.BoundedFormula α n, IsAtomic ψ → P ψ)
     (hinf : ∀ {φ₁ φ₂} (h₁ : P φ₁) (h₂ : P φ₂), P (φ₁ ⊓ φ₂)) (hnot : ∀ {φ} (h : P φ), P φ.Not)
     (hse :
@@ -638,7 +638,7 @@ theorem IsQf.induction_on_inf_not {P : L.BoundedFormula α n → Prop} {φ : L.B
     (fun φ₁ φ₂ h1 h2 =>
       (hse (φ₁.sup_semanticallyEquivalent_not_inf_not φ₂)).2 (hnot (hinf (hnot h1) (hnot h2))))
     (fun _ => hnot) fun _ _ => hse
-#align first_order.language.bounded_formula.is_qf.induction_on_inf_not FirstOrder.Language.BoundedFormula.IsQf.induction_on_inf_not
+#align first_order.language.bounded_formula.is_qf.induction_on_inf_not FirstOrder.Language.BoundedFormula.IsQF.induction_on_inf_not
 
 theorem semanticallyEquivalent_toPrenex (φ : L.BoundedFormula α n) :
     (∅ : L.Theory).SemanticallyEquivalent φ φ.toPrenex := fun M v xs => by
@@ -646,7 +646,7 @@ theorem semanticallyEquivalent_toPrenex (φ : L.BoundedFormula α n) :
 #align first_order.language.bounded_formula.semantically_equivalent_to_prenex FirstOrder.Language.BoundedFormula.semanticallyEquivalent_toPrenex
 
 theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ : L.BoundedFormula α n)
-    (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQf ψ → P ψ)
+    (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQF ψ → P ψ)
     (hall : ∀ {m} {ψ : L.BoundedFormula α (m + 1)} (h : P ψ), P ψ.all)
     (hex : ∀ {m} {φ : L.BoundedFormula α (m + 1)} (h : P φ), P φ.ex)
     (hse :
@@ -663,7 +663,7 @@ theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ :
 #align first_order.language.bounded_formula.induction_on_all_ex FirstOrder.Language.BoundedFormula.induction_on_all_ex
 
 theorem induction_on_exists_not {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ : L.BoundedFormula α n)
-    (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQf ψ → P ψ)
+    (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQF ψ → P ψ)
     (hnot : ∀ {m} {φ : L.BoundedFormula α m} (h : P φ), P φ.Not)
     (hex : ∀ {m} {φ : L.BoundedFormula α (m + 1)} (h : P φ), P φ.ex)
     (hse :

Changes in mathlib4

mathlib3
mathlib4
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -298,7 +298,7 @@ theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite
 variable (T)
 
 /-- A theory models a (bounded) formula when any of its nonempty models realizes that formula on all
-  inputs.-/
+  inputs. -/
 def ModelsBoundedFormula (φ : L.BoundedFormula α n) : Prop :=
   ∀ (M : ModelType.{u, v, max u v} T) (v : α → M) (xs : Fin n → M), φ.Realize v xs
 #align first_order.language.Theory.models_bounded_formula FirstOrder.Language.Theory.ModelsBoundedFormula
chore: remove mathport name: <expression> lines (#11928)

Quoting [@digama0](https://github.com/digama0):

These were actually never meant to go in the file, they are basically debugging information and only useful on significantly broken mathport files. You can safely remove all of them.

Diff
@@ -304,7 +304,6 @@ def ModelsBoundedFormula (φ : L.BoundedFormula α n) : Prop :=
 #align first_order.language.Theory.models_bounded_formula FirstOrder.Language.Theory.ModelsBoundedFormula
 
 -- Porting note: In Lean3 it was `⊨` but ambiguous.
--- mathport name: models_bounded_formula
 @[inherit_doc FirstOrder.Language.Theory.ModelsBoundedFormula]
 infixl:51 " ⊨ᵇ " => ModelsBoundedFormula -- input using \|= or \vDash, but not using \models
 
chore: remove tactics (#11365)

More tactics that are not used, found using the linter at #11308.

The PR consists of tactic removals, whitespace changes and replacing a porting note by an explanation.

Diff
@@ -570,7 +570,6 @@ theorem ex_semanticallyEquivalent_not_all_not (φ : L.BoundedFormula α (n + 1))
 
 theorem semanticallyEquivalent_all_liftAt : T.SemanticallyEquivalent φ (φ.liftAt 1 n).all :=
   fun M v xs => by
-  skip
   rw [realize_iff, realize_all_liftAt_one_self]
 #align first_order.language.bounded_formula.semantically_equivalent_all_lift_at FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt
 
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -638,8 +638,8 @@ theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ :
     (hse : ∀ {m} {φ₁ φ₂ : L.BoundedFormula α m},
       Theory.SemanticallyEquivalent ∅ φ₁ φ₂ → (P φ₁ ↔ P φ₂)) :
     P φ := by
-  suffices h' : ∀ {m} {φ : L.BoundedFormula α m}, φ.IsPrenex → P φ
-  · exact (hse φ.semanticallyEquivalent_toPrenex).2 (h' φ.toPrenex_isPrenex)
+  suffices h' : ∀ {m} {φ : L.BoundedFormula α m}, φ.IsPrenex → P φ from
+    (hse φ.semanticallyEquivalent_toPrenex).2 (h' φ.toPrenex_isPrenex)
   intro m φ hφ
   induction' hφ with _ _ hφ _ _ _ hφ _ _ _ hφ
   · exact hqf hφ
style: use cases x with | ... instead of cases x; case => ... (#9321)

This converts usages of the pattern

cases h
case inl h' => ...
case inr h' => ...

which derive from mathported code, to the "structured cases" syntax:

cases h with
| inl h' => ...
| inr h' => ...

The case where the subgoals are handled with · instead of case is more contentious (and much more numerous) so I left those alone. This pattern also appears with cases', induction, induction', and rcases. Furthermore, there is a similar transformation for by_cases:

by_cases h : cond
case pos => ...
case neg => ...

is replaced by:

if h : cond then
  ...
else
  ...

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -260,11 +260,11 @@ direction between then `M` and a structure of cardinality `κ`. -/
 theorem exists_elementaryEmbedding_card_eq (M : Type w') [L.Structure M] [iM : Infinite M]
     (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
     ∃ N : Bundled L.Structure, (Nonempty (N ↪ₑ[L] M) ∨ Nonempty (M ↪ₑ[L] N)) ∧ #N = κ := by
-  cases le_or_gt (lift.{w'} κ) (Cardinal.lift.{w} #M)
-  case inl h =>
+  cases le_or_gt (lift.{w'} κ) (Cardinal.lift.{w} #M) with
+  | inl h =>
     obtain ⟨N, hN1, hN2⟩ := exists_elementaryEmbedding_card_eq_of_le L M κ h1 h2 h
     exact ⟨N, Or.inl hN1, hN2⟩
-  case inr h =>
+  | inr h =>
     obtain ⟨N, hN1, hN2⟩ := exists_elementaryEmbedding_card_eq_of_ge L M κ h2 (le_of_lt h)
     exact ⟨N, Or.inr hN1, hN2⟩
 #align first_order.language.exists_elementary_embedding_card_eq FirstOrder.Language.exists_elementaryEmbedding_card_eq
doc: Mark named theorems including Compactness Theorem, Halting Problem, Tarski Vaught, Łoś (#8743)
Diff
@@ -102,7 +102,7 @@ theorem IsSatisfiable.isFinitelySatisfiable (h : T.IsSatisfiable) : T.IsFinitely
   fun _ => h.mono
 #align first_order.language.Theory.is_satisfiable.is_finitely_satisfiable FirstOrder.Language.Theory.IsSatisfiable.isFinitelySatisfiable
 
-/-- The Compactness Theorem of first-order logic: A theory is satisfiable if and only if it is
+/-- The **Compactness Theorem of first-order logic**: A theory is satisfiable if and only if it is
 finitely satisfiable. -/
 theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
     T.IsSatisfiable ↔ T.IsFinitelySatisfiable :=
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -683,7 +683,7 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
   ⟨hS, fun φ => by
     obtain ⟨_, _⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
-    by_contra' con
+    by_contra! con
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := con
     rw [Sentence.realize_not, Classical.not_not] at hMT
     refine' hMF _
chore: use by_contra' instead of by_contra + push_neg (#8798)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -683,8 +683,7 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
   ⟨hS, fun φ => by
     obtain ⟨_, _⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
-    by_contra con
-    push_neg at con
+    by_contra' con
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := con
     rw [Sentence.realize_not, Classical.not_not] at hMT
     refine' hMF _
doc(Computability/Halting): Mark named theorems (#8577)

Mark these named theorems: Rice, Downward and Upward Skolem

Diff
@@ -228,8 +228,8 @@ section
 -- Porting note: This instance interrupts synthesizing instances.
 attribute [-instance] FirstOrder.Language.withConstants_expansion
 
-/-- The Upward Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the cardinalities of `L`
-and an infinite `L`-structure `M`, then `M` has an elementary extension of cardinality `κ`. -/
+/-- The **Upward Löwenheim–Skolem Theorem**: If `κ` is a cardinal greater than the cardinalities of
+`L` and an infinite `L`-structure `M`, then `M` has an elementary extension of cardinality `κ`. -/
 theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [iM : Infinite M]
     (κ : Cardinal.{w}) (h1 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ)
     (h2 : Cardinal.lift.{w} #M ≤ Cardinal.lift.{w'} κ) :
feat(ModelTheory): models_of_models_theory (#6566)
Diff
@@ -353,6 +353,15 @@ theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ᵇ φ
   exact Model.isSatisfiable M
 #align first_order.language.Theory.models_bounded_formula.realize_sentence FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence
 
+theorem models_of_models_theory {T' : L.Theory}
+    (h : ∀ φ : L.Sentence, φ ∈ T' → T ⊨ᵇ φ)
+    {φ : L.Formula α} (hφ : T' ⊨ᵇ φ) : T ⊨ᵇ φ := by
+  simp only [models_sentence_iff] at h
+  intro M
+  have hM : M ⊨ T' := T'.model_iff.2 (fun ψ hψ => h ψ hψ M)
+  let M' : ModelType T' := ⟨M⟩
+  exact hφ M'
+
 /-- An alternative statement of the Compactness Theorem. A formula `φ` is modeled by a
 theory iff there is a finite subset `T0` of the theory such that `φ` is modeled by `T0` -/
 theorem models_iff_finset_models {φ : L.Sentence} :
feat(ModelTheory): alternative statement of compactness (#6453)

Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>

Diff
@@ -353,6 +353,24 @@ theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ᵇ φ
   exact Model.isSatisfiable M
 #align first_order.language.Theory.models_bounded_formula.realize_sentence FirstOrder.Language.Theory.ModelsBoundedFormula.realize_sentence
 
+/-- An alternative statement of the Compactness Theorem. A formula `φ` is modeled by a
+theory iff there is a finite subset `T0` of the theory such that `φ` is modeled by `T0` -/
+theorem models_iff_finset_models {φ : L.Sentence} :
+    T ⊨ᵇ φ ↔ ∃ T0 : Finset L.Sentence, (T0 : L.Theory) ⊆ T ∧ (T0 : L.Theory) ⊨ᵇ φ := by
+  simp only [models_iff_not_satisfiable]
+  rw [← not_iff_not, not_not, isSatisfiable_iff_isFinitelySatisfiable, IsFinitelySatisfiable]
+  push_neg
+  letI := Classical.decEq (Sentence L)
+  constructor
+  · intro h T0 hT0
+    simpa using h (T0 ∪ {Formula.not φ})
+      (by
+        simp only [Finset.coe_union, Finset.coe_singleton]
+        exact Set.union_subset_union hT0 (Set.Subset.refl _))
+  · intro h T0 hT0
+    exact IsSatisfiable.mono (h (T0.erase (Formula.not φ))
+      (by simpa using hT0)) (by simp)
+
 /-- A theory is complete when it is satisfiable and models each sentence or its negation. -/
 def IsComplete (T : L.Theory) : Prop :=
   T.IsSatisfiable ∧ ∀ φ : L.Sentence, T ⊨ᵇ φ ∨ T ⊨ᵇ φ.not
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -126,7 +126,7 @@ theorem isSatisfiable_iff_isFinitelySatisfiable {T : L.Theory} :
       exact ⟨ModelType.of T M'⟩⟩
 #align first_order.language.Theory.is_satisfiable_iff_is_finitely_satisfiable FirstOrder.Language.Theory.isSatisfiable_iff_isFinitelySatisfiable
 
-theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι → L.Theory}
+theorem isSatisfiable_directed_union_iff {ι : Type*} [Nonempty ι] {T : ι → L.Theory}
     (h : Directed (· ⊆ ·) T) : Theory.IsSatisfiable (⋃ i, T i) ↔ ∀ i, (T i).IsSatisfiable := by
   refine' ⟨fun h' i => h'.mono (Set.subset_iUnion _ _), fun h' => _⟩
   rw [isSatisfiable_iff_isFinitelySatisfiable, IsFinitelySatisfiable]
@@ -186,7 +186,7 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
   rw [lift_lift]
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
 
-theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type _} (T : ι → L.Theory) :
+theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type*} (T : ι → L.Theory) :
     IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i) := by
   classical
     refine'
@@ -341,7 +341,7 @@ theorem models_iff_not_satisfiable (φ : L.Sentence) : T ⊨ᵇ φ ↔ ¬IsSatis
   exact h
 #align first_order.language.Theory.models_iff_not_satisfiable FirstOrder.Language.Theory.models_iff_not_satisfiable
 
-theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ᵇ φ) (M : Type _)
+theorem ModelsBoundedFormula.realize_sentence {φ : L.Sentence} (h : T ⊨ᵇ φ) (M : Type*)
     [L.Structure M] [M ⊨ T] [Nonempty M] : M ⊨ φ := by
   rw [models_iff_not_satisfiable] at h
   contrapose! h
@@ -373,7 +373,7 @@ theorem models_not_iff (h : T.IsComplete) (φ : L.Sentence) : T ⊨ᵇ φ.not 
     exact hφn h.1.some (hφ _)
 #align first_order.language.Theory.is_complete.models_not_iff FirstOrder.Language.Theory.IsComplete.models_not_iff
 
-theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type _) [L.Structure M]
+theorem realize_sentence_iff (h : T.IsComplete) (φ : L.Sentence) (M : Type*) [L.Structure M]
     [M ⊨ T] [Nonempty M] : M ⊨ φ ↔ T ⊨ᵇ φ := by
   cases' h.2 φ with hφ hφn
   · exact iff_of_true (hφ.realize_sentence M) hφ
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2021 Aaron Anderson. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson
-
-! This file was ported from Lean 3 source module model_theory.satisfiability
-! leanprover-community/mathlib commit d565b3df44619c1498326936be16f1a935df0728
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.ModelTheory.Ultraproducts
 import Mathlib.ModelTheory.Bundled
 import Mathlib.ModelTheory.Skolem
 
+#align_import model_theory.satisfiability from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
+
 /-!
 # First-Order Satisfiability
 This file deals with the satisfiability of first-order theories, as well as equivalence over them.
fix: precedence of # (#5623)
Diff
@@ -140,7 +140,7 @@ theorem isSatisfiable_directed_union_iff {ι : Type _} [Nonempty ι] {T : ι →
 
 theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
     (M : Type w') [Nonempty M] [L.Structure M] [M ⊨ T]
-    (h : Cardinal.lift.{w'} (#s) ≤ Cardinal.lift.{w} (#M)) :
+    (h : Cardinal.lift.{w'} #s ≤ Cardinal.lift.{w} #M) :
     ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable := by
   haveI : Inhabited M := Classical.inhabited_of_nonempty inferInstance
   rw [Cardinal.lift_mk_le'] at h
@@ -176,7 +176,7 @@ theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (
 /-- Any theory with an infinite model has arbitrarily large models. -/
 theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w}) (M : Type w')
     [L.Structure M] [M ⊨ T] [Infinite M] :
-    ∃ N : ModelType.{_, _, max u v w} T, Cardinal.lift.{max u v w} κ ≤ (#N) := by
+    ∃ N : ModelType.{_, _, max u v w} T, Cardinal.lift.{max u v w} κ ≤ #N := by
   obtain ⟨N⟩ :=
     isSatisfiable_union_distinctConstantsTheory_of_infinite T (Set.univ : Set κ.out) M
   refine' ⟨(N.is_model.mono (Set.subset_union_left _ _)).bundled.reduct _, _⟩
@@ -214,8 +214,8 @@ of the cardinal `κ`.
  -/
 theorem exists_elementaryEmbedding_card_eq_of_le (M : Type w') [L.Structure M] [Nonempty M]
     (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ)
-    (h3 : lift.{w'} κ ≤ Cardinal.lift.{w} (#M)) :
-    ∃ N : Bundled L.Structure, Nonempty (N ↪ₑ[L] M) ∧ (#N) = κ := by
+    (h3 : lift.{w'} κ ≤ Cardinal.lift.{w} #M) :
+    ∃ N : Bundled L.Structure, Nonempty (N ↪ₑ[L] M) ∧ #N = κ := by
   obtain ⟨S, _, hS⟩ := exists_elementarySubstructure_card_eq L ∅ κ h1 (by simp) h2 h3
   have : Small.{w} S := by
     rw [← lift_inj.{_, w + 1}, lift_lift, lift_lift] at hS
@@ -235,8 +235,8 @@ attribute [-instance] FirstOrder.Language.withConstants_expansion
 and an infinite `L`-structure `M`, then `M` has an elementary extension of cardinality `κ`. -/
 theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [iM : Infinite M]
     (κ : Cardinal.{w}) (h1 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ)
-    (h2 : Cardinal.lift.{w} (#M) ≤ Cardinal.lift.{w'} κ) :
-    ∃ N : Bundled L.Structure, Nonempty (M ↪ₑ[L] N) ∧ (#N) = κ := by
+    (h2 : Cardinal.lift.{w} #M ≤ Cardinal.lift.{w'} κ) :
+    ∃ N : Bundled L.Structure, Nonempty (M ↪ₑ[L] N) ∧ #N = κ := by
   obtain ⟨N0, hN0⟩ := (L.elementaryDiagram M).exists_large_model_of_infinite_model κ M
   rw [← lift_le.{max u v}, lift_lift, lift_lift] at h2
   obtain ⟨N, ⟨NN0⟩, hN⟩ :=
@@ -262,8 +262,8 @@ and an infinite `L`-structure `M`, then there is an elementary embedding in the
 direction between then `M` and a structure of cardinality `κ`. -/
 theorem exists_elementaryEmbedding_card_eq (M : Type w') [L.Structure M] [iM : Infinite M]
     (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
-    ∃ N : Bundled L.Structure, (Nonempty (N ↪ₑ[L] M) ∨ Nonempty (M ↪ₑ[L] N)) ∧ (#N) = κ := by
-  cases le_or_gt (lift.{w'} κ) (Cardinal.lift.{w} (#M))
+    ∃ N : Bundled L.Structure, (Nonempty (N ↪ₑ[L] M) ∨ Nonempty (M ↪ₑ[L] N)) ∧ #N = κ := by
+  cases le_or_gt (lift.{w'} κ) (Cardinal.lift.{w} #M)
   case inl h =>
     obtain ⟨N, hN1, hN2⟩ := exists_elementaryEmbedding_card_eq_of_le L M κ h1 h2 h
     exact ⟨N, Or.inl hN1, hN2⟩
@@ -277,7 +277,7 @@ cardinalities of `L` and an infinite `L`-structure `M`, then there is a structur
 elementarily equivalent to `M`. -/
 theorem exists_elementarilyEquivalent_card_eq (M : Type w') [L.Structure M] [Infinite M]
     (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
-    ∃ N : CategoryTheory.Bundled L.Structure, (M ≅[L] N) ∧ (#N) = κ := by
+    ∃ N : CategoryTheory.Bundled L.Structure, (M ≅[L] N) ∧ #N = κ := by
   obtain ⟨N, NM | MN, hNκ⟩ := exists_elementaryEmbedding_card_eq L M κ h1 h2
   · exact ⟨N, NM.some.elementarilyEquivalent.symm, hNκ⟩
   · exact ⟨N, MN.some.elementarilyEquivalent, hNκ⟩
@@ -289,7 +289,7 @@ namespace Theory
 
 theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite M) (κ : Cardinal.{w})
     (h1 : ℵ₀ ≤ κ) (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
-    ∃ N : ModelType.{u, v, w} T, (#N) = κ := by
+    ∃ N : ModelType.{u, v, w} T, #N = κ := by
   cases h with
   | intro M MI =>
     haveI := MI
@@ -649,7 +649,7 @@ variable {L : Language.{u, v}} (κ : Cardinal.{w}) (T : L.Theory)
 
 /-- A theory is `κ`-categorical if all models of size `κ` are isomorphic. -/
 def Categorical : Prop :=
-  ∀ M N : T.ModelType, (#M) = κ → (#N) = κ → Nonempty (M ≃[L] N)
+  ∀ M N : T.ModelType, #M = κ → #N = κ → Nonempty (M ≃[L] N)
 #align cardinal.categorical Cardinal.Categorical
 
 /-- The Łoś–Vaught Test : a criterion for categorical theories to be complete. -/
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -660,7 +660,7 @@ theorem Categorical.isComplete (h : κ.Categorical T) (h1 : ℵ₀ ≤ κ)
     obtain ⟨_, _⟩ := Theory.exists_model_card_eq ⟨hS.some, hT hS.some⟩ κ h1 h2
     rw [Theory.models_sentence_iff, Theory.models_sentence_iff]
     by_contra con
-    push_neg  at con
+    push_neg at con
     obtain ⟨⟨MF, hMF⟩, MT, hMT⟩ := con
     rw [Sentence.realize_not, Classical.not_not] at hMT
     refine' hMF _
chore: reorder universe variables in Cardinal.lift_le and Cardinal.lift_mk_le (#5325)

Cardinal.lift_le and Cardinal.lift_mk_le have their universes out of order, in the sense that persistently through the rest of the library we need to specify the 2nd universe (resp 3rd), while the others are solved by unification.

This PR reorders the universes so it's easier to specify the thing you need to specify!

(This PR doesn't get rid of all the occurrences of \.\{_, in the library, but I'd like to do that later.)

I do have a hidden agenda here, which is that I've been experimenting with solutions to the dreaded "Can't solve max u v = max v ?u" universe unification issue (which is making life hellish forward porting https://github.com/leanprover-community/mathlib/pull/19153), and my favourite (but still hacky) solution doesn't like some of the occasions where we reference a lemma filling in some of its universe arguments with _ but then fully specify a later one. (e.g. rw [← lift_le.{_, max u v}, lift_lift, lift_mk_le.{_, _, v}] in ModelTheory/Skolem.lean). Hence the cleanup proposed in this PR makes my life easier working on these experiments. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -185,7 +185,7 @@ theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w})
   refine' _root_.trans (lift_le.2 (le_of_eq (Cardinal.mk_out κ).symm)) _
   rw [← mk_univ]
   refine'
-    (card_le_of_model_distinctConstantsTheory L Set.univ N).trans (lift_le.{_, max u v w}.1 _)
+    (card_le_of_model_distinctConstantsTheory L Set.univ N).trans (lift_le.{max u v w}.1 _)
   rw [lift_lift]
 #align first_order.language.Theory.exists_large_model_of_infinite_model FirstOrder.Language.Theory.exists_large_model_of_infinite_model
 
@@ -238,14 +238,14 @@ theorem exists_elementaryEmbedding_card_eq_of_ge (M : Type w') [L.Structure M] [
     (h2 : Cardinal.lift.{w} (#M) ≤ Cardinal.lift.{w'} κ) :
     ∃ N : Bundled L.Structure, Nonempty (M ↪ₑ[L] N) ∧ (#N) = κ := by
   obtain ⟨N0, hN0⟩ := (L.elementaryDiagram M).exists_large_model_of_infinite_model κ M
-  rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2
+  rw [← lift_le.{max u v}, lift_lift, lift_lift] at h2
   obtain ⟨N, ⟨NN0⟩, hN⟩ :=
     exists_elementaryEmbedding_card_eq_of_le (L[[M]]) N0 κ
       (aleph0_le_lift.1 ((aleph0_le_lift.2 (aleph0_le_mk M)).trans h2))
       (by
         simp only [card_withConstants, lift_add, lift_lift]
         rw [add_comm, add_eq_max (aleph0_le_lift.2 (infinite_iff.1 iM)), max_le_iff]
-        rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1
+        rw [← lift_le.{w'}, lift_lift, lift_lift] at h1
         exact ⟨h2, h1⟩)
       (hN0.trans (by rw [← lift_umax', lift_id]))
   · letI := (lhomWithConstants L M).reduct N
feat: port ModelTheory.Satisfiability (#3980)

Dependencies 8 + 388

389 files ported (98.0%)
161730 lines ported (98.1%)
Show graph

The unported dependencies are