model_theory.basicMathlib.ModelTheory.Basic

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -112,7 +112,7 @@ instance {n : ℕ} : IsEmpty (Sequence₂ a₀ a₁ a₂ (n + 3)) :=
 theorem lift_mk {i : ℕ} :
     Cardinal.lift (#Sequence₂ a₀ a₁ a₂ i) = (#Sequence₂ (ULift a₀) (ULift a₁) (ULift a₂) i) := by
   rcases i with (_ | _ | _ | i) <;>
-    simp only [sequence₂, mk_ulift, mk_fintype, Fintype.card_of_isEmpty, Nat.cast_zero, lift_zero]
+    simp only [sequence₂, mk_ulift, mk_fintype, Fintype.card_ofIsEmpty, Nat.cast_zero, lift_zero]
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 -/
 
Diff
@@ -521,7 +521,7 @@ end Structure
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
     [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
-  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
+  mapRel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
 -/
 
@@ -531,7 +531,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
     [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
-  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
+  mapRel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 -/
 
@@ -540,7 +540,7 @@ instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.St
     [DFunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
     where
   map_fun := StrongHomClass.map_fun
-  map_rel φ n R x := (StrongHomClass.map_rel φ R x).2
+  mapRel φ n R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 -/
 
@@ -550,7 +550,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
     [DFunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
     where
   map_fun := HomClass.map_fun
-  map_rel φ n R x := (IsAlgebraic.empty_relations n).elim R
+  mapRel φ n R x := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 -/
 
@@ -575,7 +575,7 @@ instance instFunLike : DFunLike (M →[L] N) M fun _ => N
 instance homClass : HomClass L (M →[L] N) M N
     where
   map_fun := map_fun'
-  map_rel := map_rel'
+  mapRel := map_rel'
 #align first_order.language.hom.hom_class FirstOrder.Language.Hom.homClass
 -/
 
@@ -707,15 +707,13 @@ instance embeddingLike : EmbeddingLike (M ↪[L] N) M N
 instance strongHomClass : StrongHomClass L (M ↪[L] N) M N
     where
   map_fun := map_fun'
-  map_rel := map_rel'
+  mapRel := map_rel'
 #align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClass
 -/
 
-#print FirstOrder.Language.Embedding.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
   DFunLike.hasCoeToFun
 #align first_order.language.embedding.has_coe_to_fun FirstOrder.Language.Embedding.hasCoeToFun
--/
 
 #print FirstOrder.Language.Embedding.map_fun /-
 @[simp]
@@ -891,7 +889,7 @@ instance : EquivLike (M ≃[L] N) M N where
 instance : StrongHomClass L (M ≃[L] N) M N
     where
   map_fun := map_fun'
-  map_rel := map_rel'
+  mapRel := map_rel'
 
 #print FirstOrder.Language.Equiv.symm /-
 /-- The inverse of a first-order equivalence is a first-order equivalence. -/
Diff
@@ -563,12 +563,12 @@ theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [DFunLike
 
 namespace Hom
 
-#print FirstOrder.Language.Hom.instDFunLike /-
-instance instDFunLike : DFunLike (M →[L] N) M fun _ => N
+#print FirstOrder.Language.Hom.instFunLike /-
+instance instFunLike : DFunLike (M →[L] N) M fun _ => N
     where
   coe := Hom.toFun
   coe_injective' f g h := by cases f; cases g; cases h; rfl
-#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instDFunLike
+#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instFunLike
 -/
 
 #print FirstOrder.Language.Hom.homClass /-
Diff
@@ -519,7 +519,7 @@ end Structure
 /-- `hom_class L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `first_order.language.hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-    [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+    [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
@@ -529,7 +529,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 /-- `strong_hom_class L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-    [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+    [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
@@ -537,7 +537,7 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
 
 #print FirstOrder.Language.StrongHomClass.homClass /-
 instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.Structure N]
-    [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
+    [DFunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
     where
   map_fun := StrongHomClass.map_fun
   map_rel φ n R x := (StrongHomClass.map_rel φ R x).2
@@ -547,7 +547,7 @@ instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.St
 #print FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic /-
 /-- Not an instance to avoid a loop. -/
 def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
-    [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
+    [DFunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
     where
   map_fun := HomClass.map_fun
   map_rel φ n R x := (IsAlgebraic.empty_relations n).elim R
@@ -555,7 +555,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
 -/
 
 #print FirstOrder.Language.HomClass.map_constants /-
-theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
+theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
 #align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constants
@@ -563,12 +563,12 @@ theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike
 
 namespace Hom
 
-#print FirstOrder.Language.Hom.funLike /-
-instance funLike : FunLike (M →[L] N) M fun _ => N
+#print FirstOrder.Language.Hom.instDFunLike /-
+instance instDFunLike : DFunLike (M →[L] N) M fun _ => N
     where
   coe := Hom.toFun
   coe_injective' f g h := by cases f; cases g; cases h; rfl
-#align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
+#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instDFunLike
 -/
 
 #print FirstOrder.Language.Hom.homClass /-
@@ -584,7 +584,7 @@ instance [L.IsAlgebraic] : StrongHomClass L (M →[L] N) M N :=
 
 #print FirstOrder.Language.Hom.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M →[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.hom.has_coe_to_fun FirstOrder.Language.Hom.hasCoeToFun
 -/
 
@@ -598,13 +598,13 @@ theorem toFun_eq_coe {f : M →[L] N} : f.toFun = (f : M → N) :=
 #print FirstOrder.Language.Hom.ext /-
 @[ext]
 theorem ext ⦃f g : M →[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
-  FunLike.ext f g h
+  DFunLike.ext f g h
 #align first_order.language.hom.ext FirstOrder.Language.Hom.ext
 -/
 
 #print FirstOrder.Language.Hom.ext_iff /-
 theorem ext_iff {f g : M →[L] N} : f = g ↔ ∀ x, f x = g x :=
-  FunLike.ext_iff
+  DFunLike.ext_iff
 #align first_order.language.hom.ext_iff FirstOrder.Language.Hom.ext_iff
 -/
 
@@ -681,7 +681,7 @@ end Hom
 
 #print FirstOrder.Language.HomClass.toHom /-
 /-- Any element of a `hom_class` can be realized as a first_order homomorphism. -/
-def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
+def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
   ⟨φ, fun _ => HomClass.map_fun φ, fun _ => HomClass.map_rel φ⟩
 #align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHom
@@ -713,7 +713,7 @@ instance strongHomClass : StrongHomClass L (M ↪[L] N) M N
 
 #print FirstOrder.Language.Embedding.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.embedding.has_coe_to_fun FirstOrder.Language.Embedding.hasCoeToFun
 -/
 
@@ -913,7 +913,7 @@ def symm (f : M ≃[L] N) : N ≃[L] M :=
 
 #print FirstOrder.Language.Equiv.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ≃[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.equiv.has_coe_to_fun FirstOrder.Language.Equiv.hasCoeToFun
 -/
 
@@ -991,7 +991,7 @@ theorem coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M 
 
 #print FirstOrder.Language.Equiv.coe_injective /-
 theorem coe_injective : @Function.Injective (M ≃[L] N) (M → N) coeFn :=
-  FunLike.coe_injective
+  DFunLike.coe_injective
 #align first_order.language.equiv.coe_injective FirstOrder.Language.Equiv.coe_injective
 -/
 
@@ -1168,7 +1168,7 @@ instance : Unique (Language.empty.Structure M) :=
     · exact Subsingleton.elim _ _⟩
 
 #print FirstOrder.Language.strongHomClassEmpty /-
-instance (priority := 100) strongHomClassEmpty {F M N} [FunLike F M fun _ => N] :
+instance (priority := 100) strongHomClassEmpty {F M N} [DFunLike F M fun _ => N] :
     StrongHomClass Language.empty F M N :=
   ⟨fun _ _ f => Empty.elim f, fun _ _ r => Empty.elim r⟩
 #align first_order.language.strong_hom_class_empty FirstOrder.Language.strongHomClassEmpty
Diff
@@ -903,11 +903,11 @@ def symm (f : M ≃[L] N) : N ≃[L] M :=
       simp only [Equiv.toFun_as_coe]
       rw [Equiv.symm_apply_eq]
       refine' Eq.trans _ (f.map_fun' f' (f.to_equiv.symm ∘ x)).symm
-      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id]
+      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp]
     map_rel' := fun n r x => by
       simp only [Equiv.toFun_as_coe]
       refine' (f.map_rel' r (f.to_equiv.symm ∘ x)).symm.trans _
-      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id] }
+      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp] }
 #align first_order.language.equiv.symm FirstOrder.Language.Equiv.symm
 -/
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Aaron Anderson, Jesse Michael Han, Floris van Doorn. All righ
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn
 -/
-import Mathbin.Data.Fin.VecNotation
-import Mathbin.SetTheory.Cardinal.Basic
+import Data.Fin.VecNotation
+import SetTheory.Cardinal.Basic
 
 #align_import model_theory.basic from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Aaron Anderson, Jesse Michael Han, Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn
-
-! This file was ported from Lean 3 source module model_theory.basic
-! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Fin.VecNotation
 import Mathbin.SetTheory.Cardinal.Basic
 
+#align_import model_theory.basic from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
+
 /-!
 # Basics on First-Order Structures
 
Diff
@@ -1166,7 +1166,7 @@ instance emptyStructure : Language.empty.Structure M :=
 
 instance : Unique (Language.empty.Structure M) :=
   ⟨⟨Language.emptyStructure⟩, fun a => by
-    ext (n f)
+    ext n f
     · exact Empty.elim f
     · exact Subsingleton.elim _ _⟩
 
Diff
@@ -119,12 +119,14 @@ theorem lift_mk {i : ℕ} :
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 -/
 
+#print FirstOrder.Sequence₂.sum_card /-
 @[simp]
 theorem sum_card : (Cardinal.sum fun i => #Sequence₂ a₀ a₁ a₂ i) = (#a₀) + (#a₁) + (#a₂) :=
   by
   rw [sum_nat_eq_add_sum_succ, sum_nat_eq_add_sum_succ, sum_nat_eq_add_sum_succ]
   simp [add_assoc]
 #align first_order.sequence₂.sum_card FirstOrder.Sequence₂.sum_card
+-/
 
 end Sequence₂
 
@@ -205,12 +207,14 @@ class IsAlgebraic : Prop where
 
 variable {L} {L' : Language.{u', v'}}
 
+#print FirstOrder.Language.card_eq_card_functions_add_card_relations /-
 theorem card_eq_card_functions_add_card_relations :
     L.card =
       (Cardinal.sum fun l => Cardinal.lift.{v} (#L.Functions l)) +
         Cardinal.sum fun l => Cardinal.lift.{u} (#L.Relations l) :=
   by simp [card, symbols]
 #align first_order.language.card_eq_card_functions_add_card_relations FirstOrder.Language.card_eq_card_functions_add_card_relations
+-/
 
 instance [L.IsRelational] {n : ℕ} : IsEmpty (L.Functions n) :=
   IsRelational.empty_functions n
@@ -309,18 +313,23 @@ instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σ
 #align first_order.language.countable.countable_functions FirstOrder.Language.Countable.countable_functions
 -/
 
+#print FirstOrder.Language.card_functions_sum /-
 @[simp]
 theorem card_functions_sum (i : ℕ) :
     (#(L.Sum L').Functions i) = (#L.Functions i).lift + Cardinal.lift.{u} (#L'.Functions i) := by
   simp [language.sum]
 #align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sum
+-/
 
+#print FirstOrder.Language.card_relations_sum /-
 @[simp]
 theorem card_relations_sum (i : ℕ) :
     (#(L.Sum L').Relations i) = (#L.Relations i).lift + Cardinal.lift.{v} (#L'.Relations i) := by
   simp [language.sum]
 #align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sum
+-/
 
+#print FirstOrder.Language.card_sum /-
 @[simp]
 theorem card_sum :
     (L.Sum L').card = Cardinal.lift.{max u' v'} L.card + Cardinal.lift.{max u v} L'.card :=
@@ -330,7 +339,9 @@ theorem card_sum :
   rw [add_assoc, ← add_assoc (Cardinal.sum fun i => (#L'.functions i).lift),
     add_comm (Cardinal.sum fun i => (#L'.functions i).lift), add_assoc, add_assoc]
 #align first_order.language.card_sum FirstOrder.Language.card_sum
+-/
 
+#print FirstOrder.Language.card_mk₂ /-
 @[simp]
 theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).card =
@@ -339,6 +350,7 @@ theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
         Cardinal.lift.{u} (#r₂) :=
   by simp [card_eq_card_functions_add_card_relations, add_assoc]
 #align first_order.language.card_mk₂ FirstOrder.Language.card_mk₂
+-/
 
 variable (L) (M : Type w)
 
@@ -380,7 +392,6 @@ structure Hom where
 #align first_order.language.hom FirstOrder.Language.Hom
 -/
 
--- mathport name: language.hom
 scoped[FirstOrder] notation:25 A " →[" L "] " B => FirstOrder.Language.Hom L A B
 
 #print FirstOrder.Language.Embedding /-
@@ -393,7 +404,6 @@ structure Embedding extends M ↪ N where
 #align first_order.language.embedding FirstOrder.Language.Embedding
 -/
 
--- mathport name: language.embedding
 scoped[FirstOrder] notation:25 A " ↪[" L "] " B => FirstOrder.Language.Embedding L A B
 
 #print FirstOrder.Language.Equiv /-
@@ -406,7 +416,6 @@ structure Equiv extends M ≃ N where
 #align first_order.language.equiv FirstOrder.Language.Equiv
 -/
 
--- mathport name: language.equiv
 scoped[FirstOrder] notation:25 A " ≃[" L "] " B => FirstOrder.Language.Equiv L A B
 
 variable {L M N} {P : Type _} [L.Structure P] {Q : Type _} [L.Structure Q]
@@ -414,9 +423,11 @@ variable {L M N} {P : Type _} [L.Structure P] {Q : Type _} [L.Structure Q]
 instance : CoeTC L.Constants M :=
   ⟨fun c => funMap c default⟩
 
+#print FirstOrder.Language.funMap_eq_coe_constants /-
 theorem funMap_eq_coe_constants {c : L.Constants} {x : Fin 0 → M} : funMap c x = c :=
   congr rfl (funext Fin.elim0)
 #align first_order.language.fun_map_eq_coe_constants FirstOrder.Language.funMap_eq_coe_constants
+-/
 
 #print FirstOrder.Language.nonempty_of_nonempty_constants /-
 /-- Given a language with a nonempty type of constants, any structure will be nonempty. This cannot
@@ -507,6 +518,7 @@ theorem relMap_apply₂ (r : r₂) (x y : M) :
 
 end Structure
 
+#print FirstOrder.Language.HomClass /-
 /-- `hom_class L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `first_order.language.hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -514,7 +526,9 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
+-/
 
+#print FirstOrder.Language.StrongHomClass /-
 /-- `strong_hom_class L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -522,14 +536,18 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
+-/
 
+#print FirstOrder.Language.StrongHomClass.homClass /-
 instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
     where
   map_fun := StrongHomClass.map_fun
   map_rel φ n R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
+-/
 
+#print FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic /-
 /-- Not an instance to avoid a loop. -/
 def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
@@ -537,11 +555,14 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
   map_fun := HomClass.map_fun
   map_rel φ n R x := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
+-/
 
+#print FirstOrder.Language.HomClass.map_constants /-
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
 #align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constants
+-/
 
 namespace Hom
 
@@ -553,11 +574,13 @@ instance funLike : FunLike (M →[L] N) M fun _ => N
 #align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
 -/
 
+#print FirstOrder.Language.Hom.homClass /-
 instance homClass : HomClass L (M →[L] N) M N
     where
   map_fun := map_fun'
   map_rel := map_rel'
 #align first_order.language.hom.hom_class FirstOrder.Language.Hom.homClass
+-/
 
 instance [L.IsAlgebraic] : StrongHomClass L (M →[L] N) M N :=
   HomClass.strongHomClassOfIsAlgebraic
@@ -596,10 +619,12 @@ theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.hom.map_fun FirstOrder.Language.Hom.map_fun
 -/
 
+#print FirstOrder.Language.Hom.map_constants /-
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constants
+-/
 
 #print FirstOrder.Language.Hom.map_rel /-
 @[simp]
@@ -640,24 +665,30 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
 #align first_order.language.hom.comp FirstOrder.Language.Hom.comp
 -/
 
+#print FirstOrder.Language.Hom.comp_apply /-
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_apply
+-/
 
+#print FirstOrder.Language.Hom.comp_assoc /-
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.hom.comp_assoc FirstOrder.Language.Hom.comp_assoc
+-/
 
 end Hom
 
+#print FirstOrder.Language.HomClass.toHom /-
 /-- Any element of a `hom_class` can be realized as a first_order homomorphism. -/
 def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
   ⟨φ, fun _ => HomClass.map_fun φ, fun _ => HomClass.map_rel φ⟩
 #align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHom
+-/
 
 namespace Embedding
 
@@ -675,11 +706,13 @@ instance embeddingLike : EmbeddingLike (M ↪[L] N) M N
 #align first_order.language.embedding.embedding_like FirstOrder.Language.Embedding.embeddingLike
 -/
 
+#print FirstOrder.Language.Embedding.strongHomClass /-
 instance strongHomClass : StrongHomClass L (M ↪[L] N) M N
     where
   map_fun := map_fun'
   map_rel := map_rel'
 #align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClass
+-/
 
 #print FirstOrder.Language.Embedding.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
@@ -695,10 +728,12 @@ theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.embedding.map_fun FirstOrder.Language.Embedding.map_fun
 -/
 
+#print FirstOrder.Language.Embedding.map_constants /-
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constants
+-/
 
 #print FirstOrder.Language.Embedding.map_rel /-
 @[simp]
@@ -808,31 +843,39 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
 #align first_order.language.embedding.comp FirstOrder.Language.Embedding.comp
 -/
 
+#print FirstOrder.Language.Embedding.comp_apply /-
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_apply
+-/
 
+#print FirstOrder.Language.Embedding.comp_assoc /-
 /-- Composition of first-order embeddings is associative. -/
 theorem comp_assoc (f : M ↪[L] N) (g : N ↪[L] P) (h : P ↪[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assoc
+-/
 
+#print FirstOrder.Language.Embedding.comp_toHom /-
 @[simp]
 theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
     (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom := by ext;
   simp only [coe_to_hom, comp_apply, hom.comp_apply]
 #align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHom
+-/
 
 end Embedding
 
+#print FirstOrder.Language.StrongHomClass.toEmbedding /-
 /-- Any element of an injective `strong_hom_class` can be realized as a first_order embedding. -/
 def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [EmbeddingLike F M N]
     [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
   ⟨⟨φ, EmbeddingLike.injective φ⟩, fun _ => StrongHomClass.map_fun φ, fun _ =>
     StrongHomClass.map_rel φ⟩
 #align first_order.language.strong_hom_class.to_embedding FirstOrder.Language.StrongHomClass.toEmbedding
+-/
 
 namespace Equiv
 
@@ -899,10 +942,12 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.equiv.map_fun FirstOrder.Language.Equiv.map_fun
 -/
 
+#print FirstOrder.Language.Equiv.map_constants /-
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constants
+-/
 
 #print FirstOrder.Language.Equiv.map_rel /-
 @[simp]
@@ -1013,25 +1058,31 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 #align first_order.language.equiv.comp FirstOrder.Language.Equiv.comp
 -/
 
+#print FirstOrder.Language.Equiv.comp_apply /-
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_apply
+-/
 
+#print FirstOrder.Language.Equiv.comp_assoc /-
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.equiv.comp_assoc FirstOrder.Language.Equiv.comp_assoc
+-/
 
 end Equiv
 
+#print FirstOrder.Language.StrongHomClass.toEquiv /-
 /-- Any element of a bijective `strong_hom_class` can be realized as a first_order isomorphism. -/
 def StrongHomClass.toEquiv {F M N} [L.Structure M] [L.Structure N] [EquivLike F M N]
     [StrongHomClass L F M N] : F → M ≃[L] N := fun φ =>
   ⟨⟨φ, EquivLike.inv φ, EquivLike.left_inv φ, EquivLike.right_inv φ⟩, fun _ => HomClass.map_fun φ,
     fun _ => StrongHomClass.map_rel φ⟩
 #align first_order.language.strong_hom_class.to_equiv FirstOrder.Language.StrongHomClass.toEquiv
+-/
 
 section SumStructure
 
@@ -1047,29 +1098,37 @@ instance sumStructure : (L₁.Sum L₂).Structure S
 
 variable {L₁ L₂ S}
 
+#print FirstOrder.Language.funMap_sum_inl /-
 @[simp]
 theorem funMap_sum_inl {n : ℕ} (f : L₁.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inl f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inl FirstOrder.Language.funMap_sum_inl
+-/
 
+#print FirstOrder.Language.funMap_sum_inr /-
 @[simp]
 theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inr f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inr FirstOrder.Language.funMap_sum_inr
+-/
 
+#print FirstOrder.Language.relMap_sum_inl /-
 @[simp]
 theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inl R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inl
+-/
 
+#print FirstOrder.Language.relMap_sum_inr /-
 @[simp]
 theorem relMap_sum_inr {n : ℕ} (R : L₂.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inr R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inr FirstOrder.Language.relMap_sum_inr
+-/
 
 end SumStructure
 
Diff
@@ -178,7 +178,7 @@ theorem constants_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
 /-- The type of symbols in a given language. -/
 @[nolint has_nonempty_instance]
 def Symbols :=
-  Sum (Σl, L.Functions l) (Σl, L.Relations l)
+  Sum (Σ l, L.Functions l) (Σ l, L.Relations l)
 #align first_order.language.symbols FirstOrder.Language.Symbols
 -/
 
@@ -304,7 +304,7 @@ instance isEmpty_empty : IsEmpty Language.empty.Symbols :=
 -/
 
 #print FirstOrder.Language.Countable.countable_functions /-
-instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σl, L.Functions l) :=
+instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σ l, L.Functions l) :=
   @Function.Injective.countable _ _ h _ Sum.inl_injective
 #align first_order.language.countable.countable_functions FirstOrder.Language.Countable.countable_functions
 -/
@@ -510,7 +510,7 @@ end Structure
 /-- `hom_class L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `first_order.language.hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+    [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
@@ -518,7 +518,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 /-- `strong_hom_class L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+    [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
Diff
@@ -54,7 +54,7 @@ the continuum hypothesis*][flypitch_itp]
 
 universe u v u' v' w w'
 
-open Cardinal
+open scoped Cardinal
 
 open Cardinal
 
@@ -1149,7 +1149,7 @@ namespace Equiv
 
 open FirstOrder FirstOrder.Language FirstOrder.Language.Structure
 
-open FirstOrder
+open scoped FirstOrder
 
 variable {L : Language} {M : Type _} {N : Type _} [L.Structure M]
 
Diff
@@ -119,12 +119,6 @@ theorem lift_mk {i : ℕ} :
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 -/
 
-/- warning: first_order.sequence₂.sum_card -> FirstOrder.Sequence₂.sum_card is a dubious translation:
-lean 3 declaration is
-  forall (a₀ : Type.{u1}) (a₁ : Type.{u1}) (a₂ : Type.{u1}), Eq.{succ (succ u1)} Cardinal.{u1} (Cardinal.sum.{0, u1} Nat (fun (i : Nat) => Cardinal.mk.{u1} (FirstOrder.Sequence₂.{u1} a₀ a₁ a₂ i))) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.hasAdd.{u1}) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.hasAdd.{u1}) (Cardinal.mk.{u1} a₀) (Cardinal.mk.{u1} a₁)) (Cardinal.mk.{u1} a₂))
-but is expected to have type
-  forall (a₀ : Type.{u1}) (a₁ : Type.{u1}) (a₂ : Type.{u1}), Eq.{succ (succ u1)} Cardinal.{u1} (Cardinal.sum.{0, u1} Nat (fun (i : Nat) => Cardinal.mk.{u1} (FirstOrder.Sequence₂.{u1} a₀ a₁ a₂ i))) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.instAddCardinal.{u1}) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.instAddCardinal.{u1}) (Cardinal.mk.{u1} a₀) (Cardinal.mk.{u1} a₁)) (Cardinal.mk.{u1} a₂))
-Case conversion may be inaccurate. Consider using '#align first_order.sequence₂.sum_card FirstOrder.Sequence₂.sum_cardₓ'. -/
 @[simp]
 theorem sum_card : (Cardinal.sum fun i => #Sequence₂ a₀ a₁ a₂ i) = (#a₀) + (#a₁) + (#a₂) :=
   by
@@ -211,12 +205,6 @@ class IsAlgebraic : Prop where
 
 variable {L} {L' : Language.{u', v'}}
 
-/- warning: first_order.language.card_eq_card_functions_add_card_relations -> FirstOrder.Language.card_eq_card_functions_add_card_relations is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}}, Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} L) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (Cardinal.sum.{0, max u1 u2} Nat (fun (l : Nat) => Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L l)))) (Cardinal.sum.{0, max u2 u1} Nat (fun (l : Nat) => Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L l)))))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}}, Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} L) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u2 u1} Cardinal.{max u1 u2} Cardinal.{max u2 u1} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u2 u1} Cardinal.instAddCardinal.{max u1 u2}) (Cardinal.sum.{0, max u2 u1} Nat (fun (l : Nat) => Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L l)))) (Cardinal.sum.{0, max u1 u2} Nat (fun (l : Nat) => Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L l)))))
-Case conversion may be inaccurate. Consider using '#align first_order.language.card_eq_card_functions_add_card_relations FirstOrder.Language.card_eq_card_functions_add_card_relationsₓ'. -/
 theorem card_eq_card_functions_add_card_relations :
     L.card =
       (Cardinal.sum fun l => Cardinal.lift.{v} (#L.Functions l)) +
@@ -321,36 +309,18 @@ instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σ
 #align first_order.language.countable.countable_functions FirstOrder.Language.Countable.countable_functions
 -/
 
-/- warning: first_order.language.card_functions_sum -> FirstOrder.Language.card_functions_sum is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{succ (succ (max u1 u3))} Cardinal.{max u1 u3} (Cardinal.mk.{max u1 u3} (FirstOrder.Language.Functions.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{succ (max u1 u3), succ (max u1 u3), succ (max u1 u3)} Cardinal.{max u1 u3} Cardinal.{max u1 u3} Cardinal.{max u1 u3} (instHAdd.{succ (max u1 u3)} Cardinal.{max u1 u3} Cardinal.hasAdd.{max u1 u3}) (Cardinal.lift.{u3, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L i))) (Cardinal.lift.{u1, u3} (Cardinal.mk.{u3} (FirstOrder.Language.Functions.{u3, u4} L' i))))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{max (succ (succ u1)) (succ (succ u3))} Cardinal.{max u1 u3} (Cardinal.mk.{max u1 u3} (FirstOrder.Language.Functions.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{max (succ u1) (succ u3), max (succ u1) (succ u3), max (succ u1) (succ u3)} Cardinal.{max u1 u3} Cardinal.{max u3 u1} Cardinal.{max u1 u3} (instHAdd.{max (succ u1) (succ u3)} Cardinal.{max u1 u3} Cardinal.instAddCardinal.{max u1 u3}) (Cardinal.lift.{u3, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L i))) (Cardinal.lift.{u1, u3} (Cardinal.mk.{u3} (FirstOrder.Language.Functions.{u3, u4} L' i))))
-Case conversion may be inaccurate. Consider using '#align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sumₓ'. -/
 @[simp]
 theorem card_functions_sum (i : ℕ) :
     (#(L.Sum L').Functions i) = (#L.Functions i).lift + Cardinal.lift.{u} (#L'.Functions i) := by
   simp [language.sum]
 #align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sum
 
-/- warning: first_order.language.card_relations_sum -> FirstOrder.Language.card_relations_sum is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{succ (succ (max u2 u4))} Cardinal.{max u2 u4} (Cardinal.mk.{max u2 u4} (FirstOrder.Language.Relations.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{succ (max u2 u4), succ (max u2 u4), succ (max u2 u4)} Cardinal.{max u2 u4} Cardinal.{max u2 u4} Cardinal.{max u2 u4} (instHAdd.{succ (max u2 u4)} Cardinal.{max u2 u4} Cardinal.hasAdd.{max u2 u4}) (Cardinal.lift.{u4, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L i))) (Cardinal.lift.{u2, u4} (Cardinal.mk.{u4} (FirstOrder.Language.Relations.{u3, u4} L' i))))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{max (succ (succ u2)) (succ (succ u4))} Cardinal.{max u2 u4} (Cardinal.mk.{max u2 u4} (FirstOrder.Language.Relations.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{max (succ u2) (succ u4), max (succ u2) (succ u4), max (succ u2) (succ u4)} Cardinal.{max u2 u4} Cardinal.{max u4 u2} Cardinal.{max u2 u4} (instHAdd.{max (succ u2) (succ u4)} Cardinal.{max u2 u4} Cardinal.instAddCardinal.{max u2 u4}) (Cardinal.lift.{u4, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L i))) (Cardinal.lift.{u2, u4} (Cardinal.mk.{u4} (FirstOrder.Language.Relations.{u3, u4} L' i))))
-Case conversion may be inaccurate. Consider using '#align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sumₓ'. -/
 @[simp]
 theorem card_relations_sum (i : ℕ) :
     (#(L.Sum L').Relations i) = (#L.Relations i).lift + Cardinal.lift.{v} (#L'.Relations i) := by
   simp [language.sum]
 #align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sum
 
-/- warning: first_order.language.card_sum -> FirstOrder.Language.card_sum is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, Eq.{succ (succ (max (max u1 u3) u2 u4))} Cardinal.{max (max u1 u3) u2 u4} (FirstOrder.Language.card.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L')) (HAdd.hAdd.{succ (max (max u1 u3) u2 u4), succ (max (max u1 u3) u2 u4), succ (max (max u1 u3) u2 u4)} Cardinal.{max (max u1 u3) u2 u4} Cardinal.{max (max u1 u3) u2 u4} Cardinal.{max (max u1 u3) u2 u4} (instHAdd.{succ (max (max u1 u3) u2 u4)} Cardinal.{max (max u1 u3) u2 u4} Cardinal.hasAdd.{max (max u1 u3) u2 u4}) (Cardinal.lift.{max u3 u4, max u1 u2} (FirstOrder.Language.card.{u1, u2} L)) (Cardinal.lift.{max u1 u2, max u3 u4} (FirstOrder.Language.card.{u3, u4} L')))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, Eq.{max (max (max (succ (succ u1)) (succ (succ u3))) (succ (succ u2))) (succ (succ u4))} Cardinal.{max (max u1 u3) u2 u4} (FirstOrder.Language.card.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L')) (HAdd.hAdd.{max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4), max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4), max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4)} Cardinal.{max (max u1 u2) u3 u4} Cardinal.{max (max u3 u4) u1 u2} Cardinal.{max (max u1 u2) u3 u4} (instHAdd.{max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4)} Cardinal.{max (max u1 u2) u3 u4} Cardinal.instAddCardinal.{max (max (max u1 u3) u2) u4}) (Cardinal.lift.{max u3 u4, max u1 u2} (FirstOrder.Language.card.{u1, u2} L)) (Cardinal.lift.{max u1 u2, max u3 u4} (FirstOrder.Language.card.{u3, u4} L')))
-Case conversion may be inaccurate. Consider using '#align first_order.language.card_sum FirstOrder.Language.card_sumₓ'. -/
 @[simp]
 theorem card_sum :
     (L.Sum L').card = Cardinal.lift.{max u' v'} L.card + Cardinal.lift.{max u v} L'.card :=
@@ -361,12 +331,6 @@ theorem card_sum :
     add_comm (Cardinal.sum fun i => (#L'.functions i).lift), add_assoc, add_assoc]
 #align first_order.language.card_sum FirstOrder.Language.card_sum
 
-/- warning: first_order.language.card_mk₂ -> FirstOrder.Language.card_mk₂ is a dubious translation:
-lean 3 declaration is
-  forall (c : Type.{u1}) (f₁ : Type.{u1}) (f₂ : Type.{u1}) (r₁ : Type.{u2}) (r₂ : Type.{u2}), Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} (FirstOrder.Language.mk₂.{u1, u2} c f₁ f₂ r₁ r₂)) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} c)) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₁))) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₂))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₁))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₂)))
-but is expected to have type
-  forall (c : Type.{u1}) (f₁ : Type.{u1}) (f₂ : Type.{u1}) (r₁ : Type.{u2}) (r₂ : Type.{u2}), Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} (FirstOrder.Language.mk₂.{u1, u2} c f₁ f₂ r₁ r₂)) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u2 u1} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u2 u1} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} c)) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₁))) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₂))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₁))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₂)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.card_mk₂ FirstOrder.Language.card_mk₂ₓ'. -/
 @[simp]
 theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).card =
@@ -450,12 +414,6 @@ variable {L M N} {P : Type _} [L.Structure P] {Q : Type _} [L.Structure Q]
 instance : CoeTC L.Constants M :=
   ⟨fun c => funMap c default⟩
 
-/- warning: first_order.language.fun_map_eq_coe_constants -> FirstOrder.Language.funMap_eq_coe_constants is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] {c : FirstOrder.Language.Constants.{u1, u2} L} {x : (Fin (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) -> M}, Eq.{succ u3} M (FirstOrder.Language.Structure.funMap.{u1, u2, u3} L M _inst_1 (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) c x) ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] {c : FirstOrder.Language.Constants.{u1, u2} L} {x : (Fin (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) -> M}, Eq.{succ u3} M (FirstOrder.Language.Structure.funMap.{u1, u2, u3} L M _inst_1 (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) c x) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)
-Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_eq_coe_constants FirstOrder.Language.funMap_eq_coe_constantsₓ'. -/
 theorem funMap_eq_coe_constants {c : L.Constants} {x : Fin 0 → M} : funMap c x = c :=
   congr rfl (funext Fin.elim0)
 #align first_order.language.fun_map_eq_coe_constants FirstOrder.Language.funMap_eq_coe_constants
@@ -549,12 +507,6 @@ theorem relMap_apply₂ (r : r₂) (x y : M) :
 
 end Structure
 
-/- warning: first_order.language.hom_class -> FirstOrder.Language.HomClass is a dubious translation:
-lean 3 declaration is
-  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u1, u2}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N], Type
-but is expected to have type
-  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u2, u1}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u2, u1, u5} L N], Type
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class FirstOrder.Language.HomClassₓ'. -/
 /-- `hom_class L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `first_order.language.hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -563,12 +515,6 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
 
-/- warning: first_order.language.strong_hom_class -> FirstOrder.Language.StrongHomClass is a dubious translation:
-lean 3 declaration is
-  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u1, u2}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N], Type
-but is expected to have type
-  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u2, u1}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u2, u1, u5} L N], Type
-Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClassₓ'. -/
 /-- `strong_hom_class L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -577,12 +523,6 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
-/- warning: first_order.language.strong_hom_class.hom_class -> FirstOrder.Language.StrongHomClass.homClass is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u3} L F] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FunLike.{succ u5, succ u3, succ u4} N F (fun (_x : F) => M)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u5, u3, u4} L N F M _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u2, u1, u5, u3, u4} L N F M _inst_7 _inst_5 _inst_6
-Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClassₓ'. -/
 instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
     where
@@ -590,12 +530,6 @@ instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.St
   map_rel φ n R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 
-/- warning: first_order.language.hom_class.strong_hom_class_of_is_algebraic -> FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} [_inst_5 : FirstOrder.Language.IsAlgebraic.{u1, u2} L] {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_8 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_9 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7], FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} [_inst_5 : FirstOrder.Language.IsAlgebraic.{u1, u2} L] {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_8 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_9 : FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7], FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraicₓ'. -/
 /-- Not an instance to avoid a loop. -/
 def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
@@ -604,12 +538,6 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
   map_rel φ n R x := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 
-/- warning: first_order.language.hom_class.map_constants -> FirstOrder.Language.HomClass.map_constants is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u5} N (coeFn.{succ u3, max (succ u4) (succ u5)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N) _inst_7) φ ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u4} L M _inst_5))) c)) ((fun (a : Type.{u1}) (b : Type.{u5}) [self : HasLiftT.{succ u1, succ u5} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u5} L N _inst_6))) c)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constantsₓ'. -/
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
@@ -625,12 +553,6 @@ instance funLike : FunLike (M →[L] N) M fun _ => N
 #align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
 -/
 
-/- warning: first_order.language.hom.hom_class -> FirstOrder.Language.Hom.homClass is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.HomClass.{u1, u2, max u3 u4, u3, u4} L (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) _inst_1 _inst_2
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.HomClass.{u2, u1, max u4 u3, u3, u4} L (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) _inst_1 _inst_2
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom.hom_class FirstOrder.Language.Hom.homClassₓ'. -/
 instance homClass : HomClass L (M →[L] N) M N
     where
   map_fun := map_fun'
@@ -674,12 +596,6 @@ theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.hom.map_fun FirstOrder.Language.Hom.map_fun
 -/
 
-/- warning: first_order.language.hom.map_constants -> FirstOrder.Language.Hom.map_constants is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
@@ -724,23 +640,11 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
 #align first_order.language.hom.comp FirstOrder.Language.Hom.comp
 -/
 
-/- warning: first_order.language.hom.comp_apply -> FirstOrder.Language.Hom.comp_apply is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_apply
 
-/- warning: first_order.language.hom.comp_assoc -> FirstOrder.Language.Hom.comp_assoc is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Hom.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Hom.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Hom.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Hom.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Hom.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Hom.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Hom.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Hom.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Hom.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Hom.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Hom.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_assoc FirstOrder.Language.Hom.comp_assocₓ'. -/
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
@@ -749,12 +653,6 @@ theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
 
 end Hom
 
-/- warning: first_order.language.hom_class.to_hom -> FirstOrder.Language.HomClass.toHom is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], F -> (FirstOrder.Language.Hom.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], F -> (FirstOrder.Language.Hom.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHomₓ'. -/
 /-- Any element of a `hom_class` can be realized as a first_order homomorphism. -/
 def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
@@ -777,12 +675,6 @@ instance embeddingLike : EmbeddingLike (M ↪[L] N) M N
 #align first_order.language.embedding.embedding_like FirstOrder.Language.Embedding.embeddingLike
 -/
 
-/- warning: first_order.language.embedding.strong_hom_class -> FirstOrder.Language.Embedding.strongHomClass is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.StrongHomClass.{u1, u2, max u3 u4, u3, u4} L (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EmbeddingLike.toFunLike.{succ (max u3 u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) _inst_1 _inst_2
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.StrongHomClass.{u2, u1, max u4 u3, u3, u4} L (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) _inst_1 _inst_2
-Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClassₓ'. -/
 instance strongHomClass : StrongHomClass L (M ↪[L] N) M N
     where
   map_fun := map_fun'
@@ -803,12 +695,6 @@ theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.embedding.map_fun FirstOrder.Language.Embedding.map_fun
 -/
 
-/- warning: first_order.language.embedding.map_constants -> FirstOrder.Language.Embedding.map_constants is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
-Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
@@ -922,35 +808,17 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
 #align first_order.language.embedding.comp FirstOrder.Language.Embedding.comp
 -/
 
-/- warning: first_order.language.embedding.comp_apply -> FirstOrder.Language.Embedding.comp_apply is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
-Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_apply
 
-/- warning: first_order.language.embedding.comp_assoc -> FirstOrder.Language.Embedding.comp_assoc is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Embedding.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Embedding.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Embedding.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Embedding.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Embedding.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Embedding.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Embedding.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Embedding.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
-Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assocₓ'. -/
 /-- Composition of first-order embeddings is associative. -/
 theorem comp_assoc (f : M ↪[L] N) (g : N ↪[L] P) (h : P ↪[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assoc
 
-/- warning: first_order.language.embedding.comp_to_hom -> FirstOrder.Language.Embedding.comp_toHom is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (hnp : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (hmn : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2), Eq.{max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.toHom.{u1, u2, u3, u5} L M P _inst_1 _inst_3 (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 hnp hmn)) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 (FirstOrder.Language.Embedding.toHom.{u1, u2, u4, u5} L N P _inst_2 _inst_3 hnp) (FirstOrder.Language.Embedding.toHom.{u1, u2, u3, u4} L M N _inst_1 _inst_2 hmn))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (hnp : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (hmn : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2), Eq.{max (succ u4) (succ u1)} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.toHom.{u2, u3, u4, u1} L M P _inst_1 _inst_3 (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 hnp hmn)) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 (FirstOrder.Language.Embedding.toHom.{u2, u3, u5, u1} L N P _inst_2 _inst_3 hnp) (FirstOrder.Language.Embedding.toHom.{u2, u3, u4, u5} L M N _inst_1 _inst_2 hmn))
-Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHomₓ'. -/
 @[simp]
 theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
     (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom := by ext;
@@ -959,12 +827,6 @@ theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
 
 end Embedding
 
-/- warning: first_order.language.strong_hom_class.to_embedding -> FirstOrder.Language.StrongHomClass.toEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EmbeddingLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N _inst_7) _inst_5 _inst_6], F -> (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EmbeddingLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N _inst_7) _inst_5 _inst_6], F -> (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.to_embedding FirstOrder.Language.StrongHomClass.toEmbeddingₓ'. -/
 /-- Any element of an injective `strong_hom_class` can be realized as a first_order embedding. -/
 def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [EmbeddingLike F M N]
     [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
@@ -1037,12 +899,6 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 #align first_order.language.equiv.map_fun FirstOrder.Language.Equiv.map_fun
 -/
 
-/- warning: first_order.language.equiv.map_constants -> FirstOrder.Language.Equiv.map_constants is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
-Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
@@ -1157,23 +1013,11 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 #align first_order.language.equiv.comp FirstOrder.Language.Equiv.comp
 -/
 
-/- warning: first_order.language.equiv.comp_apply -> FirstOrder.Language.Equiv.comp_apply is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
-Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_apply
 
-/- warning: first_order.language.equiv.comp_assoc -> FirstOrder.Language.Equiv.comp_assoc is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Equiv.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Equiv.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Equiv.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
-but is expected to have type
-  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Equiv.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Equiv.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Equiv.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Equiv.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Equiv.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
-Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_assoc FirstOrder.Language.Equiv.comp_assocₓ'. -/
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
@@ -1182,12 +1026,6 @@ theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
 
 end Equiv
 
-/- warning: first_order.language.strong_hom_class.to_equiv -> FirstOrder.Language.StrongHomClass.toEquiv is a dubious translation:
-lean 3 declaration is
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EquivLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N (EquivLike.toEmbeddingLike.{succ u3, succ u4, succ u5} F M N _inst_7)) _inst_5 _inst_6], F -> (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EquivLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N (EquivLike.toEmbeddingLike.{succ u3, succ u4, succ u5} F M N _inst_7)) _inst_5 _inst_6], F -> (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
-Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.to_equiv FirstOrder.Language.StrongHomClass.toEquivₓ'. -/
 /-- Any element of a bijective `strong_hom_class` can be realized as a first_order isomorphism. -/
 def StrongHomClass.toEquiv {F M N} [L.Structure M] [L.Structure N] [EquivLike F M N]
     [StrongHomClass L F M N] : F → M ≃[L] N := fun φ =>
@@ -1209,48 +1047,24 @@ instance sumStructure : (L₁.Sum L₂).Structure S
 
 variable {L₁ L₂ S}
 
-/- warning: first_order.language.fun_map_sum_inl -> FirstOrder.Language.funMap_sum_inl is a dubious translation:
-lean 3 declaration is
-  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u1, u2} L₁ n), Eq.{succ u5} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u1, u3} (FirstOrder.Language.Functions.{u1, u2} L₁ n) (FirstOrder.Language.Functions.{u3, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u1, u2, u5} L₁ S _inst_5 n f)
-but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u5, u2} (FirstOrder.Language.Functions.{u5, u4} L₁ n) (FirstOrder.Language.Functions.{u2, u1} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u5, u4, u3} L₁ S _inst_5 n f)
-Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_sum_inl FirstOrder.Language.funMap_sum_inlₓ'. -/
 @[simp]
 theorem funMap_sum_inl {n : ℕ} (f : L₁.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inl f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inl FirstOrder.Language.funMap_sum_inl
 
-/- warning: first_order.language.fun_map_sum_inr -> FirstOrder.Language.funMap_sum_inr is a dubious translation:
-lean 3 declaration is
-  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u3, u4} L₂ n), Eq.{succ u5} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u3} (FirstOrder.Language.Functions.{u1, u2} L₁ n) (FirstOrder.Language.Functions.{u3, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u3, u4, u5} L₂ S _inst_6 n f)
-but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u2, u5} (FirstOrder.Language.Functions.{u2, u1} L₁ n) (FirstOrder.Language.Functions.{u5, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u5, u4, u3} L₂ S _inst_6 n f)
-Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_sum_inr FirstOrder.Language.funMap_sum_inrₓ'. -/
 @[simp]
 theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inr f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inr FirstOrder.Language.funMap_sum_inr
 
-/- warning: first_order.language.rel_map_sum_inl -> FirstOrder.Language.relMap_sum_inl is a dubious translation:
-lean 3 declaration is
-  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u1, u2} L₁ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u1, u2, u5} L₁ S _inst_5 n R)
-but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u4, u1} (FirstOrder.Language.Relations.{u5, u4} L₁ n) (FirstOrder.Language.Relations.{u2, u1} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u5, u4, u3} L₁ S _inst_5 n R)
-Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inlₓ'. -/
 @[simp]
 theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inl R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inl
 
-/- warning: first_order.language.rel_map_sum_inr -> FirstOrder.Language.relMap_sum_inr is a dubious translation:
-lean 3 declaration is
-  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u3, u4} L₂ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u3, u4, u5} L₂ S _inst_6 n R)
-but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u4} (FirstOrder.Language.Relations.{u2, u1} L₁ n) (FirstOrder.Language.Relations.{u5, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u5, u4, u3} L₂ S _inst_6 n R)
-Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inr FirstOrder.Language.relMap_sum_inrₓ'. -/
 @[simp]
 theorem relMap_sum_inr {n : ℕ} (R : L₂.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inr R) = RelMap R :=
Diff
@@ -621,11 +621,7 @@ namespace Hom
 instance funLike : FunLike (M →[L] N) M fun _ => N
     where
   coe := Hom.toFun
-  coe_injective' f g h := by
-    cases f
-    cases g
-    cases h
-    rfl
+  coe_injective' f g h := by cases f; cases g; cases h; rfl
 #align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
 -/
 
@@ -891,9 +887,7 @@ theorem coeFn_ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Inject
 #print FirstOrder.Language.Embedding.ofInjective_toHom /-
 @[simp]
 theorem ofInjective_toHom [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
-    (ofInjective hf).toHom = f := by
-  ext
-  simp
+    (ofInjective hf).toHom = f := by ext; simp
 #align first_order.language.embedding.of_injective_to_hom FirstOrder.Language.Embedding.ofInjective_toHom
 -/
 
@@ -959,9 +953,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHomₓ'. -/
 @[simp]
 theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
-    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
-  by
-  ext
+    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom := by ext;
   simp only [coe_to_hom, comp_apply, hom.comp_apply]
 #align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHom
 
Diff
@@ -394,11 +394,11 @@ variable (N : Type w') [L.Structure M] [L.Structure N]
 
 open Structure
 
-#print FirstOrder.Language.inhabited.trivialStructure /-
+#print FirstOrder.Language.Inhabited.trivialStructure /-
 /-- Used for defining `first_order.language.Theory.Model.inhabited`. -/
-def inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
+def Inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
   ⟨default, default⟩
-#align first_order.language.inhabited.trivial_structure FirstOrder.Language.inhabited.trivialStructure
+#align first_order.language.inhabited.trivial_structure FirstOrder.Language.Inhabited.trivialStructure
 -/
 
 /-! ### Maps -/
Diff
@@ -608,7 +608,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u5} N (coeFn.{succ u3, max (succ u4) (succ u5)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N) _inst_7) φ ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u4} L M _inst_5))) c)) ((fun (a : Type.{u1}) (b : Type.{u5}) [self : HasLiftT.{succ u1, succ u5} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u5} L N _inst_6))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
+  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5516 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constantsₓ'. -/
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
@@ -682,7 +682,7 @@ theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
@@ -732,7 +732,7 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5742 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -811,7 +811,7 @@ theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
@@ -932,7 +932,7 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6670 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -1049,7 +1049,7 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
@@ -1169,7 +1169,7 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8209 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -1245,7 +1245,7 @@ theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
 lean 3 declaration is
   forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u1, u2} L₁ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u1, u2, u5} L₁ S _inst_5 n R)
 but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.rel_map.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u4, u1} (FirstOrder.Language.Relations.{u5, u4} L₁ n) (FirstOrder.Language.Relations.{u2, u1} L₂ n) R)) (FirstOrder.Language.Structure.rel_map.{u5, u4, u3} L₁ S _inst_5 n R)
+  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u4, u1} (FirstOrder.Language.Relations.{u5, u4} L₁ n) (FirstOrder.Language.Relations.{u2, u1} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u5, u4, u3} L₁ S _inst_5 n R)
 Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inlₓ'. -/
 @[simp]
 theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
@@ -1257,7 +1257,7 @@ theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
 lean 3 declaration is
   forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u3, u4} L₂ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u3, u4, u5} L₂ S _inst_6 n R)
 but is expected to have type
-  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.rel_map.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u4} (FirstOrder.Language.Relations.{u2, u1} L₁ n) (FirstOrder.Language.Relations.{u5, u4} L₂ n) R)) (FirstOrder.Language.Structure.rel_map.{u5, u4, u3} L₂ S _inst_6 n R)
+  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u4} (FirstOrder.Language.Relations.{u2, u1} L₁ n) (FirstOrder.Language.Relations.{u5, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u5, u4, u3} L₂ S _inst_6 n R)
 Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inr FirstOrder.Language.relMap_sum_inrₓ'. -/
 @[simp]
 theorem relMap_sum_inr {n : ℕ} (R : L₂.Relations n) :
Diff
@@ -608,7 +608,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u5} N (coeFn.{succ u3, max (succ u4) (succ u5)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N) _inst_7) φ ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u4} L M _inst_5))) c)) ((fun (a : Type.{u1}) (b : Type.{u5}) [self : HasLiftT.{succ u1, succ u5} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u5} L N _inst_6))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
+  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5502 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constantsₓ'. -/
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
@@ -682,7 +682,7 @@ theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
@@ -732,7 +732,7 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5728 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -811,7 +811,7 @@ theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
@@ -932,7 +932,7 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6656 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -1049,7 +1049,7 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
@@ -1169,7 +1169,7 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8195 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
Diff
@@ -581,7 +581,7 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} {_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M} {_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N} [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u3} L F] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FunLike.{succ u5, succ u3, succ u4} N F (fun (_x : F) => M)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u5, u3, u4} L N F M _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u2, u1, u5, u3, u4} L N F M _inst_7 _inst_5 _inst_6
 Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClassₓ'. -/
 instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
@@ -608,7 +608,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u5} N (coeFn.{succ u3, max (succ u4) (succ u5)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N) _inst_7) φ ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u4} L M _inst_5))) c)) ((fun (a : Type.{u1}) (b : Type.{u5}) [self : HasLiftT.{succ u1, succ u5} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u5} L N _inst_6))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
+  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5498 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constantsₓ'. -/
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
@@ -682,7 +682,7 @@ theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
@@ -732,7 +732,7 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5724 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -811,7 +811,7 @@ theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
@@ -932,7 +932,7 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6652 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
@@ -1049,7 +1049,7 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
@@ -1169,7 +1169,7 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8191 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
Diff
@@ -1049,7 +1049,7 @@ theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
 but is expected to have type
-  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
@@ -1169,7 +1169,7 @@ def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
 lean 3 declaration is
   forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
 but is expected to have type
-  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8185 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
 Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn
 
 ! This file was ported from Lean 3 source module model_theory.basic
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.SetTheory.Cardinal.Basic
 
 /-!
 # Basics on First-Order Structures
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
 This file defines first-order languages and structures in the style of the
 [Flypitch project](https://flypitch.github.io/), as well as several important maps between
 structures.
Diff
@@ -60,6 +60,7 @@ namespace FirstOrder
 /-! ### Languages and Structures -/
 
 
+#print FirstOrder.Language /-
 -- intended to be used with explicit universe parameters
 /-- A first-order language consists of a type of functions of every natural-number arity and a
   type of relations of every natural-number arity. -/
@@ -68,7 +69,9 @@ structure Language where
   Functions : ℕ → Type u
   Relations : ℕ → Type v
 #align first_order.language FirstOrder.Language
+-/
 
+#print FirstOrder.Sequence₂ /-
 /-- Used to define `first_order.language₂`. -/
 @[simp]
 def Sequence₂ (a₀ a₁ a₂ : Type u) : ℕ → Type u
@@ -77,33 +80,48 @@ def Sequence₂ (a₀ a₁ a₂ : Type u) : ℕ → Type u
   | 2 => a₂
   | _ => PEmpty
 #align first_order.sequence₂ FirstOrder.Sequence₂
+-/
 
 namespace Sequence₂
 
 variable (a₀ a₁ a₂ : Type u)
 
+#print FirstOrder.Sequence₂.inhabited₀ /-
 instance inhabited₀ [h : Inhabited a₀] : Inhabited (Sequence₂ a₀ a₁ a₂ 0) :=
   h
 #align first_order.sequence₂.inhabited₀ FirstOrder.Sequence₂.inhabited₀
+-/
 
+#print FirstOrder.Sequence₂.inhabited₁ /-
 instance inhabited₁ [h : Inhabited a₁] : Inhabited (Sequence₂ a₀ a₁ a₂ 1) :=
   h
 #align first_order.sequence₂.inhabited₁ FirstOrder.Sequence₂.inhabited₁
+-/
 
+#print FirstOrder.Sequence₂.inhabited₂ /-
 instance inhabited₂ [h : Inhabited a₂] : Inhabited (Sequence₂ a₀ a₁ a₂ 2) :=
   h
 #align first_order.sequence₂.inhabited₂ FirstOrder.Sequence₂.inhabited₂
+-/
 
 instance {n : ℕ} : IsEmpty (Sequence₂ a₀ a₁ a₂ (n + 3)) :=
   PEmpty.isEmpty
 
+#print FirstOrder.Sequence₂.lift_mk /-
 @[simp]
 theorem lift_mk {i : ℕ} :
     Cardinal.lift (#Sequence₂ a₀ a₁ a₂ i) = (#Sequence₂ (ULift a₀) (ULift a₁) (ULift a₂) i) := by
   rcases i with (_ | _ | _ | i) <;>
     simp only [sequence₂, mk_ulift, mk_fintype, Fintype.card_of_isEmpty, Nat.cast_zero, lift_zero]
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
+-/
 
+/- warning: first_order.sequence₂.sum_card -> FirstOrder.Sequence₂.sum_card is a dubious translation:
+lean 3 declaration is
+  forall (a₀ : Type.{u1}) (a₁ : Type.{u1}) (a₂ : Type.{u1}), Eq.{succ (succ u1)} Cardinal.{u1} (Cardinal.sum.{0, u1} Nat (fun (i : Nat) => Cardinal.mk.{u1} (FirstOrder.Sequence₂.{u1} a₀ a₁ a₂ i))) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.hasAdd.{u1}) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.hasAdd.{u1}) (Cardinal.mk.{u1} a₀) (Cardinal.mk.{u1} a₁)) (Cardinal.mk.{u1} a₂))
+but is expected to have type
+  forall (a₀ : Type.{u1}) (a₁ : Type.{u1}) (a₂ : Type.{u1}), Eq.{succ (succ u1)} Cardinal.{u1} (Cardinal.sum.{0, u1} Nat (fun (i : Nat) => Cardinal.mk.{u1} (FirstOrder.Sequence₂.{u1} a₀ a₁ a₂ i))) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.instAddCardinal.{u1}) (HAdd.hAdd.{succ u1, succ u1, succ u1} Cardinal.{u1} Cardinal.{u1} Cardinal.{u1} (instHAdd.{succ u1} Cardinal.{u1} Cardinal.instAddCardinal.{u1}) (Cardinal.mk.{u1} a₀) (Cardinal.mk.{u1} a₁)) (Cardinal.mk.{u1} a₂))
+Case conversion may be inaccurate. Consider using '#align first_order.sequence₂.sum_card FirstOrder.Sequence₂.sum_cardₓ'. -/
 @[simp]
 theorem sum_card : (Cardinal.sum fun i => #Sequence₂ a₀ a₁ a₂ i) = (#a₀) + (#a₁) + (#a₂) :=
   by
@@ -115,63 +133,87 @@ end Sequence₂
 
 namespace Language
 
+#print FirstOrder.Language.mk₂ /-
 /-- A constructor for languages with only constants, unary and binary functions, and
 unary and binary relations. -/
 @[simps]
 protected def mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) : Language :=
   ⟨Sequence₂ c f₁ f₂, Sequence₂ PEmpty r₁ r₂⟩
 #align first_order.language.mk₂ FirstOrder.Language.mk₂
+-/
 
+#print FirstOrder.Language.empty /-
 /-- The empty language has no symbols. -/
 protected def empty : Language :=
   ⟨fun _ => Empty, fun _ => Empty⟩
 #align first_order.language.empty FirstOrder.Language.empty
+-/
 
 instance : Inhabited Language :=
   ⟨Language.empty⟩
 
+#print FirstOrder.Language.sum /-
 /-- The sum of two languages consists of the disjoint union of their symbols. -/
 protected def sum (L : Language.{u, v}) (L' : Language.{u', v'}) : Language :=
   ⟨fun n => Sum (L.Functions n) (L'.Functions n), fun n => Sum (L.Relations n) (L'.Relations n)⟩
 #align first_order.language.sum FirstOrder.Language.sum
+-/
 
 variable (L : Language.{u, v})
 
+#print FirstOrder.Language.Constants /-
 /-- The type of constants in a given language. -/
 @[nolint has_nonempty_instance]
 protected def Constants :=
   L.Functions 0
 #align first_order.language.constants FirstOrder.Language.Constants
+-/
 
+#print FirstOrder.Language.constants_mk₂ /-
 @[simp]
 theorem constants_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).Constants = c :=
   rfl
 #align first_order.language.constants_mk₂ FirstOrder.Language.constants_mk₂
+-/
 
+#print FirstOrder.Language.Symbols /-
 /-- The type of symbols in a given language. -/
 @[nolint has_nonempty_instance]
 def Symbols :=
   Sum (Σl, L.Functions l) (Σl, L.Relations l)
 #align first_order.language.symbols FirstOrder.Language.Symbols
+-/
 
+#print FirstOrder.Language.card /-
 /-- The cardinality of a language is the cardinality of its type of symbols. -/
 def card : Cardinal :=
   #L.Symbols
 #align first_order.language.card FirstOrder.Language.card
+-/
 
+#print FirstOrder.Language.IsRelational /-
 /-- A language is relational when it has no function symbols. -/
 class IsRelational : Prop where
   empty_functions : ∀ n, IsEmpty (L.Functions n)
 #align first_order.language.is_relational FirstOrder.Language.IsRelational
+-/
 
+#print FirstOrder.Language.IsAlgebraic /-
 /-- A language is algebraic when it has no relation symbols. -/
 class IsAlgebraic : Prop where
   empty_relations : ∀ n, IsEmpty (L.Relations n)
 #align first_order.language.is_algebraic FirstOrder.Language.IsAlgebraic
+-/
 
 variable {L} {L' : Language.{u', v'}}
 
+/- warning: first_order.language.card_eq_card_functions_add_card_relations -> FirstOrder.Language.card_eq_card_functions_add_card_relations is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}}, Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} L) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (Cardinal.sum.{0, max u1 u2} Nat (fun (l : Nat) => Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L l)))) (Cardinal.sum.{0, max u2 u1} Nat (fun (l : Nat) => Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L l)))))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}}, Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} L) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u2 u1} Cardinal.{max u1 u2} Cardinal.{max u2 u1} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u2 u1} Cardinal.instAddCardinal.{max u1 u2}) (Cardinal.sum.{0, max u2 u1} Nat (fun (l : Nat) => Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L l)))) (Cardinal.sum.{0, max u1 u2} Nat (fun (l : Nat) => Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L l)))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.card_eq_card_functions_add_card_relations FirstOrder.Language.card_eq_card_functions_add_card_relationsₓ'. -/
 theorem card_eq_card_functions_add_card_relations :
     L.card =
       (Cardinal.sum fun l => Cardinal.lift.{v} (#L.Functions l)) +
@@ -185,83 +227,127 @@ instance [L.IsRelational] {n : ℕ} : IsEmpty (L.Functions n) :=
 instance [L.IsAlgebraic] {n : ℕ} : IsEmpty (L.Relations n) :=
   IsAlgebraic.empty_relations n
 
+#print FirstOrder.Language.isRelational_of_empty_functions /-
 instance isRelational_of_empty_functions {symb : ℕ → Type _} :
     IsRelational ⟨fun _ => Empty, symb⟩ :=
   ⟨fun _ => Empty.isEmpty⟩
 #align first_order.language.is_relational_of_empty_functions FirstOrder.Language.isRelational_of_empty_functions
+-/
 
+#print FirstOrder.Language.isAlgebraic_of_empty_relations /-
 instance isAlgebraic_of_empty_relations {symb : ℕ → Type _} : IsAlgebraic ⟨symb, fun _ => Empty⟩ :=
   ⟨fun _ => Empty.isEmpty⟩
 #align first_order.language.is_algebraic_of_empty_relations FirstOrder.Language.isAlgebraic_of_empty_relations
+-/
 
+#print FirstOrder.Language.isRelational_empty /-
 instance isRelational_empty : IsRelational Language.empty :=
   Language.isRelational_of_empty_functions
 #align first_order.language.is_relational_empty FirstOrder.Language.isRelational_empty
+-/
 
+#print FirstOrder.Language.isAlgebraic_empty /-
 instance isAlgebraic_empty : IsAlgebraic Language.empty :=
   Language.isAlgebraic_of_empty_relations
 #align first_order.language.is_algebraic_empty FirstOrder.Language.isAlgebraic_empty
+-/
 
+#print FirstOrder.Language.isRelational_sum /-
 instance isRelational_sum [L.IsRelational] [L'.IsRelational] : IsRelational (L.Sum L') :=
   ⟨fun n => Sum.isEmpty⟩
 #align first_order.language.is_relational_sum FirstOrder.Language.isRelational_sum
+-/
 
+#print FirstOrder.Language.isAlgebraic_sum /-
 instance isAlgebraic_sum [L.IsAlgebraic] [L'.IsAlgebraic] : IsAlgebraic (L.Sum L') :=
   ⟨fun n => Sum.isEmpty⟩
 #align first_order.language.is_algebraic_sum FirstOrder.Language.isAlgebraic_sum
+-/
 
+#print FirstOrder.Language.isRelational_mk₂ /-
 instance isRelational_mk₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} [h0 : IsEmpty c] [h1 : IsEmpty f₁]
     [h2 : IsEmpty f₂] : IsRelational (Language.mk₂ c f₁ f₂ r₁ r₂) :=
   ⟨fun n =>
     Nat.casesOn n h0 fun n => Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun _ => PEmpty.isEmpty⟩
 #align first_order.language.is_relational_mk₂ FirstOrder.Language.isRelational_mk₂
+-/
 
+#print FirstOrder.Language.isAlgebraic_mk₂ /-
 instance isAlgebraic_mk₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} [h1 : IsEmpty r₁] [h2 : IsEmpty r₂] :
     IsAlgebraic (Language.mk₂ c f₁ f₂ r₁ r₂) :=
   ⟨fun n =>
     Nat.casesOn n PEmpty.isEmpty fun n =>
       Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun _ => PEmpty.isEmpty⟩
 #align first_order.language.is_algebraic_mk₂ FirstOrder.Language.isAlgebraic_mk₂
+-/
 
+#print FirstOrder.Language.subsingleton_mk₂_functions /-
 instance subsingleton_mk₂_functions {c f₁ f₂ : Type u} {r₁ r₂ : Type v} [h0 : Subsingleton c]
     [h1 : Subsingleton f₁] [h2 : Subsingleton f₂] {n : ℕ} :
     Subsingleton ((Language.mk₂ c f₁ f₂ r₁ r₂).Functions n) :=
   Nat.casesOn n h0 fun n =>
     Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun n => ⟨fun x => PEmpty.elim x⟩
 #align first_order.language.subsingleton_mk₂_functions FirstOrder.Language.subsingleton_mk₂_functions
+-/
 
+#print FirstOrder.Language.subsingleton_mk₂_relations /-
 instance subsingleton_mk₂_relations {c f₁ f₂ : Type u} {r₁ r₂ : Type v} [h1 : Subsingleton r₁]
     [h2 : Subsingleton r₂] {n : ℕ} : Subsingleton ((Language.mk₂ c f₁ f₂ r₁ r₂).Relations n) :=
   Nat.casesOn n ⟨fun x => PEmpty.elim x⟩ fun n =>
     Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun n => ⟨fun x => PEmpty.elim x⟩
 #align first_order.language.subsingleton_mk₂_relations FirstOrder.Language.subsingleton_mk₂_relations
+-/
 
+#print FirstOrder.Language.empty_card /-
 @[simp]
 theorem empty_card : Language.empty.card = 0 := by simp [card_eq_card_functions_add_card_relations]
 #align first_order.language.empty_card FirstOrder.Language.empty_card
+-/
 
+#print FirstOrder.Language.isEmpty_empty /-
 instance isEmpty_empty : IsEmpty Language.empty.Symbols :=
   by
   simp only [language.symbols, isEmpty_sum, isEmpty_sigma]
   exact ⟨fun _ => inferInstance, fun _ => inferInstance⟩
 #align first_order.language.is_empty_empty FirstOrder.Language.isEmpty_empty
+-/
 
+#print FirstOrder.Language.Countable.countable_functions /-
 instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σl, L.Functions l) :=
   @Function.Injective.countable _ _ h _ Sum.inl_injective
 #align first_order.language.countable.countable_functions FirstOrder.Language.Countable.countable_functions
+-/
 
+/- warning: first_order.language.card_functions_sum -> FirstOrder.Language.card_functions_sum is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{succ (succ (max u1 u3))} Cardinal.{max u1 u3} (Cardinal.mk.{max u1 u3} (FirstOrder.Language.Functions.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{succ (max u1 u3), succ (max u1 u3), succ (max u1 u3)} Cardinal.{max u1 u3} Cardinal.{max u1 u3} Cardinal.{max u1 u3} (instHAdd.{succ (max u1 u3)} Cardinal.{max u1 u3} Cardinal.hasAdd.{max u1 u3}) (Cardinal.lift.{u3, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L i))) (Cardinal.lift.{u1, u3} (Cardinal.mk.{u3} (FirstOrder.Language.Functions.{u3, u4} L' i))))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{max (succ (succ u1)) (succ (succ u3))} Cardinal.{max u1 u3} (Cardinal.mk.{max u1 u3} (FirstOrder.Language.Functions.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{max (succ u1) (succ u3), max (succ u1) (succ u3), max (succ u1) (succ u3)} Cardinal.{max u1 u3} Cardinal.{max u3 u1} Cardinal.{max u1 u3} (instHAdd.{max (succ u1) (succ u3)} Cardinal.{max u1 u3} Cardinal.instAddCardinal.{max u1 u3}) (Cardinal.lift.{u3, u1} (Cardinal.mk.{u1} (FirstOrder.Language.Functions.{u1, u2} L i))) (Cardinal.lift.{u1, u3} (Cardinal.mk.{u3} (FirstOrder.Language.Functions.{u3, u4} L' i))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sumₓ'. -/
 @[simp]
 theorem card_functions_sum (i : ℕ) :
     (#(L.Sum L').Functions i) = (#L.Functions i).lift + Cardinal.lift.{u} (#L'.Functions i) := by
   simp [language.sum]
 #align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sum
 
+/- warning: first_order.language.card_relations_sum -> FirstOrder.Language.card_relations_sum is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{succ (succ (max u2 u4))} Cardinal.{max u2 u4} (Cardinal.mk.{max u2 u4} (FirstOrder.Language.Relations.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{succ (max u2 u4), succ (max u2 u4), succ (max u2 u4)} Cardinal.{max u2 u4} Cardinal.{max u2 u4} Cardinal.{max u2 u4} (instHAdd.{succ (max u2 u4)} Cardinal.{max u2 u4} Cardinal.hasAdd.{max u2 u4}) (Cardinal.lift.{u4, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L i))) (Cardinal.lift.{u2, u4} (Cardinal.mk.{u4} (FirstOrder.Language.Relations.{u3, u4} L' i))))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} (i : Nat), Eq.{max (succ (succ u2)) (succ (succ u4))} Cardinal.{max u2 u4} (Cardinal.mk.{max u2 u4} (FirstOrder.Language.Relations.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L') i)) (HAdd.hAdd.{max (succ u2) (succ u4), max (succ u2) (succ u4), max (succ u2) (succ u4)} Cardinal.{max u2 u4} Cardinal.{max u4 u2} Cardinal.{max u2 u4} (instHAdd.{max (succ u2) (succ u4)} Cardinal.{max u2 u4} Cardinal.instAddCardinal.{max u2 u4}) (Cardinal.lift.{u4, u2} (Cardinal.mk.{u2} (FirstOrder.Language.Relations.{u1, u2} L i))) (Cardinal.lift.{u2, u4} (Cardinal.mk.{u4} (FirstOrder.Language.Relations.{u3, u4} L' i))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sumₓ'. -/
 @[simp]
 theorem card_relations_sum (i : ℕ) :
     (#(L.Sum L').Relations i) = (#L.Relations i).lift + Cardinal.lift.{v} (#L'.Relations i) := by
   simp [language.sum]
 #align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sum
 
+/- warning: first_order.language.card_sum -> FirstOrder.Language.card_sum is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, Eq.{succ (succ (max (max u1 u3) u2 u4))} Cardinal.{max (max u1 u3) u2 u4} (FirstOrder.Language.card.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L')) (HAdd.hAdd.{succ (max (max u1 u3) u2 u4), succ (max (max u1 u3) u2 u4), succ (max (max u1 u3) u2 u4)} Cardinal.{max (max u1 u3) u2 u4} Cardinal.{max (max u1 u3) u2 u4} Cardinal.{max (max u1 u3) u2 u4} (instHAdd.{succ (max (max u1 u3) u2 u4)} Cardinal.{max (max u1 u3) u2 u4} Cardinal.hasAdd.{max (max u1 u3) u2 u4}) (Cardinal.lift.{max u3 u4, max u1 u2} (FirstOrder.Language.card.{u1, u2} L)) (Cardinal.lift.{max u1 u2, max u3 u4} (FirstOrder.Language.card.{u3, u4} L')))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, Eq.{max (max (max (succ (succ u1)) (succ (succ u3))) (succ (succ u2))) (succ (succ u4))} Cardinal.{max (max u1 u3) u2 u4} (FirstOrder.Language.card.{max u1 u3, max u2 u4} (FirstOrder.Language.sum.{u1, u2, u3, u4} L L')) (HAdd.hAdd.{max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4), max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4), max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4)} Cardinal.{max (max u1 u2) u3 u4} Cardinal.{max (max u3 u4) u1 u2} Cardinal.{max (max u1 u2) u3 u4} (instHAdd.{max (max (max (succ u1) (succ u3)) (succ u2)) (succ u4)} Cardinal.{max (max u1 u2) u3 u4} Cardinal.instAddCardinal.{max (max (max u1 u3) u2) u4}) (Cardinal.lift.{max u3 u4, max u1 u2} (FirstOrder.Language.card.{u1, u2} L)) (Cardinal.lift.{max u1 u2, max u3 u4} (FirstOrder.Language.card.{u3, u4} L')))
+Case conversion may be inaccurate. Consider using '#align first_order.language.card_sum FirstOrder.Language.card_sumₓ'. -/
 @[simp]
 theorem card_sum :
     (L.Sum L').card = Cardinal.lift.{max u' v'} L.card + Cardinal.lift.{max u v} L'.card :=
@@ -272,6 +358,12 @@ theorem card_sum :
     add_comm (Cardinal.sum fun i => (#L'.functions i).lift), add_assoc, add_assoc]
 #align first_order.language.card_sum FirstOrder.Language.card_sum
 
+/- warning: first_order.language.card_mk₂ -> FirstOrder.Language.card_mk₂ is a dubious translation:
+lean 3 declaration is
+  forall (c : Type.{u1}) (f₁ : Type.{u1}) (f₂ : Type.{u1}) (r₁ : Type.{u2}) (r₂ : Type.{u2}), Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} (FirstOrder.Language.mk₂.{u1, u2} c f₁ f₂ r₁ r₂)) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (HAdd.hAdd.{succ (max u1 u2), succ (max u1 u2), succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{succ (max u1 u2)} Cardinal.{max u1 u2} Cardinal.hasAdd.{max u1 u2}) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} c)) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₁))) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₂))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₁))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₂)))
+but is expected to have type
+  forall (c : Type.{u1}) (f₁ : Type.{u1}) (f₂ : Type.{u1}) (r₁ : Type.{u2}) (r₂ : Type.{u2}), Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (FirstOrder.Language.card.{u1, u2} (FirstOrder.Language.mk₂.{u1, u2} c f₁ f₂ r₁ r₂)) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u2 u1} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u2 u1} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (HAdd.hAdd.{max (succ u1) (succ u2), max (succ u1) (succ u2), max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.{max u1 u2} Cardinal.{max u1 u2} (instHAdd.{max (succ u1) (succ u2)} Cardinal.{max u1 u2} Cardinal.instAddCardinal.{max u1 u2}) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} c)) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₁))) (Cardinal.lift.{u2, u1} (Cardinal.mk.{u1} f₂))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₁))) (Cardinal.lift.{u1, u2} (Cardinal.mk.{u2} r₂)))
+Case conversion may be inaccurate. Consider using '#align first_order.language.card_mk₂ FirstOrder.Language.card_mk₂ₓ'. -/
 @[simp]
 theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).card =
@@ -283,6 +375,7 @@ theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
 
 variable (L) (M : Type w)
 
+#print FirstOrder.Language.Structure /-
 /-- A first-order structure on a type `M` consists of interpretations of all the symbols in a given
   language. Each function of arity `n` is interpreted as a function sending tuples of length `n`
   (modeled as `(fin n → M)`) to `M`, and a relation of arity `n` is a function from tuples of length
@@ -292,19 +385,23 @@ class Structure where
   funMap : ∀ {n}, L.Functions n → (Fin n → M) → M
   rel_map : ∀ {n}, L.Relations n → (Fin n → M) → Prop
 #align first_order.language.Structure FirstOrder.Language.Structure
+-/
 
 variable (N : Type w') [L.Structure M] [L.Structure N]
 
 open Structure
 
+#print FirstOrder.Language.inhabited.trivialStructure /-
 /-- Used for defining `first_order.language.Theory.Model.inhabited`. -/
 def inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
   ⟨default, default⟩
 #align first_order.language.inhabited.trivial_structure FirstOrder.Language.inhabited.trivialStructure
+-/
 
 /-! ### Maps -/
 
 
+#print FirstOrder.Language.Hom /-
 /-- A homomorphism between first-order structures is a function that commutes with the
   interpretations of functions and maps tuples in one structure where a given relation is true to
   tuples in the second structure where that relation is still true. -/
@@ -314,10 +411,12 @@ structure Hom where
     obviously
   map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r x → RelMap r (to_fun ∘ x) := by obviously
 #align first_order.language.hom FirstOrder.Language.Hom
+-/
 
 -- mathport name: language.hom
 scoped[FirstOrder] notation:25 A " →[" L "] " B => FirstOrder.Language.Hom L A B
 
+#print FirstOrder.Language.Embedding /-
 /-- An embedding of first-order structures is an embedding that commutes with the
   interpretations of functions and relations. -/
 structure Embedding extends M ↪ N where
@@ -325,10 +424,12 @@ structure Embedding extends M ↪ N where
     obviously
   map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (to_fun ∘ x) ↔ RelMap r x := by obviously
 #align first_order.language.embedding FirstOrder.Language.Embedding
+-/
 
 -- mathport name: language.embedding
 scoped[FirstOrder] notation:25 A " ↪[" L "] " B => FirstOrder.Language.Embedding L A B
 
+#print FirstOrder.Language.Equiv /-
 /-- An equivalence of first-order structures is an equivalence that commutes with the
   interpretations of functions and relations. -/
 structure Equiv extends M ≃ N where
@@ -336,6 +437,7 @@ structure Equiv extends M ≃ N where
     obviously
   map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (to_fun ∘ x) ↔ RelMap r x := by obviously
 #align first_order.language.equiv FirstOrder.Language.Equiv
+-/
 
 -- mathport name: language.equiv
 scoped[FirstOrder] notation:25 A " ≃[" L "] " B => FirstOrder.Language.Equiv L A B
@@ -345,16 +447,25 @@ variable {L M N} {P : Type _} [L.Structure P] {Q : Type _} [L.Structure Q]
 instance : CoeTC L.Constants M :=
   ⟨fun c => funMap c default⟩
 
+/- warning: first_order.language.fun_map_eq_coe_constants -> FirstOrder.Language.funMap_eq_coe_constants is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] {c : FirstOrder.Language.Constants.{u1, u2} L} {x : (Fin (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) -> M}, Eq.{succ u3} M (FirstOrder.Language.Structure.funMap.{u1, u2, u3} L M _inst_1 (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) c x) ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] {c : FirstOrder.Language.Constants.{u1, u2} L} {x : (Fin (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) -> M}, Eq.{succ u3} M (FirstOrder.Language.Structure.funMap.{u1, u2, u3} L M _inst_1 (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) c x) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)
+Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_eq_coe_constants FirstOrder.Language.funMap_eq_coe_constantsₓ'. -/
 theorem funMap_eq_coe_constants {c : L.Constants} {x : Fin 0 → M} : funMap c x = c :=
   congr rfl (funext Fin.elim0)
 #align first_order.language.fun_map_eq_coe_constants FirstOrder.Language.funMap_eq_coe_constants
 
+#print FirstOrder.Language.nonempty_of_nonempty_constants /-
 /-- Given a language with a nonempty type of constants, any structure will be nonempty. This cannot
   be a global instance, because `L` becomes a metavariable. -/
 theorem nonempty_of_nonempty_constants [h : Nonempty L.Constants] : Nonempty M :=
   h.map coe
 #align first_order.language.nonempty_of_nonempty_constants FirstOrder.Language.nonempty_of_nonempty_constants
+-/
 
+#print FirstOrder.Language.funMap₂ /-
 /-- The function map for `first_order.language.Structure₂`. -/
 def funMap₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (c' : c → M) (f₁' : f₁ → M → M)
     (f₂' : f₂ → M → M → M) : ∀ {n}, (Language.mk₂ c f₁ f₂ r₁ r₂).Functions n → (Fin n → M) → M
@@ -363,7 +474,9 @@ def funMap₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (c' : c → M) (f₁'
   | 2, f, x => f₂' f (x 0) (x 1)
   | n + 3, f, _ => PEmpty.elim f
 #align first_order.language.fun_map₂ FirstOrder.Language.funMap₂
+-/
 
+#print FirstOrder.Language.RelMap₂ /-
 /-- The relation map for `first_order.language.Structure₂`. -/
 def RelMap₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (r₁' : r₁ → Set M) (r₂' : r₂ → M → M → Prop) :
     ∀ {n}, (Language.mk₂ c f₁ f₂ r₁ r₂).Relations n → (Fin n → M) → Prop
@@ -372,13 +485,16 @@ def RelMap₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (r₁' : r₁ → Set
   | 2, r, x => r₂' r (x 0) (x 1)
   | n + 3, r, _ => PEmpty.elim r
 #align first_order.language.rel_map₂ FirstOrder.Language.RelMap₂
+-/
 
+#print FirstOrder.Language.Structure.mk₂ /-
 /-- A structure constructor to match `first_order.language₂`. -/
 protected def Structure.mk₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (c' : c → M) (f₁' : f₁ → M → M)
     (f₂' : f₂ → M → M → M) (r₁' : r₁ → Set M) (r₂' : r₂ → M → M → Prop) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).Structure M :=
   ⟨fun _ => funMap₂ c' f₁' f₂', fun _ => RelMap₂ r₁' r₂'⟩
 #align first_order.language.Structure.mk₂ FirstOrder.Language.Structure.mk₂
+-/
 
 namespace Structure
 
@@ -388,38 +504,54 @@ variable {c' : c → M} {f₁' : f₁ → M → M} {f₂' : f₂ → M → M →
 
 variable {r₁' : r₁ → Set M} {r₂' : r₂ → M → M → Prop}
 
+#print FirstOrder.Language.Structure.funMap_apply₀ /-
 @[simp]
 theorem funMap_apply₀ (c₀ : c) {x : Fin 0 → M} :
     @Structure.funMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 0 c₀ x = c' c₀ :=
   rfl
 #align first_order.language.Structure.fun_map_apply₀ FirstOrder.Language.Structure.funMap_apply₀
+-/
 
+#print FirstOrder.Language.Structure.funMap_apply₁ /-
 @[simp]
 theorem funMap_apply₁ (f : f₁) (x : M) :
     @Structure.funMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 1 f ![x] = f₁' f x :=
   rfl
 #align first_order.language.Structure.fun_map_apply₁ FirstOrder.Language.Structure.funMap_apply₁
+-/
 
+#print FirstOrder.Language.Structure.funMap_apply₂ /-
 @[simp]
 theorem funMap_apply₂ (f : f₂) (x y : M) :
     @Structure.funMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 2 f ![x, y] = f₂' f x y :=
   rfl
 #align first_order.language.Structure.fun_map_apply₂ FirstOrder.Language.Structure.funMap_apply₂
+-/
 
+#print FirstOrder.Language.Structure.relMap_apply₁ /-
 @[simp]
 theorem relMap_apply₁ (r : r₁) (x : M) :
     @Structure.RelMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 1 r ![x] = (x ∈ r₁' r) :=
   rfl
 #align first_order.language.Structure.rel_map_apply₁ FirstOrder.Language.Structure.relMap_apply₁
+-/
 
+#print FirstOrder.Language.Structure.relMap_apply₂ /-
 @[simp]
 theorem relMap_apply₂ (r : r₂) (x y : M) :
     @Structure.RelMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 2 r ![x, y] = r₂' r x y :=
   rfl
 #align first_order.language.Structure.rel_map_apply₂ FirstOrder.Language.Structure.relMap_apply₂
+-/
 
 end Structure
 
+/- warning: first_order.language.hom_class -> FirstOrder.Language.HomClass is a dubious translation:
+lean 3 declaration is
+  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u1, u2}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N], Type
+but is expected to have type
+  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u2, u1}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u2, u1, u5} L N], Type
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class FirstOrder.Language.HomClassₓ'. -/
 /-- `hom_class L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `first_order.language.hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -428,6 +560,12 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
 
+/- warning: first_order.language.strong_hom_class -> FirstOrder.Language.StrongHomClass is a dubious translation:
+lean 3 declaration is
+  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u1, u2}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N], Type
+but is expected to have type
+  forall (L : outParam.{max (succ (succ u1)) (succ (succ u2))} FirstOrder.Language.{u2, u1}) (F : Type.{u3}) (M : outParam.{succ (succ u4)} Type.{u4}) (N : outParam.{succ (succ u5)} Type.{u5}) [_inst_5 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u2, u1, u5} L N], Type
+Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClassₓ'. -/
 /-- `strong_hom_class L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
@@ -436,6 +574,12 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
+/- warning: first_order.language.strong_hom_class.hom_class -> FirstOrder.Language.StrongHomClass.homClass is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} {_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M} {_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N} [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6
+Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClassₓ'. -/
 instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N
     where
@@ -443,6 +587,12 @@ instance (priority := 100) StrongHomClass.homClass {F M N} [L.Structure M] [L.St
   map_rel φ n R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 
+/- warning: first_order.language.hom_class.strong_hom_class_of_is_algebraic -> FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} [_inst_5 : FirstOrder.Language.IsAlgebraic.{u1, u2} L] {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_8 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_9 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7], FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} [_inst_5 : FirstOrder.Language.IsAlgebraic.{u1, u2} L] {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_7 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_8 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_9 : FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7], FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N _inst_8 _inst_6 _inst_7
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraicₓ'. -/
 /-- Not an instance to avoid a loop. -/
 def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N
@@ -451,6 +601,12 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
   map_rel φ n R x := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 
+/- warning: first_order.language.hom_class.map_constants -> FirstOrder.Language.HomClass.map_constants is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u5} N (coeFn.{succ u3, max (succ u4) (succ u5)} F (fun (_x : F) => M -> N) (FunLike.hasCoeToFun.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N) _inst_7) φ ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u4} L M _inst_5))) c)) ((fun (a : Type.{u1}) (b : Type.{u5}) [self : HasLiftT.{succ u1, succ u5} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u5} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u5} L N _inst_6))) c)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u4, u5}} {F : Type.{u3}} {M : Type.{u2}} {N : Type.{u1}} [_inst_5 : FirstOrder.Language.Structure.{u4, u5, u2} L M] [_inst_6 : FirstOrder.Language.Structure.{u4, u5, u1} L N] [_inst_7 : FunLike.{succ u3, succ u2, succ u1} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u5, u4, u3, u2, u1} L F M N _inst_7 _inst_5 _inst_6] (φ : F) (c : FirstOrder.Language.Constants.{u4, u5} L), Eq.{succ u1} ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FunLike.coe.{succ u3, succ u2, succ u1} F M (fun (_x : M) => (fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) _x) _inst_7 φ (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) (FirstOrder.Language.constantMap.{u4, u5, u1} L ((fun (x._@.Mathlib.ModelTheory.Basic._hyg.5492 : M) => N) (FirstOrder.Language.constantMap.{u4, u5, u2} L M _inst_5 c)) _inst_6 c)
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constantsₓ'. -/
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
@@ -458,6 +614,7 @@ theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike
 
 namespace Hom
 
+#print FirstOrder.Language.Hom.funLike /-
 instance funLike : FunLike (M →[L] N) M fun _ => N
     where
   coe := Hom.toFun
@@ -467,7 +624,14 @@ instance funLike : FunLike (M →[L] N) M fun _ => N
     cases h
     rfl
 #align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
+-/
 
+/- warning: first_order.language.hom.hom_class -> FirstOrder.Language.Hom.homClass is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.HomClass.{u1, u2, max u3 u4, u3, u4} L (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) _inst_1 _inst_2
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.HomClass.{u2, u1, max u4 u3, u3, u4} L (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) _inst_1 _inst_2
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom.hom_class FirstOrder.Language.Hom.homClassₓ'. -/
 instance homClass : HomClass L (M →[L] N) M N
     where
   map_fun := map_fun'
@@ -477,58 +641,81 @@ instance homClass : HomClass L (M →[L] N) M N
 instance [L.IsAlgebraic] : StrongHomClass L (M →[L] N) M N :=
   HomClass.strongHomClassOfIsAlgebraic
 
+#print FirstOrder.Language.Hom.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M →[L] N) fun _ => M → N :=
   FunLike.hasCoeToFun
 #align first_order.language.hom.has_coe_to_fun FirstOrder.Language.Hom.hasCoeToFun
+-/
 
+#print FirstOrder.Language.Hom.toFun_eq_coe /-
 @[simp]
 theorem toFun_eq_coe {f : M →[L] N} : f.toFun = (f : M → N) :=
   rfl
 #align first_order.language.hom.to_fun_eq_coe FirstOrder.Language.Hom.toFun_eq_coe
+-/
 
+#print FirstOrder.Language.Hom.ext /-
 @[ext]
 theorem ext ⦃f g : M →[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
   FunLike.ext f g h
 #align first_order.language.hom.ext FirstOrder.Language.Hom.ext
+-/
 
+#print FirstOrder.Language.Hom.ext_iff /-
 theorem ext_iff {f g : M →[L] N} : f = g ↔ ∀ x, f x = g x :=
   FunLike.ext_iff
 #align first_order.language.hom.ext_iff FirstOrder.Language.Hom.ext_iff
+-/
 
+#print FirstOrder.Language.Hom.map_fun /-
 @[simp]
 theorem map_fun (φ : M →[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
     φ (funMap f x) = funMap f (φ ∘ x) :=
   HomClass.map_fun φ f x
 #align first_order.language.hom.map_fun FirstOrder.Language.Hom.map_fun
+-/
 
+/- warning: first_order.language.hom.map_constants -> FirstOrder.Language.Hom.map_constants is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.hom.map_constants FirstOrder.Language.Hom.map_constants
 
+#print FirstOrder.Language.Hom.map_rel /-
 @[simp]
 theorem map_rel (φ : M →[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
     RelMap r x → RelMap r (φ ∘ x) :=
   HomClass.map_rel φ r x
 #align first_order.language.hom.map_rel FirstOrder.Language.Hom.map_rel
+-/
 
 variable (L) (M)
 
+#print FirstOrder.Language.Hom.id /-
 /-- The identity map from a structure to itself -/
 @[refl]
 def id : M →[L] M where toFun := id
 #align first_order.language.hom.id FirstOrder.Language.Hom.id
+-/
 
 variable {L} {M}
 
 instance : Inhabited (M →[L] M) :=
   ⟨id L M⟩
 
+#print FirstOrder.Language.Hom.id_apply /-
 @[simp]
 theorem id_apply (x : M) : id L M x = x :=
   rfl
 #align first_order.language.hom.id_apply FirstOrder.Language.Hom.id_apply
+-/
 
+#print FirstOrder.Language.Hom.comp /-
 /-- Composition of first-order homomorphisms -/
 @[trans]
 def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
@@ -536,12 +723,25 @@ def comp (hnp : N →[L] P) (hmn : M →[L] N) : M →[L] P
   toFun := hnp ∘ hmn
   map_rel' _ _ _ h := by simp [h]
 #align first_order.language.hom.comp FirstOrder.Language.Hom.comp
+-/
 
+/- warning: first_order.language.hom.comp_apply -> FirstOrder.Language.Hom.comp_apply is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Hom.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Hom.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : N) => P) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Hom.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.5718 : M) => N) _x) (FirstOrder.Language.Hom.funLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2) f x))
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N →[L] P) (f : M →[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.hom.comp_apply FirstOrder.Language.Hom.comp_apply
 
+/- warning: first_order.language.hom.comp_assoc -> FirstOrder.Language.Hom.comp_assoc is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Hom.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Hom.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Hom.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Hom.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Hom.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Hom.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Hom.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Hom.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Hom.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Hom.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Hom.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Hom.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Hom.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom.comp_assoc FirstOrder.Language.Hom.comp_assocₓ'. -/
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
@@ -550,6 +750,12 @@ theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
 
 end Hom
 
+/- warning: first_order.language.hom_class.to_hom -> FirstOrder.Language.HomClass.toHom is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u1, u2, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], F -> (FirstOrder.Language.Hom.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : FunLike.{succ u3, succ u4, succ u5} F M (fun (_x : M) => N)] [_inst_8 : FirstOrder.Language.HomClass.{u2, u1, u3, u4, u5} L F M N _inst_7 _inst_5 _inst_6], F -> (FirstOrder.Language.Hom.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+Case conversion may be inaccurate. Consider using '#align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHomₓ'. -/
 /-- Any element of a `hom_class` can be realized as a first_order homomorphism. -/
 def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
@@ -558,6 +764,7 @@ def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ =>
 
 namespace Embedding
 
+#print FirstOrder.Language.Embedding.embeddingLike /-
 instance embeddingLike : EmbeddingLike (M ↪[L] N) M N
     where
   coe f := f.toFun
@@ -569,44 +776,68 @@ instance embeddingLike : EmbeddingLike (M ↪[L] N) M N
     ext x
     exact Function.funext_iff.1 h x
 #align first_order.language.embedding.embedding_like FirstOrder.Language.Embedding.embeddingLike
+-/
 
+/- warning: first_order.language.embedding.strong_hom_class -> FirstOrder.Language.Embedding.strongHomClass is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.StrongHomClass.{u1, u2, max u3 u4, u3, u4} L (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EmbeddingLike.toFunLike.{succ (max u3 u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) _inst_1 _inst_2
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N], FirstOrder.Language.StrongHomClass.{u2, u1, max u4 u3, u3, u4} L (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) _inst_1 _inst_2
+Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClassₓ'. -/
 instance strongHomClass : StrongHomClass L (M ↪[L] N) M N
     where
   map_fun := map_fun'
   map_rel := map_rel'
 #align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClass
 
+#print FirstOrder.Language.Embedding.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
   FunLike.hasCoeToFun
 #align first_order.language.embedding.has_coe_to_fun FirstOrder.Language.Embedding.hasCoeToFun
+-/
 
+#print FirstOrder.Language.Embedding.map_fun /-
 @[simp]
 theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
     φ (funMap f x) = funMap f (φ ∘ x) :=
   HomClass.map_fun φ f x
 #align first_order.language.embedding.map_fun FirstOrder.Language.Embedding.map_fun
+-/
 
+/- warning: first_order.language.embedding.map_constants -> FirstOrder.Language.Embedding.map_constants is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u1, u2, u3, u4} L M N _inst_1 _inst_2)) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.embedding.map_constants FirstOrder.Language.Embedding.map_constants
 
+#print FirstOrder.Language.Embedding.map_rel /-
 @[simp]
 theorem map_rel (φ : M ↪[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
     RelMap r (φ ∘ x) ↔ RelMap r x :=
   StrongHomClass.map_rel φ r x
 #align first_order.language.embedding.map_rel FirstOrder.Language.Embedding.map_rel
+-/
 
+#print FirstOrder.Language.Embedding.toHom /-
 /-- A first-order embedding is also a first-order homomorphism. -/
 def toHom : (M ↪[L] N) → M →[L] N :=
   HomClass.toHom
 #align first_order.language.embedding.to_hom FirstOrder.Language.Embedding.toHom
+-/
 
+#print FirstOrder.Language.Embedding.coe_toHom /-
 @[simp]
 theorem coe_toHom {f : M ↪[L] N} : (f.toHom : M → N) = f :=
   rfl
 #align first_order.language.embedding.coe_to_hom FirstOrder.Language.Embedding.coe_toHom
+-/
 
+#print FirstOrder.Language.Embedding.coe_injective /-
 theorem coe_injective : @Function.Injective (M ↪[L] N) (M → N) coeFn
   | f, g, h => by
     cases f
@@ -615,20 +846,28 @@ theorem coe_injective : @Function.Injective (M ↪[L] N) (M → N) coeFn
     ext x
     exact Function.funext_iff.1 h x
 #align first_order.language.embedding.coe_injective FirstOrder.Language.Embedding.coe_injective
+-/
 
+#print FirstOrder.Language.Embedding.ext /-
 @[ext]
 theorem ext ⦃f g : M ↪[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
   coe_injective (funext h)
 #align first_order.language.embedding.ext FirstOrder.Language.Embedding.ext
+-/
 
+#print FirstOrder.Language.Embedding.ext_iff /-
 theorem ext_iff {f g : M ↪[L] N} : f = g ↔ ∀ x, f x = g x :=
   ⟨fun h x => h ▸ rfl, fun h => ext h⟩
 #align first_order.language.embedding.ext_iff FirstOrder.Language.Embedding.ext_iff
+-/
 
+#print FirstOrder.Language.Embedding.injective /-
 theorem injective (f : M ↪[L] N) : Function.Injective f :=
   f.toEmbedding.Injective
 #align first_order.language.embedding.injective FirstOrder.Language.Embedding.injective
+-/
 
+#print FirstOrder.Language.Embedding.ofInjective /-
 /-- In an algebraic language, any injective homomorphism is an embedding. -/
 @[simps]
 def ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) : M ↪[L] N :=
@@ -636,37 +875,47 @@ def ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) : M
     inj' := hf
     map_rel' := fun n r x => StrongHomClass.map_rel f r x }
 #align first_order.language.embedding.of_injective FirstOrder.Language.Embedding.ofInjective
+-/
 
+#print FirstOrder.Language.Embedding.coeFn_ofInjective /-
 @[simp]
 theorem coeFn_ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
     (ofInjective hf : M → N) = f :=
   rfl
 #align first_order.language.embedding.coe_fn_of_injective FirstOrder.Language.Embedding.coeFn_ofInjective
+-/
 
+#print FirstOrder.Language.Embedding.ofInjective_toHom /-
 @[simp]
 theorem ofInjective_toHom [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
     (ofInjective hf).toHom = f := by
   ext
   simp
 #align first_order.language.embedding.of_injective_to_hom FirstOrder.Language.Embedding.ofInjective_toHom
+-/
 
 variable (L) (M)
 
+#print FirstOrder.Language.Embedding.refl /-
 /-- The identity embedding from a structure to itself -/
 @[refl]
 def refl : M ↪[L] M where toEmbedding := Function.Embedding.refl M
 #align first_order.language.embedding.refl FirstOrder.Language.Embedding.refl
+-/
 
 variable {L} {M}
 
 instance : Inhabited (M ↪[L] M) :=
   ⟨refl L M⟩
 
+#print FirstOrder.Language.Embedding.refl_apply /-
 @[simp]
 theorem refl_apply (x : M) : refl L M x = x :=
   rfl
 #align first_order.language.embedding.refl_apply FirstOrder.Language.Embedding.refl_apply
+-/
 
+#print FirstOrder.Language.Embedding.comp /-
 /-- Composition of first-order embeddings -/
 @[trans]
 def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
@@ -674,18 +923,37 @@ def comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P
   toFun := hnp ∘ hmn
   inj' := hnp.Injective.comp hmn.Injective
 #align first_order.language.embedding.comp FirstOrder.Language.Embedding.comp
+-/
 
+/- warning: first_order.language.embedding.comp_apply -> FirstOrder.Language.Embedding.comp_apply is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Embedding.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u1} L M P _inst_1 _inst_3)) (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u5, u1} L N P _inst_2 _inst_3)) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.6646 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Embedding.embeddingLike.{u2, u3, u4, u5} L M N _inst_1 _inst_2)) f x))
+Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.embedding.comp_apply FirstOrder.Language.Embedding.comp_apply
 
+/- warning: first_order.language.embedding.comp_assoc -> FirstOrder.Language.Embedding.comp_assoc is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Embedding.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Embedding.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Embedding.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Embedding.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Embedding.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Embedding.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Embedding.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Embedding.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Embedding.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
+Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assocₓ'. -/
 /-- Composition of first-order embeddings is associative. -/
 theorem comp_assoc (f : M ↪[L] N) (g : N ↪[L] P) (h : P ↪[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assoc
 
+/- warning: first_order.language.embedding.comp_to_hom -> FirstOrder.Language.Embedding.comp_toHom is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (hnp : FirstOrder.Language.Embedding.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (hmn : FirstOrder.Language.Embedding.{u1, u2, u3, u4} L M N _inst_1 _inst_2), Eq.{max (succ u3) (succ u5)} (FirstOrder.Language.Hom.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.toHom.{u1, u2, u3, u5} L M P _inst_1 _inst_3 (FirstOrder.Language.Embedding.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 hnp hmn)) (FirstOrder.Language.Hom.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 (FirstOrder.Language.Embedding.toHom.{u1, u2, u4, u5} L N P _inst_2 _inst_3 hnp) (FirstOrder.Language.Embedding.toHom.{u1, u2, u3, u4} L M N _inst_1 _inst_2 hmn))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (hnp : FirstOrder.Language.Embedding.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (hmn : FirstOrder.Language.Embedding.{u2, u3, u4, u5} L M N _inst_1 _inst_2), Eq.{max (succ u4) (succ u1)} (FirstOrder.Language.Hom.{u2, u3, u4, u1} L M P _inst_1 _inst_3) (FirstOrder.Language.Embedding.toHom.{u2, u3, u4, u1} L M P _inst_1 _inst_3 (FirstOrder.Language.Embedding.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 hnp hmn)) (FirstOrder.Language.Hom.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 (FirstOrder.Language.Embedding.toHom.{u2, u3, u5, u1} L N P _inst_2 _inst_3 hnp) (FirstOrder.Language.Embedding.toHom.{u2, u3, u4, u5} L M N _inst_1 _inst_2 hmn))
+Case conversion may be inaccurate. Consider using '#align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHomₓ'. -/
 @[simp]
 theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
     (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
@@ -696,6 +964,12 @@ theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
 
 end Embedding
 
+/- warning: first_order.language.strong_hom_class.to_embedding -> FirstOrder.Language.StrongHomClass.toEmbedding is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EmbeddingLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N _inst_7) _inst_5 _inst_6], F -> (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EmbeddingLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N _inst_7) _inst_5 _inst_6], F -> (FirstOrder.Language.Embedding.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.to_embedding FirstOrder.Language.StrongHomClass.toEmbeddingₓ'. -/
 /-- Any element of an injective `strong_hom_class` can be realized as a first_order embedding. -/
 def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [EmbeddingLike F M N]
     [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
@@ -722,6 +996,7 @@ instance : StrongHomClass L (M ≃[L] N) M N
   map_fun := map_fun'
   map_rel := map_rel'
 
+#print FirstOrder.Language.Equiv.symm /-
 /-- The inverse of a first-order equivalence is a first-order equivalence. -/
 @[symm]
 def symm (f : M ≃[L] N) : N ≃[L] M :=
@@ -737,116 +1012,173 @@ def symm (f : M ≃[L] N) : N ≃[L] M :=
       refine' (f.map_rel' r (f.to_equiv.symm ∘ x)).symm.trans _
       rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id] }
 #align first_order.language.equiv.symm FirstOrder.Language.Equiv.symm
+-/
 
+#print FirstOrder.Language.Equiv.hasCoeToFun /-
 instance hasCoeToFun : CoeFun (M ≃[L] N) fun _ => M → N :=
   FunLike.hasCoeToFun
 #align first_order.language.equiv.has_coe_to_fun FirstOrder.Language.Equiv.hasCoeToFun
+-/
 
+#print FirstOrder.Language.Equiv.apply_symm_apply /-
 @[simp]
 theorem apply_symm_apply (f : M ≃[L] N) (a : N) : f (f.symm a) = a :=
   f.toEquiv.apply_symm_apply a
 #align first_order.language.equiv.apply_symm_apply FirstOrder.Language.Equiv.apply_symm_apply
+-/
 
+#print FirstOrder.Language.Equiv.symm_apply_apply /-
 @[simp]
 theorem symm_apply_apply (f : M ≃[L] N) (a : M) : f.symm (f a) = a :=
   f.toEquiv.symm_apply_apply a
 #align first_order.language.equiv.symm_apply_apply FirstOrder.Language.Equiv.symm_apply_apply
+-/
 
+#print FirstOrder.Language.Equiv.map_fun /-
 @[simp]
 theorem map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
     φ (funMap f x) = funMap f (φ ∘ x) :=
   HomClass.map_fun φ f x
 #align first_order.language.equiv.map_fun FirstOrder.Language.Equiv.map_fun
+-/
 
+/- warning: first_order.language.equiv.map_constants -> FirstOrder.Language.Equiv.map_constants is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} N (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) φ ((fun (a : Type.{u1}) (b : Type.{u3}) [self : HasLiftT.{succ u1, succ u3} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) M (HasLiftT.mk.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (CoeTCₓ.coe.{succ u1, succ u3} (FirstOrder.Language.Constants.{u1, u2} L) M (FirstOrder.Language.hasCoeT.{u1, u2, u3} L M _inst_1))) c)) ((fun (a : Type.{u1}) (b : Type.{u4}) [self : HasLiftT.{succ u1, succ u4} a b] => self.0) (FirstOrder.Language.Constants.{u1, u2} L) N (HasLiftT.mk.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (CoeTCₓ.coe.{succ u1, succ u4} (FirstOrder.Language.Constants.{u1, u2} L) N (FirstOrder.Language.hasCoeT.{u1, u2, u4} L N _inst_2))) c)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] (φ : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (c : FirstOrder.Language.Constants.{u1, u2} L), Eq.{succ u4} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u3) (succ u4), succ u3, succ u4} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2))) φ (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) (FirstOrder.Language.constantMap.{u1, u2, u4} L ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) (FirstOrder.Language.constantMap.{u1, u2, u3} L M _inst_1 c)) _inst_2 c)
+Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constantsₓ'. -/
 @[simp]
 theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
   HomClass.map_constants φ c
 #align first_order.language.equiv.map_constants FirstOrder.Language.Equiv.map_constants
 
+#print FirstOrder.Language.Equiv.map_rel /-
 @[simp]
 theorem map_rel (φ : M ≃[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
     RelMap r (φ ∘ x) ↔ RelMap r x :=
   StrongHomClass.map_rel φ r x
 #align first_order.language.equiv.map_rel FirstOrder.Language.Equiv.map_rel
+-/
 
+#print FirstOrder.Language.Equiv.toEmbedding /-
 /-- A first-order equivalence is also a first-order embedding. -/
 def toEmbedding : (M ≃[L] N) → M ↪[L] N :=
   StrongHomClass.toEmbedding
 #align first_order.language.equiv.to_embedding FirstOrder.Language.Equiv.toEmbedding
+-/
 
+#print FirstOrder.Language.Equiv.toHom /-
 /-- A first-order equivalence is also a first-order homomorphism. -/
 def toHom : (M ≃[L] N) → M →[L] N :=
   HomClass.toHom
 #align first_order.language.equiv.to_hom FirstOrder.Language.Equiv.toHom
+-/
 
+#print FirstOrder.Language.Equiv.toEmbedding_toHom /-
 @[simp]
 theorem toEmbedding_toHom (f : M ≃[L] N) : f.toEmbedding.toHom = f.toHom :=
   rfl
 #align first_order.language.equiv.to_embedding_to_hom FirstOrder.Language.Equiv.toEmbedding_toHom
+-/
 
+#print FirstOrder.Language.Equiv.coe_toHom /-
 @[simp]
 theorem coe_toHom {f : M ≃[L] N} : (f.toHom : M → N) = (f : M → N) :=
   rfl
 #align first_order.language.equiv.coe_to_hom FirstOrder.Language.Equiv.coe_toHom
+-/
 
+#print FirstOrder.Language.Equiv.coe_toEmbedding /-
 @[simp]
 theorem coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M → N) :=
   rfl
 #align first_order.language.equiv.coe_to_embedding FirstOrder.Language.Equiv.coe_toEmbedding
+-/
 
+#print FirstOrder.Language.Equiv.coe_injective /-
 theorem coe_injective : @Function.Injective (M ≃[L] N) (M → N) coeFn :=
   FunLike.coe_injective
 #align first_order.language.equiv.coe_injective FirstOrder.Language.Equiv.coe_injective
+-/
 
+#print FirstOrder.Language.Equiv.ext /-
 @[ext]
 theorem ext ⦃f g : M ≃[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
   coe_injective (funext h)
 #align first_order.language.equiv.ext FirstOrder.Language.Equiv.ext
+-/
 
+#print FirstOrder.Language.Equiv.ext_iff /-
 theorem ext_iff {f g : M ≃[L] N} : f = g ↔ ∀ x, f x = g x :=
   ⟨fun h x => h ▸ rfl, fun h => ext h⟩
 #align first_order.language.equiv.ext_iff FirstOrder.Language.Equiv.ext_iff
+-/
 
+#print FirstOrder.Language.Equiv.bijective /-
 theorem bijective (f : M ≃[L] N) : Function.Bijective f :=
   EquivLike.bijective f
 #align first_order.language.equiv.bijective FirstOrder.Language.Equiv.bijective
+-/
 
+#print FirstOrder.Language.Equiv.injective /-
 theorem injective (f : M ≃[L] N) : Function.Injective f :=
   EquivLike.injective f
 #align first_order.language.equiv.injective FirstOrder.Language.Equiv.injective
+-/
 
+#print FirstOrder.Language.Equiv.surjective /-
 theorem surjective (f : M ≃[L] N) : Function.Surjective f :=
   EquivLike.surjective f
 #align first_order.language.equiv.surjective FirstOrder.Language.Equiv.surjective
+-/
 
 variable (L) (M)
 
+#print FirstOrder.Language.Equiv.refl /-
 /-- The identity equivalence from a structure to itself -/
 @[refl]
 def refl : M ≃[L] M where toEquiv := Equiv.refl M
 #align first_order.language.equiv.refl FirstOrder.Language.Equiv.refl
+-/
 
 variable {L} {M}
 
 instance : Inhabited (M ≃[L] M) :=
   ⟨refl L M⟩
 
+#print FirstOrder.Language.Equiv.refl_apply /-
 @[simp]
 theorem refl_apply (x : M) : refl L M x = x :=
   rfl
 #align first_order.language.equiv.refl_apply FirstOrder.Language.Equiv.refl_apply
+-/
 
+#print FirstOrder.Language.Equiv.comp /-
 /-- Composition of first-order equivalences -/
 @[trans]
 def comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
   { hmn.toEquiv.trans hnp.toEquiv with toFun := hnp ∘ hmn }
 #align first_order.language.equiv.comp FirstOrder.Language.Equiv.comp
+-/
 
+/- warning: first_order.language.equiv.comp_apply -> FirstOrder.Language.Equiv.comp_apply is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (x : M), Eq.{succ u5} P (coeFn.{max (succ u3) (succ u5), max (succ u3) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u5} L M P _inst_1 _inst_3) => M -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u5} L M P _inst_1 _inst_3) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f) x) (coeFn.{max (succ u4) (succ u5), max (succ u4) (succ u5)} (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) => N -> P) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u4, u5} L N P _inst_2 _inst_3) g (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (fun (_x : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) => M -> N) (FirstOrder.Language.Equiv.hasCoeToFun.{u1, u2, u3, u4} L M N _inst_1 _inst_2) f x))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u2, u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_1 : FirstOrder.Language.Structure.{u2, u3, u4} L M] [_inst_2 : FirstOrder.Language.Structure.{u2, u3, u5} L N] {P : Type.{u1}} [_inst_3 : FirstOrder.Language.Structure.{u2, u3, u1} L P] (g : FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) (f : FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) (x : M), Eq.{succ u1} ((fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => P) x) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => P) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (EquivLike.toEmbeddingLike.{max (succ u4) (succ u1), succ u4, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3) M P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u1} L M P _inst_1 _inst_3))) (FirstOrder.Language.Equiv.comp.{u2, u3, u4, u5, u1} L M N _inst_1 _inst_2 P _inst_3 g f) x) (FunLike.coe.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N (fun (_x : N) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : N) => P) _x) (EmbeddingLike.toFunLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (EquivLike.toEmbeddingLike.{max (succ u5) (succ u1), succ u5, succ u1} (FirstOrder.Language.Equiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3) N P (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u5, u1} L N P _inst_2 _inst_3))) g (FunLike.coe.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M (fun (_x : M) => (fun (a._@.Mathlib.ModelTheory.Basic._hyg.8189 : M) => N) _x) (EmbeddingLike.toFunLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (EquivLike.toEmbeddingLike.{max (succ u4) (succ u5), succ u4, succ u5} (FirstOrder.Language.Equiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2) M N (FirstOrder.Language.Equiv.instEquivLikeEquiv.{u2, u3, u4, u5} L M N _inst_1 _inst_2))) f x))
+Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_applyₓ'. -/
 @[simp]
 theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
   rfl
 #align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_apply
 
+/- warning: first_order.language.equiv.comp_assoc -> FirstOrder.Language.Equiv.comp_assoc is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {M : Type.{u3}} {N : Type.{u4}} [_inst_1 : FirstOrder.Language.Structure.{u1, u2, u3} L M] [_inst_2 : FirstOrder.Language.Structure.{u1, u2, u4} L N] {P : Type.{u5}} [_inst_3 : FirstOrder.Language.Structure.{u1, u2, u5} L P] {Q : Type.{u6}} [_inst_4 : FirstOrder.Language.Structure.{u1, u2, u6} L Q] (f : FirstOrder.Language.Equiv.{u1, u2, u3, u4} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Equiv.{u1, u2, u4, u5} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Equiv.{u1, u2, u5, u6} L P Q _inst_3 _inst_4), Eq.{max (succ u3) (succ u6)} (FirstOrder.Language.Equiv.{u1, u2, u3, u6} L M Q _inst_1 _inst_4) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u6} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Equiv.comp.{u1, u2, u4, u5, u6} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u5, u6} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Equiv.comp.{u1, u2, u3, u4, u5} L M N _inst_1 _inst_2 P _inst_3 g f))
+but is expected to have type
+  forall {L : FirstOrder.Language.{u3, u4}} {M : Type.{u5}} {N : Type.{u6}} [_inst_1 : FirstOrder.Language.Structure.{u3, u4, u5} L M] [_inst_2 : FirstOrder.Language.Structure.{u3, u4, u6} L N] {P : Type.{u2}} [_inst_3 : FirstOrder.Language.Structure.{u3, u4, u2} L P] {Q : Type.{u1}} [_inst_4 : FirstOrder.Language.Structure.{u3, u4, u1} L Q] (f : FirstOrder.Language.Equiv.{u3, u4, u5, u6} L M N _inst_1 _inst_2) (g : FirstOrder.Language.Equiv.{u3, u4, u6, u2} L N P _inst_2 _inst_3) (h : FirstOrder.Language.Equiv.{u3, u4, u2, u1} L P Q _inst_3 _inst_4), Eq.{max (succ u5) (succ u1)} (FirstOrder.Language.Equiv.{u3, u4, u5, u1} L M Q _inst_1 _inst_4) (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u6, u1} L M N _inst_1 _inst_2 Q _inst_4 (FirstOrder.Language.Equiv.comp.{u3, u4, u6, u2, u1} L N P _inst_2 _inst_3 Q _inst_4 h g) f) (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u2, u1} L M P _inst_1 _inst_3 Q _inst_4 h (FirstOrder.Language.Equiv.comp.{u3, u4, u5, u6, u2} L M N _inst_1 _inst_2 P _inst_3 g f))
+Case conversion may be inaccurate. Consider using '#align first_order.language.equiv.comp_assoc FirstOrder.Language.Equiv.comp_assocₓ'. -/
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
@@ -855,6 +1187,12 @@ theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
 
 end Equiv
 
+/- warning: first_order.language.strong_hom_class.to_equiv -> FirstOrder.Language.StrongHomClass.toEquiv is a dubious translation:
+lean 3 declaration is
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EquivLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u1, u2, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N (EquivLike.toEmbeddingLike.{succ u3, succ u4, succ u5} F M N _inst_7)) _inst_5 _inst_6], F -> (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+but is expected to have type
+  forall {L : FirstOrder.Language.{u1, u2}} {F : Type.{u3}} {M : Type.{u4}} {N : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u4} L M] [_inst_6 : FirstOrder.Language.Structure.{u1, u2, u5} L N] [_inst_7 : EquivLike.{succ u3, succ u4, succ u5} F M N] [_inst_8 : FirstOrder.Language.StrongHomClass.{u2, u1, u3, u4, u5} L F M N (EmbeddingLike.toFunLike.{succ u3, succ u4, succ u5} F M N (EquivLike.toEmbeddingLike.{succ u3, succ u4, succ u5} F M N _inst_7)) _inst_5 _inst_6], F -> (FirstOrder.Language.Equiv.{u1, u2, u4, u5} L M N _inst_5 _inst_6)
+Case conversion may be inaccurate. Consider using '#align first_order.language.strong_hom_class.to_equiv FirstOrder.Language.StrongHomClass.toEquivₓ'. -/
 /-- Any element of a bijective `strong_hom_class` can be realized as a first_order isomorphism. -/
 def StrongHomClass.toEquiv {F M N} [L.Structure M] [L.Structure N] [EquivLike F M N]
     [StrongHomClass L F M N] : F → M ≃[L] N := fun φ =>
@@ -866,32 +1204,58 @@ section SumStructure
 
 variable (L₁ L₂ : Language) (S : Type _) [L₁.Structure S] [L₂.Structure S]
 
+#print FirstOrder.Language.sumStructure /-
 instance sumStructure : (L₁.Sum L₂).Structure S
     where
   funMap n := Sum.elim funMap funMap
   rel_map n := Sum.elim RelMap RelMap
 #align first_order.language.sum_Structure FirstOrder.Language.sumStructure
+-/
 
 variable {L₁ L₂ S}
 
+/- warning: first_order.language.fun_map_sum_inl -> FirstOrder.Language.funMap_sum_inl is a dubious translation:
+lean 3 declaration is
+  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u1, u2} L₁ n), Eq.{succ u5} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u1, u3} (FirstOrder.Language.Functions.{u1, u2} L₁ n) (FirstOrder.Language.Functions.{u3, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u1, u2, u5} L₁ S _inst_5 n f)
+but is expected to have type
+  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u5, u2} (FirstOrder.Language.Functions.{u5, u4} L₁ n) (FirstOrder.Language.Functions.{u2, u1} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u5, u4, u3} L₁ S _inst_5 n f)
+Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_sum_inl FirstOrder.Language.funMap_sum_inlₓ'. -/
 @[simp]
 theorem funMap_sum_inl {n : ℕ} (f : L₁.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inl f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inl FirstOrder.Language.funMap_sum_inl
 
+/- warning: first_order.language.fun_map_sum_inr -> FirstOrder.Language.funMap_sum_inr is a dubious translation:
+lean 3 declaration is
+  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u3, u4} L₂ n), Eq.{succ u5} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u3} (FirstOrder.Language.Functions.{u1, u2} L₁ n) (FirstOrder.Language.Functions.{u3, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u3, u4, u5} L₂ S _inst_6 n f)
+but is expected to have type
+  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (f : FirstOrder.Language.Functions.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> S) (FirstOrder.Language.Structure.funMap.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u2, u5} (FirstOrder.Language.Functions.{u2, u1} L₁ n) (FirstOrder.Language.Functions.{u5, u4} L₂ n) f)) (FirstOrder.Language.Structure.funMap.{u5, u4, u3} L₂ S _inst_6 n f)
+Case conversion may be inaccurate. Consider using '#align first_order.language.fun_map_sum_inr FirstOrder.Language.funMap_sum_inrₓ'. -/
 @[simp]
 theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
     @funMap (L₁.Sum L₂) S _ n (Sum.inr f) = funMap f :=
   rfl
 #align first_order.language.fun_map_sum_inr FirstOrder.Language.funMap_sum_inr
 
+/- warning: first_order.language.rel_map_sum_inl -> FirstOrder.Language.relMap_sum_inl is a dubious translation:
+lean 3 declaration is
+  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u1, u2} L₁ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u1, u2, u5} L₁ S _inst_5 n R)
+but is expected to have type
+  forall {L₁ : FirstOrder.Language.{u5, u4}} {L₂ : FirstOrder.Language.{u2, u1}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u5, u4, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u2, u1, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₁ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.rel_map.{max u2 u5, max u1 u4, u3} (FirstOrder.Language.sum.{u5, u4, u2, u1} L₁ L₂) S (FirstOrder.Language.sumStructure.{u5, u4, u2, u1, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inl.{u4, u1} (FirstOrder.Language.Relations.{u5, u4} L₁ n) (FirstOrder.Language.Relations.{u2, u1} L₂ n) R)) (FirstOrder.Language.Structure.rel_map.{u5, u4, u3} L₁ S _inst_5 n R)
+Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inlₓ'. -/
 @[simp]
 theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inl R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inl
 
+/- warning: first_order.language.rel_map_sum_inr -> FirstOrder.Language.relMap_sum_inr is a dubious translation:
+lean 3 declaration is
+  forall {L₁ : FirstOrder.Language.{u1, u2}} {L₂ : FirstOrder.Language.{u3, u4}} {S : Type.{u5}} [_inst_5 : FirstOrder.Language.Structure.{u1, u2, u5} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u3, u4, u5} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u3, u4} L₂ n), Eq.{succ u5} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.RelMap.{max u1 u3, max u2 u4, u5} (FirstOrder.Language.sum.{u1, u2, u3, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u1, u2, u3, u4, u5} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u2, u4} (FirstOrder.Language.Relations.{u1, u2} L₁ n) (FirstOrder.Language.Relations.{u3, u4} L₂ n) R)) (FirstOrder.Language.Structure.RelMap.{u3, u4, u5} L₂ S _inst_6 n R)
+but is expected to have type
+  forall {L₁ : FirstOrder.Language.{u2, u1}} {L₂ : FirstOrder.Language.{u5, u4}} {S : Type.{u3}} [_inst_5 : FirstOrder.Language.Structure.{u2, u1, u3} L₁ S] [_inst_6 : FirstOrder.Language.Structure.{u5, u4, u3} L₂ S] {n : Nat} (R : FirstOrder.Language.Relations.{u5, u4} L₂ n), Eq.{succ u3} (((Fin n) -> S) -> Prop) (FirstOrder.Language.Structure.rel_map.{max u5 u2, max u4 u1, u3} (FirstOrder.Language.sum.{u2, u1, u5, u4} L₁ L₂) S (FirstOrder.Language.sumStructure.{u2, u1, u5, u4, u3} L₁ L₂ S _inst_5 _inst_6) n (Sum.inr.{u1, u4} (FirstOrder.Language.Relations.{u2, u1} L₁ n) (FirstOrder.Language.Relations.{u5, u4} L₂ n) R)) (FirstOrder.Language.Structure.rel_map.{u5, u4, u3} L₂ S _inst_6 n R)
+Case conversion may be inaccurate. Consider using '#align first_order.language.rel_map_sum_inr FirstOrder.Language.relMap_sum_inrₓ'. -/
 @[simp]
 theorem relMap_sum_inr {n : ℕ} (R : L₂.Relations n) :
     @RelMap (L₁.Sum L₂) S _ n (Sum.inr R) = RelMap R :=
@@ -906,25 +1270,31 @@ section
 
 variable [Language.empty.Structure M] [Language.empty.Structure N]
 
+#print FirstOrder.Language.empty.nonempty_embedding_iff /-
 @[simp]
 theorem empty.nonempty_embedding_iff :
     Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} (#M) ≤ Cardinal.lift.{w} (#N) :=
   trans ⟨Nonempty.map fun f => f.toEmbedding, Nonempty.map fun f => { toEmbedding := f }⟩
     Cardinal.lift_mk_le'.symm
 #align first_order.language.empty.nonempty_embedding_iff FirstOrder.Language.empty.nonempty_embedding_iff
+-/
 
+#print FirstOrder.Language.empty.nonempty_equiv_iff /-
 @[simp]
 theorem empty.nonempty_equiv_iff :
     Nonempty (M ≃[Language.empty] N) ↔ Cardinal.lift.{w'} (#M) = Cardinal.lift.{w} (#N) :=
   trans ⟨Nonempty.map fun f => f.toEquiv, Nonempty.map fun f => { toEquiv := f }⟩
     Cardinal.lift_mk_eq'.symm
 #align first_order.language.empty.nonempty_equiv_iff FirstOrder.Language.empty.nonempty_equiv_iff
+-/
 
 end
 
+#print FirstOrder.Language.emptyStructure /-
 instance emptyStructure : Language.empty.Structure M :=
   ⟨fun _ => Empty.elim, fun _ => Empty.elim⟩
 #align first_order.language.empty_Structure FirstOrder.Language.emptyStructure
+-/
 
 instance : Unique (Language.empty.Structure M) :=
   ⟨⟨Language.emptyStructure⟩, fun a => by
@@ -932,25 +1302,33 @@ instance : Unique (Language.empty.Structure M) :=
     · exact Empty.elim f
     · exact Subsingleton.elim _ _⟩
 
+#print FirstOrder.Language.strongHomClassEmpty /-
 instance (priority := 100) strongHomClassEmpty {F M N} [FunLike F M fun _ => N] :
     StrongHomClass Language.empty F M N :=
   ⟨fun _ _ f => Empty.elim f, fun _ _ r => Empty.elim r⟩
 #align first_order.language.strong_hom_class_empty FirstOrder.Language.strongHomClassEmpty
+-/
 
+#print Function.emptyHom /-
 /-- Makes a `language.empty.hom` out of any function. -/
 @[simps]
 def Function.emptyHom (f : M → N) : M →[Language.empty] N where toFun := f
 #align function.empty_hom Function.emptyHom
+-/
 
+#print Embedding.empty /-
 /-- Makes a `language.empty.embedding` out of any function. -/
 @[simps]
 def Embedding.empty (f : M ↪ N) : M ↪[Language.empty] N where toEmbedding := f
 #align embedding.empty Embedding.empty
+-/
 
+#print Equiv.empty /-
 /-- Makes a `language.empty.equiv` out of any function. -/
 @[simps]
 def Equiv.empty (f : M ≃ N) : M ≃[Language.empty] N where toEquiv := f
 #align equiv.empty Equiv.empty
+-/
 
 end Empty
 
@@ -966,12 +1344,15 @@ open FirstOrder
 
 variable {L : Language} {M : Type _} {N : Type _} [L.Structure M]
 
+#print Equiv.inducedStructure /-
 /-- A structure induced by a bijection. -/
 @[simps]
 def inducedStructure (e : M ≃ N) : L.Structure N :=
   ⟨fun n f x => e (funMap f (e.symm ∘ x)), fun n r x => RelMap r (e.symm ∘ x)⟩
 #align equiv.induced_Structure Equiv.inducedStructure
+-/
 
+#print Equiv.inducedStructureEquiv /-
 /-- A bijection as a first-order isomorphism with the induced structure on the codomain. -/
 @[simps]
 def inducedStructureEquiv (e : M ≃ N) : @Language.Equiv L M N _ (inducedStructure e) :=
@@ -979,6 +1360,7 @@ def inducedStructureEquiv (e : M ≃ N) : @Language.Equiv L M N _ (inducedStruct
     map_fun' := fun n f x => by simp [← Function.comp.assoc e.symm e x]
     map_rel' := fun n r x => by simp [← Function.comp.assoc e.symm e x] }
 #align equiv.induced_Structure_equiv Equiv.inducedStructureEquiv
+-/
 
 end Equiv
 

Changes in mathlib4

mathlib3
mathlib4
chore: classify porting notes referring to missing linters (#12098)

Reference the newly created issues #12094 and #12096, as well as the pre-existing #5171. Change all references to #10927 to #5171. Some of these changes were not labelled as "porting note"; change this for good measure.

Diff
@@ -133,7 +133,7 @@ protected def sum (L : Language.{u, v}) (L' : Language.{u', v'}) : Language :=
 variable (L : Language.{u, v})
 
 /-- The type of constants in a given language. -/
--- Porting note: The linter does not exist yet, according to Algebra.Hom.GroupAction.
+-- Porting note(#5171): this linter isn't ported yet.
 -- @[nolint has_nonempty_instance]
 protected def Constants :=
   L.Functions 0
@@ -146,7 +146,7 @@ theorem constants_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
 #align first_order.language.constants_mk₂ FirstOrder.Language.constants_mk₂
 
 /-- The type of symbols in a given language. -/
--- Porting note: The linter does not exist yet, according to Algebra.Hom.GroupAction.
+-- Porting note(#5171): this linter isn't ported yet.
 -- @[nolint has_nonempty_instance]
 def Symbols :=
   Sum (Σl, L.Functions l) (Σl, L.Relations l)
feat(ModelTheory): lift of equivalences between direct limits, and direct limit of system of substructures (#11174)

Define the equivalence between direct limits of isomorphic systems, and the equivalence between the direct limit of a system of substructures and the union of these substructures. Co-authored-by: Aaron Anderson <awainverse@gmail.com>

Co-authored-by: Gabin <68381468+QuinnLesquimau@users.noreply.github.com> Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -667,6 +667,15 @@ theorem ext_iff {f g : M ↪[L] N} : f = g ↔ ∀ x, f x = g x :=
   ⟨fun h _ => h ▸ rfl, fun h => ext h⟩
 #align first_order.language.embedding.ext_iff FirstOrder.Language.Embedding.ext_iff
 
+theorem toHom_injective : @Function.Injective (M ↪[L] N) (M →[L] N) (·.toHom) := by
+  intro f f' h
+  ext
+  exact congr_fun (congr_arg (↑) h) _
+
+@[simp]
+theorem toHom_inj {f g : M ↪[L] N} : f.toHom = g.toHom ↔ f = g :=
+  ⟨fun h ↦ toHom_injective h, fun h ↦ congr_arg (·.toHom) h⟩
+
 theorem injective (f : M ↪[L] N) : Function.Injective f :=
   f.toEmbedding.injective
 #align first_order.language.embedding.injective FirstOrder.Language.Embedding.injective
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -412,9 +412,7 @@ set_option linter.uppercaseLean3 false in
 namespace Structure
 
 variable {c f₁ f₂ : Type u} {r₁ r₂ : Type v}
-
 variable {c' : c → M} {f₁' : f₁ → M → M} {f₂' : f₂ → M → M → M}
-
 variable {r₁' : r₁ → Set M} {r₂' : r₂ → M → M → Prop}
 
 @[simp]
chore: classify new definition porting notes (#11446)

Classifies by adding issue number #11445 to porting notes claiming anything equivalent to:

  • "new definition"
  • "added definition"
Diff
@@ -365,7 +365,7 @@ scoped[FirstOrder] notation:25 A " ≃[" L "] " B => FirstOrder.Language.Equiv L
 -- The former reported an error.
 variable {L M N} {P : Type*} [Structure L P] {Q : Type*} [Structure L Q]
 
--- Porting note: new definition
+-- Porting note (#11445): new definition
 /-- Interpretation of a constant symbol -/
 @[coe]
 def constantMap (c : L.Constants) : M := funMap c default
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -365,7 +365,7 @@ scoped[FirstOrder] notation:25 A " ≃[" L "] " B => FirstOrder.Language.Equiv L
 -- The former reported an error.
 variable {L M N} {P : Type*} [Structure L P] {Q : Type*} [Structure L Q]
 
---Porting note: new definition
+-- Porting note: new definition
 /-- Interpretation of a constant symbol -/
 @[coe]
 def constantMap (c : L.Constants) : M := funMap c default
@@ -470,7 +470,7 @@ class StrongHomClass (L : outParam Language) (F M N : Type*)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
---Porting note: using implicit brackets for `Structure` arguments
+-- Porting note: using implicit brackets for `Structure` arguments
 instance (priority := 100) StrongHomClass.homClass [L.Structure M]
     [L.Structure N] [FunLike F M N] [StrongHomClass L F M N] : HomClass L F M N where
   map_fun := StrongHomClass.map_fun
chore: more backporting of simp changes from #10995 (#11001)

Co-authored-by: Patrick Massot <patrickmassot@free.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -96,7 +96,8 @@ theorem lift_mk {i : ℕ} :
     Cardinal.lift.{v,u} #(Sequence₂ a₀ a₁ a₂ i)
       = #(Sequence₂ (ULift.{v,u} a₀) (ULift.{v,u} a₁) (ULift.{v,u} a₂) i) := by
   rcases i with (_ | _ | _ | i) <;>
-    simp only [Sequence₂, mk_uLift, mk_fintype, Nat.cast_zero, lift_zero, Fintype.card_pempty]
+    simp only [Sequence₂, mk_uLift, Nat.succ_ne_zero, IsEmpty.forall_iff, Nat.succ.injEq,
+      add_eq_zero, OfNat.ofNat_ne_zero, and_false, one_ne_zero, mk_eq_zero, lift_zero]
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 
 @[simp]
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulₛₗ and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulₛₗ successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A →* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulₛₗ not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ a simp lemma instead of the generic map_smulₛₗ. Writing simp [map_smulₛₗ _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -455,7 +455,7 @@ end Structure
 
 /-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `FirstOrder.Language.Hom`. -/
-class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
+class HomClass (L : outParam Language) (F M N : Type*)
   [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
@@ -463,7 +463,7 @@ class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
 
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
-class StrongHomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
+class StrongHomClass (L : outParam Language) (F M N : Type*)
   [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
@@ -603,15 +603,17 @@ def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M N]
 
 namespace Embedding
 
-instance embeddingLike : EmbeddingLike (M ↪[L] N) M N where
+instance funLike : FunLike (M ↪[L] N) M N where
   coe f := f.toFun
-  injective' f := f.toEmbedding.injective
   coe_injective' f g h := by
     cases f
     cases g
     congr
     ext x
     exact Function.funext_iff.1 h x
+
+instance embeddingLike : EmbeddingLike (M ↪[L] N) M N where
+  injective' f := f.toEmbedding.injective
 #align first_order.language.embedding.embedding_like FirstOrder.Language.Embedding.embeddingLike
 
 instance strongHomClass : StrongHomClass L (M ↪[L] N) M N where
@@ -619,9 +621,7 @@ instance strongHomClass : StrongHomClass L (M ↪[L] N) M N where
   map_rel := map_rel'
 #align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClass
 
-instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
-  DFunLike.hasCoeToFun
-#align first_order.language.embedding.has_coe_to_fun FirstOrder.Language.Embedding.hasCoeToFun
+#noalign first_order.language.embedding.has_coe_to_fun -- Porting note: replaced by funLike instance
 
 @[simp]
 theorem map_fun (φ : M ↪[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
@@ -768,8 +768,8 @@ theorem refl_toHom : (refl L M).toHom = Hom.id L M :=
 end Embedding
 
 /-- Any element of an injective `StrongHomClass` can be realized as a first_order embedding. -/
-def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [EmbeddingLike F M N]
-    [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
+def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [FunLike F M N]
+    [EmbeddingLike F M N] [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
   ⟨⟨φ, EmbeddingLike.injective φ⟩, StrongHomClass.map_fun φ, StrongHomClass.map_rel φ⟩
 #align first_order.language.strong_hom_class.to_embedding FirstOrder.Language.StrongHomClass.toEmbedding
 
feat(ModelTheory/Basic): additional simp lemmas (#9953)

Also results about injectivity.

Diff
@@ -585,6 +585,14 @@ theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
   rfl
 #align first_order.language.hom.comp_assoc FirstOrder.Language.Hom.comp_assoc
 
+@[simp]
+theorem comp_id (f : M →[L] N) : f.comp (id L M) = f :=
+  rfl
+
+@[simp]
+theorem id_comp (f : M →[L] N) : (id L N).comp f = f :=
+  rfl
+
 end Hom
 
 /-- Any element of a `HomClass` can be realized as a first_order homomorphism. -/
@@ -723,13 +731,40 @@ theorem comp_assoc (f : M ↪[L] N) (g : N ↪[L] P) (h : P ↪[L] Q) :
   rfl
 #align first_order.language.embedding.comp_assoc FirstOrder.Language.Embedding.comp_assoc
 
+theorem comp_injective (h : N ↪[L] P) :
+    Function.Injective (h.comp : (M ↪[L] N) →  (M ↪[L] P)) := by
+  intro f g hfg
+  ext x; exact h.injective (DFunLike.congr_fun hfg x)
+
+@[simp]
+theorem comp_inj (h : N ↪[L] P) (f g : M ↪[L] N) : h.comp f = h.comp g ↔ f = g :=
+  ⟨fun eq ↦ h.comp_injective eq, congr_arg h.comp⟩
+
+theorem toHom_comp_injective (h : N ↪[L] P) :
+    Function.Injective (h.toHom.comp : (M →[L] N) →  (M →[L] P)) := by
+  intro f g hfg
+  ext x; exact h.injective (DFunLike.congr_fun hfg x)
+
+@[simp]
+theorem toHom_comp_inj (h : N ↪[L] P) (f g : M →[L] N) : h.toHom.comp f = h.toHom.comp g ↔ f = g :=
+  ⟨fun eq ↦ h.toHom_comp_injective eq, congr_arg h.toHom.comp⟩
+
 @[simp]
 theorem comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
-    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom := by
-  ext
-  simp only [coe_toHom, comp_apply, Hom.comp_apply]
+    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
+  rfl
 #align first_order.language.embedding.comp_to_hom FirstOrder.Language.Embedding.comp_toHom
 
+@[simp]
+theorem comp_refl (f : M ↪[L] N) : f.comp (refl L M) = f := DFunLike.coe_injective rfl
+
+@[simp]
+theorem refl_comp (f : M ↪[L] N) : (refl L N).comp f = f := DFunLike.coe_injective rfl
+
+@[simp]
+theorem refl_toHom : (refl L M).toHom = Hom.id L M :=
+  rfl
+
 end Embedding
 
 /-- Any element of an injective `StrongHomClass` can be realized as a first_order embedding. -/
@@ -775,6 +810,11 @@ instance hasCoeToFun : CoeFun (M ≃[L] N) fun _ => M → N :=
   DFunLike.hasCoeToFun
 #align first_order.language.equiv.has_coe_to_fun FirstOrder.Language.Equiv.hasCoeToFun
 
+@[simp]
+theorem symm_symm (f : M ≃[L] N) :
+    f.symm.symm = f :=
+  rfl
+
 @[simp]
 theorem apply_symm_apply (f : M ≃[L] N) (a : N) : f (f.symm a) = a :=
   f.toEquiv.apply_symm_apply a
@@ -827,6 +867,9 @@ theorem coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M 
   rfl
 #align first_order.language.equiv.coe_to_embedding FirstOrder.Language.Equiv.coe_toEmbedding
 
+theorem injective_toEmbedding : Function.Injective (toEmbedding : (M ≃[L] N) → M ↪[L] N) := by
+  intro _ _ h; apply DFunLike.coe_injective; exact congr_arg (DFunLike.coe ∘ Embedding.toHom) h
+
 theorem coe_injective : @Function.Injective (M ≃[L] N) (M → N) (↑) :=
   DFunLike.coe_injective
 #align first_order.language.equiv.coe_injective FirstOrder.Language.Equiv.coe_injective
@@ -884,12 +927,85 @@ theorem comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f
   rfl
 #align first_order.language.equiv.comp_apply FirstOrder.Language.Equiv.comp_apply
 
+@[simp]
+theorem comp_refl (g : M ≃[L] N) : g.comp (refl L M) = g :=
+  rfl
+
+@[simp]
+theorem refl_comp (g : M ≃[L] N) : (refl L N).comp g = g :=
+  rfl
+
+@[simp]
+theorem refl_toEmbedding : (refl L M).toEmbedding = Embedding.refl L M :=
+  rfl
+
+@[simp]
+theorem refl_toHom : (refl L M).toHom = Hom.id L M :=
+  rfl
+
 /-- Composition of first-order homomorphisms is associative. -/
 theorem comp_assoc (f : M ≃[L] N) (g : N ≃[L] P) (h : P ≃[L] Q) :
     (h.comp g).comp f = h.comp (g.comp f) :=
   rfl
 #align first_order.language.equiv.comp_assoc FirstOrder.Language.Equiv.comp_assoc
 
+theorem injective_comp (h : N ≃[L] P) :
+    Function.Injective (h.comp : (M ≃[L] N) →  (M ≃[L] P)) := by
+  intro f g hfg
+  ext x; exact h.injective (congr_fun (congr_arg DFunLike.coe hfg) x)
+
+@[simp]
+theorem comp_toHom (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
+    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
+  rfl
+
+@[simp]
+theorem comp_toEmbedding (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
+    (hnp.comp hmn).toEmbedding = hnp.toEmbedding.comp hmn.toEmbedding :=
+  rfl
+
+@[simp]
+theorem self_comp_symm (f : M ≃[L] N) : f.comp f.symm = refl L N := by
+  ext; rw [comp_apply, apply_symm_apply, refl_apply]
+
+@[simp]
+theorem symm_comp_self (f : M ≃[L] N) : f.symm.comp f = refl L M := by
+  ext; rw [comp_apply, symm_apply_apply, refl_apply]
+
+@[simp]
+theorem symm_comp_self_toEmbedding (f : M ≃[L] N) :
+    f.symm.toEmbedding.comp f.toEmbedding = Embedding.refl L M := by
+  rw [← comp_toEmbedding, symm_comp_self, refl_toEmbedding]
+
+@[simp]
+theorem self_comp_symm_toEmbedding (f : M ≃[L] N) :
+    f.toEmbedding.comp f.symm.toEmbedding = Embedding.refl L N := by
+  rw [← comp_toEmbedding, self_comp_symm, refl_toEmbedding]
+
+@[simp]
+theorem symm_comp_self_toHom (f : M ≃[L] N) :
+    f.symm.toHom.comp f.toHom = Hom.id L M := by
+  rw [← comp_toHom, symm_comp_self, refl_toHom]
+
+@[simp]
+theorem self_comp_symm_toHom (f : M ≃[L] N) :
+    f.toHom.comp f.symm.toHom = Hom.id L N := by
+  rw [← comp_toHom, self_comp_symm, refl_toHom]
+
+@[simp]
+theorem comp_symm (f : M ≃[L] N) (g : N ≃[L] P) : (g.comp f).symm = f.symm.comp g.symm :=
+  rfl
+
+theorem comp_right_injective (h : M ≃[L] N) :
+    Function.Injective (fun f ↦ f.comp h : (N ≃[L] P) → (M ≃[L] P)) := by
+  intro f g hfg
+  convert (congr_arg (fun r : (M ≃[L] P) ↦ r.comp h.symm) hfg) <;>
+    rw [comp_assoc, self_comp_symm, comp_refl]
+
+@[simp]
+theorem comp_right_inj (h : M ≃[L] N) (f g : N ≃[L] P) : f.comp h = g.comp h ↔ f = g :=
+  ⟨fun eq ↦ h.comp_right_injective eq, congr_arg (fun (r : N ≃[L] P) ↦ r.comp h)⟩
+
 end Equiv
 
 /-- Any element of a bijective `StrongHomClass` can be realized as a first_order isomorphism. -/
refactor(*): abbreviation for non-dependent FunLike (#9833)

This follows up from #9785, which renamed FunLike to DFunLike, by introducing a new abbreviation FunLike F α β := DFunLike F α (fun _ => β), to make the non-dependent use of FunLike easier.

I searched for the pattern DFunLike.*fun and DFunLike.*λ in all files to replace expressions of the form DFunLike F α (fun _ => β) with FunLike F α β. I did this everywhere except for extends clauses for two reasons: it would conflict with #8386, and more importantly extends must directly refer to a structure with no unfolding of defs or abbrevs.

Diff
@@ -456,7 +456,7 @@ end Structure
 /-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `FirstOrder.Language.Hom`. -/
 class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
-  [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
+  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
@@ -464,26 +464,26 @@ class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
-  [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
+  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
 --Porting note: using implicit brackets for `Structure` arguments
 instance (priority := 100) StrongHomClass.homClass [L.Structure M]
-    [L.Structure N] [DFunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N where
+    [L.Structure N] [FunLike F M N] [StrongHomClass L F M N] : HomClass L F M N where
   map_fun := StrongHomClass.map_fun
   map_rel φ _ R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 
 /-- Not an instance to avoid a loop. -/
 theorem HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
-    [DFunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N where
+    [FunLike F M N] [HomClass L F M N] : StrongHomClass L F M N where
   map_fun := HomClass.map_fun
   map_rel _ n R _ := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 
-theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
+theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
 #align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constants
@@ -498,10 +498,10 @@ attribute [inherit_doc FirstOrder.Language.Hom.map_rel'] FirstOrder.Language.Emb
 
 namespace Hom
 
-instance instDFunLike : DFunLike (M →[L] N) M fun _ => N where
+instance instFunLike : FunLike (M →[L] N) M N where
   coe := Hom.toFun
   coe_injective' f g h := by cases f; cases g; cases h; rfl
-#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instDFunLike
+#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instFunLike
 
 instance homClass : HomClass L (M →[L] N) M N where
   map_fun := map_fun'
@@ -588,7 +588,7 @@ theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
 end Hom
 
 /-- Any element of a `HomClass` can be realized as a first_order homomorphism. -/
-def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
+def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
   ⟨φ, HomClass.map_fun φ, HomClass.map_rel φ⟩
 #align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHom
@@ -968,7 +968,7 @@ instance : Unique (Language.empty.Structure M) :=
   ⟨⟨Language.emptyStructure⟩, fun a => by
     ext _ f <;> exact Empty.elim f⟩
 
-instance (priority := 100) strongHomClassEmpty {F M N} [DFunLike F M fun _ => N] :
+instance (priority := 100) strongHomClassEmpty {F M N} [FunLike F M N] :
     StrongHomClass Language.empty F M N :=
   ⟨fun _ _ f => Empty.elim f, fun _ _ r => Empty.elim r⟩
 #align first_order.language.strong_hom_class_empty FirstOrder.Language.strongHomClassEmpty
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -456,7 +456,7 @@ end Structure
 /-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `FirstOrder.Language.Hom`. -/
 class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
+  [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
@@ -464,26 +464,26 @@ class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
+  [DFunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
 --Porting note: using implicit brackets for `Structure` arguments
 instance (priority := 100) StrongHomClass.homClass [L.Structure M]
-    [L.Structure N] [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N where
+    [L.Structure N] [DFunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N where
   map_fun := StrongHomClass.map_fun
   map_rel φ _ R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 
 /-- Not an instance to avoid a loop. -/
 theorem HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
-    [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N where
+    [DFunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N where
   map_fun := HomClass.map_fun
   map_rel _ n R _ := (IsAlgebraic.empty_relations n).elim R
 #align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 
-theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
+theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
   (HomClass.map_fun φ c default).trans (congr rfl (funext default))
 #align first_order.language.hom_class.map_constants FirstOrder.Language.HomClass.map_constants
@@ -498,10 +498,10 @@ attribute [inherit_doc FirstOrder.Language.Hom.map_rel'] FirstOrder.Language.Emb
 
 namespace Hom
 
-instance funLike : FunLike (M →[L] N) M fun _ => N where
+instance instDFunLike : DFunLike (M →[L] N) M fun _ => N where
   coe := Hom.toFun
   coe_injective' f g h := by cases f; cases g; cases h; rfl
-#align first_order.language.hom.fun_like FirstOrder.Language.Hom.funLike
+#align first_order.language.hom.fun_like FirstOrder.Language.Hom.instDFunLike
 
 instance homClass : HomClass L (M →[L] N) M N where
   map_fun := map_fun'
@@ -512,7 +512,7 @@ instance [L.IsAlgebraic] : StrongHomClass L (M →[L] N) M N :=
   HomClass.strongHomClassOfIsAlgebraic
 
 instance hasCoeToFun : CoeFun (M →[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.hom.has_coe_to_fun FirstOrder.Language.Hom.hasCoeToFun
 
 @[simp]
@@ -522,11 +522,11 @@ theorem toFun_eq_coe {f : M →[L] N} : f.toFun = (f : M → N) :=
 
 @[ext]
 theorem ext ⦃f g : M →[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
-  FunLike.ext f g h
+  DFunLike.ext f g h
 #align first_order.language.hom.ext FirstOrder.Language.Hom.ext
 
 theorem ext_iff {f g : M →[L] N} : f = g ↔ ∀ x, f x = g x :=
-  FunLike.ext_iff
+  DFunLike.ext_iff
 #align first_order.language.hom.ext_iff FirstOrder.Language.Hom.ext_iff
 
 @[simp]
@@ -588,7 +588,7 @@ theorem comp_assoc (f : M →[L] N) (g : N →[L] P) (h : P →[L] Q) :
 end Hom
 
 /-- Any element of a `HomClass` can be realized as a first_order homomorphism. -/
-def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
+def HomClass.toHom {F M N} [L.Structure M] [L.Structure N] [DFunLike F M fun _ => N]
     [HomClass L F M N] : F → M →[L] N := fun φ =>
   ⟨φ, HomClass.map_fun φ, HomClass.map_rel φ⟩
 #align first_order.language.hom_class.to_hom FirstOrder.Language.HomClass.toHom
@@ -612,7 +612,7 @@ instance strongHomClass : StrongHomClass L (M ↪[L] N) M N where
 #align first_order.language.embedding.strong_hom_class FirstOrder.Language.Embedding.strongHomClass
 
 instance hasCoeToFun : CoeFun (M ↪[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.embedding.has_coe_to_fun FirstOrder.Language.Embedding.hasCoeToFun
 
 @[simp]
@@ -772,7 +772,7 @@ def symm (f : M ≃[L] N) : N ≃[L] M :=
 #align first_order.language.equiv.symm FirstOrder.Language.Equiv.symm
 
 instance hasCoeToFun : CoeFun (M ≃[L] N) fun _ => M → N :=
-  FunLike.hasCoeToFun
+  DFunLike.hasCoeToFun
 #align first_order.language.equiv.has_coe_to_fun FirstOrder.Language.Equiv.hasCoeToFun
 
 @[simp]
@@ -828,7 +828,7 @@ theorem coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M 
 #align first_order.language.equiv.coe_to_embedding FirstOrder.Language.Equiv.coe_toEmbedding
 
 theorem coe_injective : @Function.Injective (M ≃[L] N) (M → N) (↑) :=
-  FunLike.coe_injective
+  DFunLike.coe_injective
 #align first_order.language.equiv.coe_injective FirstOrder.Language.Equiv.coe_injective
 
 @[ext]
@@ -968,7 +968,7 @@ instance : Unique (Language.empty.Structure M) :=
   ⟨⟨Language.emptyStructure⟩, fun a => by
     ext _ f <;> exact Empty.elim f⟩
 
-instance (priority := 100) strongHomClassEmpty {F M N} [FunLike F M fun _ => N] :
+instance (priority := 100) strongHomClassEmpty {F M N} [DFunLike F M fun _ => N] :
     StrongHomClass Language.empty F M N :=
   ⟨fun _ _ f => Empty.elim f, fun _ _ r => Empty.elim r⟩
 #align first_order.language.strong_hom_class_empty FirstOrder.Language.strongHomClassEmpty
@@ -1043,14 +1043,14 @@ theorem toEquiv_inducedStructureEquiv (e : M ≃ N) :
 
 @[simp]
 theorem toFun_inducedStructureEquiv (e : M ≃ N) :
-    FunLike.coe (@inducedStructureEquiv L M N _ e) = e :=
+    DFunLike.coe (@inducedStructureEquiv L M N _ e) = e :=
   rfl
 
 @[simp]
 theorem toFun_inducedStructureEquiv_Symm (e : M ≃ N) :
     (by
     letI : L.Structure N := inducedStructure e
-    exact FunLike.coe (@inducedStructureEquiv L M N _ e).symm) = (e.symm : N → M) :=
+    exact DFunLike.coe (@inducedStructureEquiv L M N _ e).symm) = (e.symm : N → M) :=
   rfl
 
 end Equiv
chore(Function): rename some lemmas (#9738)
  • Merge Function.left_id and Function.comp.left_id into Function.id_comp.
  • Merge Function.right_id and Function.comp.right_id into Function.comp_id.
  • Merge Function.comp_const_right and Function.comp_const into Function.comp_const, use explicit arguments.
  • Move Function.const_comp to Mathlib.Init.Function, use explicit arguments.
Diff
@@ -764,11 +764,11 @@ def symm (f : M ≃[L] N) : N ≃[L] M :=
       simp only [Equiv.toFun_as_coe]
       rw [Equiv.symm_apply_eq]
       refine' Eq.trans _ (f.map_fun' f' (f.toEquiv.symm ∘ x)).symm
-      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id]
+      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp]
     map_rel' := fun n r {x} => by
       simp only [Equiv.toFun_as_coe]
       refine' (f.map_rel' r (f.toEquiv.symm ∘ x)).symm.trans _
-      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id] }
+      rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp] }
 #align first_order.language.equiv.symm FirstOrder.Language.Equiv.symm
 
 instance hasCoeToFun : CoeFun (M ≃[L] N) fun _ => M → N :=
feat: demote the instance Fintype.ofIsEmpty to a def (#8816)

Rationale: this instance creates (empty) data out of nothing, which may conflict with other data. If you have in the context [Fintype i] and case on whether i is empty or not, then this gave two non-defeq instances of [Fintype i] around.

Diff
@@ -96,7 +96,7 @@ theorem lift_mk {i : ℕ} :
     Cardinal.lift.{v,u} #(Sequence₂ a₀ a₁ a₂ i)
       = #(Sequence₂ (ULift.{v,u} a₀) (ULift.{v,u} a₁) (ULift.{v,u} a₂) i) := by
   rcases i with (_ | _ | _ | i) <;>
-    simp only [Sequence₂, mk_uLift, mk_fintype, Fintype.card_of_isEmpty, Nat.cast_zero, lift_zero]
+    simp only [Sequence₂, mk_uLift, mk_fintype, Nat.cast_zero, lift_zero, Fintype.card_pempty]
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 
 @[simp]
chore: only four spaces for subsequent lines (#7286)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -1048,7 +1048,7 @@ theorem toFun_inducedStructureEquiv (e : M ≃ N) :
 
 @[simp]
 theorem toFun_inducedStructureEquiv_Symm (e : M ≃ N) :
-  (by
+    (by
     letI : L.Structure N := inducedStructure e
     exact FunLike.coe (@inducedStructureEquiv L M N _ e).symm) = (e.symm : N → M) :=
   rfl
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -39,6 +39,8 @@ the continuum hypothesis*][flypitch_itp]
 
 -/
 
+set_option autoImplicit true
+
 
 universe u v u' v' w w'
 
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
@@ -56,9 +56,9 @@ namespace FirstOrder
   type of relations of every natural-number arity. -/
 @[nolint checkUnivs]
 structure Language where
-  /-- For every arity, a `Type _` of functions of that arity -/
+  /-- For every arity, a `Type*` of functions of that arity -/
   Functions : ℕ → Type u
-  /-- For every arity, a `Type _` of relations of that arity -/
+  /-- For every arity, a `Type*` of relations of that arity -/
   Relations : ℕ → Type v
 #align first_order.language FirstOrder.Language
 
@@ -181,12 +181,12 @@ instance [L.IsRelational] {n : ℕ} : IsEmpty (L.Functions n) :=
 instance [L.IsAlgebraic] {n : ℕ} : IsEmpty (L.Relations n) :=
   IsAlgebraic.empty_relations n
 
-instance isRelational_of_empty_functions {symb : ℕ → Type _} :
+instance isRelational_of_empty_functions {symb : ℕ → Type*} :
     IsRelational ⟨fun _ => Empty, symb⟩ :=
   ⟨fun _ => instIsEmptyEmpty⟩
 #align first_order.language.is_relational_of_empty_functions FirstOrder.Language.isRelational_of_empty_functions
 
-instance isAlgebraic_of_empty_relations {symb : ℕ → Type _} : IsAlgebraic ⟨symb, fun _ => Empty⟩ :=
+instance isAlgebraic_of_empty_relations {symb : ℕ → Type*} : IsAlgebraic ⟨symb, fun _ => Empty⟩ :=
   ⟨fun _ => instIsEmptyEmpty⟩
 #align first_order.language.is_algebraic_of_empty_relations FirstOrder.Language.isAlgebraic_of_empty_relations
 
@@ -300,7 +300,7 @@ variable (N : Type w') [L.Structure M] [L.Structure N]
 open Structure
 
 /-- Used for defining `FirstOrder.Language.Theory.ModelType.instInhabited`. -/
-def Inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
+def Inhabited.trivialStructure {α : Type*} [Inhabited α] : L.Structure α :=
   ⟨default, default⟩
 #align first_order.language.inhabited.trivial_structure FirstOrder.Language.Inhabited.trivialStructure
 
@@ -360,7 +360,7 @@ scoped[FirstOrder] notation:25 A " ≃[" L "] " B => FirstOrder.Language.Equiv L
 
 -- Porting note: was [L.Structure P] and [L.Structure Q]
 -- The former reported an error.
-variable {L M N} {P : Type _} [Structure L P] {Q : Type _} [Structure L Q]
+variable {L M N} {P : Type*} [Structure L P] {Q : Type*} [Structure L Q]
 
 --Porting note: new definition
 /-- Interpretation of a constant symbol -/
@@ -453,7 +453,7 @@ end Structure
 
 /-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `FirstOrder.Language.Hom`. -/
-class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
+class HomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
   [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
@@ -461,7 +461,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
-class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
+class StrongHomClass (L : outParam Language) (F : Type*) (M N : outParam <| Type*)
   [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
@@ -899,7 +899,7 @@ def StrongHomClass.toEquiv {F M N} [L.Structure M] [L.Structure N] [EquivLike F
 
 section SumStructure
 
-variable (L₁ L₂ : Language) (S : Type _) [L₁.Structure S] [L₂.Structure S]
+variable (L₁ L₂ : Language) (S : Type*) [L₁.Structure S] [L₂.Structure S]
 
 instance sumStructure : (L₁.sum L₂).Structure S where
   funMap := Sum.elim funMap funMap
@@ -1014,7 +1014,7 @@ open FirstOrder FirstOrder.Language FirstOrder.Language.Structure
 
 open FirstOrder
 
-variable {L : Language} {M : Type _} {N : Type _} [L.Structure M]
+variable {L : Language} {M : Type*} {N : Type*} [L.Structure M]
 
 /-- A structure induced by a bijection. -/
 @[simps!]
feat: Linter that checks that Prop classes are Props (#6148)
Diff
@@ -454,7 +454,7 @@ end Structure
 /-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
   typeclass when you extend `FirstOrder.Language.Hom`. -/
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
@@ -462,7 +462,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
   relations in both directions. -/
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
-  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
+  [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] : Prop where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
   map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
@@ -475,7 +475,7 @@ instance (priority := 100) StrongHomClass.homClass [L.Structure M]
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
 
 /-- Not an instance to avoid a loop. -/
-def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
+theorem HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
     [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N where
   map_fun := HomClass.map_fun
   map_rel _ n R _ := (IsAlgebraic.empty_relations n).elim R
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,15 +2,12 @@
 Copyright (c) 2021 Aaron Anderson, Jesse Michael Han, Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn
-
-! This file was ported from Lean 3 source module model_theory.basic
-! leanprover-community/mathlib commit 369525b73f229ccd76a6ec0e0e0bf2be57599768
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Fin.VecNotation
 import Mathlib.SetTheory.Cardinal.Basic
 
+#align_import model_theory.basic from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
+
 /-!
 # Basics on First-Order Structures
 This file defines first-order languages and structures in the style of the
fix: precedence of # (#5623)
Diff
@@ -94,14 +94,14 @@ instance {n : ℕ} : IsEmpty (Sequence₂ a₀ a₁ a₂ (n + 3)) := inferInstan
 
 @[simp]
 theorem lift_mk {i : ℕ} :
-    Cardinal.lift.{v,u} (#Sequence₂ a₀ a₁ a₂ i)
-      = (#Sequence₂ (ULift.{v,u} a₀) (ULift.{v,u} a₁) (ULift.{v,u} a₂) i) := by
+    Cardinal.lift.{v,u} #(Sequence₂ a₀ a₁ a₂ i)
+      = #(Sequence₂ (ULift.{v,u} a₀) (ULift.{v,u} a₁) (ULift.{v,u} a₂) i) := by
   rcases i with (_ | _ | _ | i) <;>
     simp only [Sequence₂, mk_uLift, mk_fintype, Fintype.card_of_isEmpty, Nat.cast_zero, lift_zero]
 #align first_order.sequence₂.lift_mk FirstOrder.Sequence₂.lift_mk
 
 @[simp]
-theorem sum_card : (Cardinal.sum fun i => #Sequence₂ a₀ a₁ a₂ i) = (#a₀) + (#a₁) + (#a₂) := by
+theorem sum_card : Cardinal.sum (fun i => #(Sequence₂ a₀ a₁ a₂ i)) = #a₀ + #a₁ + #a₂ := by
   rw [sum_nat_eq_add_sum_succ, sum_nat_eq_add_sum_succ, sum_nat_eq_add_sum_succ]
   simp [add_assoc, Sequence₂]
 #align first_order.sequence₂.sum_card FirstOrder.Sequence₂.sum_card
@@ -173,8 +173,8 @@ variable {L} {L' : Language.{u', v'}}
 
 theorem card_eq_card_functions_add_card_relations :
     L.card =
-      (Cardinal.sum fun l => Cardinal.lift.{v} (#L.Functions l)) +
-        Cardinal.sum fun l => Cardinal.lift.{u} (#L.Relations l) := by
+      (Cardinal.sum fun l => Cardinal.lift.{v} #(L.Functions l)) +
+        Cardinal.sum fun l => Cardinal.lift.{u} #(L.Relations l) := by
   simp [card, Symbols]
 #align first_order.language.card_eq_card_functions_add_card_relations FirstOrder.Language.card_eq_card_functions_add_card_relations
 
@@ -251,15 +251,15 @@ instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σ
 
 @[simp]
 theorem card_functions_sum (i : ℕ) :
-    (#(L.sum L').Functions i)
-      = (Cardinal.lift.{u'} (#L.Functions i) + Cardinal.lift.{u} (#L'.Functions i) : Cardinal) := by
+    #((L.sum L').Functions i)
+      = (Cardinal.lift.{u'} #(L.Functions i) + Cardinal.lift.{u} #(L'.Functions i) : Cardinal) := by
   simp [Language.sum]
 #align first_order.language.card_functions_sum FirstOrder.Language.card_functions_sum
 
 @[simp]
 theorem card_relations_sum (i : ℕ) :
-    (#(L.sum L').Relations i) =
-      Cardinal.lift.{v'} (#L.Relations i) + Cardinal.lift.{v} (#L'.Relations i) := by
+    #((L.sum L').Relations i) =
+      Cardinal.lift.{v'} #(L.Relations i) + Cardinal.lift.{v} #(L'.Relations i) := by
   simp [Language.sum]
 #align first_order.language.card_relations_sum FirstOrder.Language.card_relations_sum
 
@@ -268,14 +268,14 @@ theorem card_sum :
     (L.sum L').card = Cardinal.lift.{max u' v'} L.card + Cardinal.lift.{max u v} L'.card := by
   simp only [card_eq_card_functions_add_card_relations, card_functions_sum, card_relations_sum,
     sum_add_distrib', lift_add, lift_sum, lift_lift]
-  simp only [add_assoc, add_comm (Cardinal.sum fun i => (#L'.Functions i).lift)]
+  simp only [add_assoc, add_comm (Cardinal.sum fun i => (#(L'.Functions i)).lift)]
 #align first_order.language.card_sum FirstOrder.Language.card_sum
 
 @[simp]
 theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
     (Language.mk₂ c f₁ f₂ r₁ r₂).card =
-      Cardinal.lift.{v} (#c) + Cardinal.lift.{v} (#f₁) + Cardinal.lift.{v} (#f₂) +
-          Cardinal.lift.{u} (#r₁) + Cardinal.lift.{u} (#r₂) := by
+      Cardinal.lift.{v} #c + Cardinal.lift.{v} #f₁ + Cardinal.lift.{v} #f₂ +
+          Cardinal.lift.{u} #r₁ + Cardinal.lift.{u} #r₂ := by
   simp [card_eq_card_functions_add_card_relations, add_assoc]
 #align first_order.language.card_mk₂ FirstOrder.Language.card_mk₂
 
@@ -946,14 +946,14 @@ variable [Language.empty.Structure M] [Language.empty.Structure N]
 
 @[simp]
 theorem empty.nonempty_embedding_iff :
-    Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} (#M) ≤ Cardinal.lift.{w} (#N) :=
+    Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} #M ≤ Cardinal.lift.{w} #N :=
   _root_.trans ⟨Nonempty.map fun f => f.toEmbedding, Nonempty.map fun f => { toEmbedding := f }⟩
     Cardinal.lift_mk_le'.symm
 #align first_order.language.empty.nonempty_embedding_iff FirstOrder.Language.empty.nonempty_embedding_iff
 
 @[simp]
 theorem empty.nonempty_equiv_iff :
-    Nonempty (M ≃[Language.empty] N) ↔ Cardinal.lift.{w'} (#M) = Cardinal.lift.{w} (#N) :=
+    Nonempty (M ≃[Language.empty] N) ↔ Cardinal.lift.{w'} #M = Cardinal.lift.{w} #N :=
   _root_.trans ⟨Nonempty.map fun f => f.toEquiv, Nonempty.map fun f => { toEquiv := f }⟩
     Cardinal.lift_mk_eq'.symm
 #align first_order.language.empty.nonempty_equiv_iff FirstOrder.Language.empty.nonempty_equiv_iff
doc: fix the docs on ModelTheory/* (#3968)
Diff
@@ -29,16 +29,10 @@ structures.
 * A `FirstOrder.Language.Embedding`, denoted `M ↪[L] N`, is an embedding from the `L`-structure `M`
   to the `L`-structure `N` that commutes with the interpretations of functions, and which preserves
   the interpretations of relations in both directions.
-* A `FirstOrder.Language.ElementaryEmbedding`, denoted `M ↪ₑ[L] N`, is an embedding from the
-  `L`-structure `M` to the `L`-structure `N` that commutes with the realizations of all formulas.
 * A `FirstOrder.Language.Equiv`, denoted `M ≃[L] N`, is an equivalence from the `L`-structure `M`
   to the `L`-structure `N` that commutes with the interpretations of functions, and which preserves
   the interpretations of relations in both directions.
 
-## TODO
-
-Use `[Countable L.symbols]` instead of `[L.countable]`.
-
 ## References
 For the Flypitch project:
 - [J. Han, F. van Doorn, *A formal proof of the independence of the continuum hypothesis*]
@@ -980,12 +974,12 @@ instance (priority := 100) strongHomClassEmpty {F M N} [FunLike F M fun _ => N]
   ⟨fun _ _ f => Empty.elim f, fun _ _ r => Empty.elim r⟩
 #align first_order.language.strong_hom_class_empty FirstOrder.Language.strongHomClassEmpty
 
-/-- Makes a `Language.empty.hom` out of any function. -/
+/-- Makes a `Language.empty.Hom` out of any function. -/
 @[simps]
 def _root_.Function.emptyHom (f : M → N) : M →[Language.empty] N where toFun := f
 #align function.empty_hom Function.emptyHom
 
-/-- Makes a `Language.empty.embedding` out of any function. -/
+/-- Makes a `Language.empty.Embedding` out of any function. -/
 --@[simps] Porting note: commented out and lemmas added manually
 def _root_.Embedding.empty (f : M ↪ N) : M ↪[Language.empty] N where toEmbedding := f
 #align embedding.empty Embedding.empty
@@ -998,7 +992,7 @@ theorem toFun_embedding_empty (f : M ↪ N) : (Embedding.empty f : M → N) = f
 theorem toEmbedding_embedding_empty (f : M ↪ N) : (Embedding.empty f).toEmbedding = f :=
   rfl
 
-/-- Makes a `Language.empty.equiv` out of any function. -/
+/-- Makes a `Language.empty.Equiv` out of any function. -/
 --@[simps] Porting note: commented out and lemmas added manually
 def _root_.Equiv.empty (f : M ≃ N) : M ≃[Language.empty] N where toEquiv := f
 #align equiv.empty Equiv.empty
refactor: rename FirstOrder.Language.inhabited.trivialStructure to Inhabited.trivialStructure (#3934)
Diff
@@ -308,10 +308,10 @@ variable (N : Type w') [L.Structure M] [L.Structure N]
 
 open Structure
 
-/-- Used for defining `FirstOrder.Language.Theory.Model.inhabited`. -/
-def inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
+/-- Used for defining `FirstOrder.Language.Theory.ModelType.instInhabited`. -/
+def Inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
   ⟨default, default⟩
-#align first_order.language.inhabited.trivial_structure FirstOrder.Language.inhabited.trivialStructure
+#align first_order.language.inhabited.trivial_structure FirstOrder.Language.Inhabited.trivialStructure
 
 /-! ### Maps -/
 
refactor: Rename FirstOrder.Language.Structure.rel_map to RelMap (#3910)
Diff
@@ -296,9 +296,13 @@ class Structure where
   /-- Interpretation of the function symbols -/
   funMap : ∀ {n}, L.Functions n → (Fin n → M) → M
   /-- Interpretation of the relation symbols -/
-  rel_map : ∀ {n}, L.Relations n → (Fin n → M) → Prop
+  RelMap : ∀ {n}, L.Relations n → (Fin n → M) → Prop
 set_option linter.uppercaseLean3 false in
 #align first_order.language.Structure FirstOrder.Language.Structure
+set_option linter.uppercaseLean3 false in
+#align first_order.language.Structure.fun_map FirstOrder.Language.Structure.funMap
+set_option linter.uppercaseLean3 false in
+#align first_order.language.Structure.rel_map FirstOrder.Language.Structure.RelMap
 
 variable (N : Type w') [L.Structure M] [L.Structure N]
 
@@ -327,7 +331,7 @@ structure Hom where
   map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
     intros; trivial
   /-- The homomorphism sends related elements to related elements -/
-  map_rel' : ∀ {n} (r : L.Relations n) (x), rel_map r x → rel_map r (toFun ∘ x) := by
+  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r x → RelMap r (toFun ∘ x) := by
     -- Porting note: see porting note on `Hom.map_fun'`
     intros; trivial
 #align first_order.language.hom FirstOrder.Language.Hom
@@ -341,7 +345,7 @@ structure Embedding extends M ↪ N where
   map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
     -- Porting note: see porting note on `Hom.map_fun'`
     intros; trivial
-  map_rel' : ∀ {n} (r : L.Relations n) (x), rel_map r (toFun ∘ x) ↔ rel_map r x := by
+  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (toFun ∘ x) ↔ RelMap r x := by
     -- Porting note: see porting note on `Hom.map_fun'`
     intros; trivial
 #align first_order.language.embedding FirstOrder.Language.Embedding
@@ -355,7 +359,7 @@ structure Equiv extends M ≃ N where
   map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
     -- Porting note: see porting note on `Hom.map_fun'`
     intros; trivial
-  map_rel' : ∀ {n} (r : L.Relations n) (x), rel_map r (toFun ∘ x) ↔ rel_map r x := by
+  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (toFun ∘ x) ↔ RelMap r x := by
     -- Porting note: see porting note on `Hom.map_fun'`
     intros; trivial
 #align first_order.language.equiv FirstOrder.Language.Equiv
@@ -442,14 +446,14 @@ set_option linter.uppercaseLean3 false in
 
 @[simp]
 theorem relMap_apply₁ (r : r₁) (x : M) :
-    @Structure.rel_map _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 1 r ![x] = (x ∈ r₁' r) :=
+    @Structure.RelMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 1 r ![x] = (x ∈ r₁' r) :=
   rfl
 set_option linter.uppercaseLean3 false in
 #align first_order.language.Structure.rel_map_apply₁ FirstOrder.Language.Structure.relMap_apply₁
 
 @[simp]
 theorem relMap_apply₂ (r : r₂) (x y : M) :
-    @Structure.rel_map _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 2 r ![x, y] = r₂' r x y :=
+    @Structure.RelMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 2 r ![x, y] = r₂' r x y :=
   rfl
 set_option linter.uppercaseLean3 false in
 #align first_order.language.Structure.rel_map_apply₂ FirstOrder.Language.Structure.relMap_apply₂
@@ -461,7 +465,7 @@ end Structure
 class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
   [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
-  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), rel_map r x → rel_map r (φ ∘ x)
+  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)
 #align first_order.language.hom_class FirstOrder.Language.HomClass
 
 /-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
@@ -469,7 +473,7 @@ class HomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
 class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Type _)
   [FunLike F M fun _ => N] [L.Structure M] [L.Structure N] where
   map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
-  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), rel_map r (φ ∘ x) ↔ rel_map r x
+  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
 --Porting note: using implicit brackets for `Structure` arguments
@@ -545,7 +549,7 @@ theorem map_constants (φ : M →[L] N) (c : L.Constants) : φ c = c :=
 
 @[simp]
 theorem map_rel (φ : M →[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
-    rel_map r x → rel_map r (φ ∘ x) :=
+    RelMap r x → RelMap r (φ ∘ x) :=
   HomClass.map_rel φ r x
 #align first_order.language.hom.map_rel FirstOrder.Language.Hom.map_rel
 
@@ -631,7 +635,7 @@ theorem map_constants (φ : M ↪[L] N) (c : L.Constants) : φ c = c :=
 
 @[simp]
 theorem map_rel (φ : M ↪[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
-    rel_map r (φ ∘ x) ↔ rel_map r x :=
+    RelMap r (φ ∘ x) ↔ RelMap r x :=
   StrongHomClass.map_rel φ r x
 #align first_order.language.embedding.map_rel FirstOrder.Language.Embedding.map_rel
 
@@ -801,7 +805,7 @@ theorem map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
 
 @[simp]
 theorem map_rel (φ : M ≃[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
-    rel_map r (φ ∘ x) ↔ rel_map r x :=
+    RelMap r (φ ∘ x) ↔ RelMap r x :=
   StrongHomClass.map_rel φ r x
 #align first_order.language.equiv.map_rel FirstOrder.Language.Equiv.map_rel
 
@@ -908,7 +912,7 @@ variable (L₁ L₂ : Language) (S : Type _) [L₁.Structure S] [L₂.Structure
 
 instance sumStructure : (L₁.sum L₂).Structure S where
   funMap := Sum.elim funMap funMap
-  rel_map := Sum.elim rel_map rel_map
+  RelMap := Sum.elim RelMap RelMap
 set_option linter.uppercaseLean3 false in
 #align first_order.language.sum_Structure FirstOrder.Language.sumStructure
 
@@ -928,13 +932,13 @@ theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
 
 @[simp]
 theorem relMap_sum_inl {n : ℕ} (R : L₁.Relations n) :
-    @rel_map (L₁.sum L₂) S _ n (Sum.inl R) = rel_map R :=
+    @RelMap (L₁.sum L₂) S _ n (Sum.inl R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inl FirstOrder.Language.relMap_sum_inl
 
 @[simp]
 theorem relMap_sum_inr {n : ℕ} (R : L₂.Relations n) :
-    @rel_map (L₁.sum L₂) S _ n (Sum.inr R) = rel_map R :=
+    @RelMap (L₁.sum L₂) S _ n (Sum.inr R) = RelMap R :=
   rfl
 #align first_order.language.rel_map_sum_inr FirstOrder.Language.relMap_sum_inr
 
@@ -1024,7 +1028,7 @@ variable {L : Language} {M : Type _} {N : Type _} [L.Structure M]
 /-- A structure induced by a bijection. -/
 @[simps!]
 def inducedStructure (e : M ≃ N) : L.Structure N :=
-  ⟨fun f x => e (funMap f (e.symm ∘ x)), fun r x => rel_map r (e.symm ∘ x)⟩
+  ⟨fun f x => e (funMap f (e.symm ∘ x)), fun r x => RelMap r (e.symm ∘ x)⟩
 set_option linter.uppercaseLean3 false in
 #align equiv.induced_Structure Equiv.inducedStructure
 
chore: fix #align lines (#3640)

This PR fixes two things:

  • Most align statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align). This is often seen in the mathport output after ending calc blocks.
  • All remaining more-than-one-line #align statements. (This was needed for a script I wrote for #3630.)
Diff
@@ -283,7 +283,6 @@ theorem card_mk₂ (c f₁ f₂ : Type u) (r₁ r₂ : Type v) :
       Cardinal.lift.{v} (#c) + Cardinal.lift.{v} (#f₁) + Cardinal.lift.{v} (#f₂) +
           Cardinal.lift.{u} (#r₁) + Cardinal.lift.{u} (#r₂) := by
   simp [card_eq_card_functions_add_card_relations, add_assoc]
-
 #align first_order.language.card_mk₂ FirstOrder.Language.card_mk₂
 
 variable (L) (M : Type w)
chore: bump to nightly-2023-04-11 (#3139)
Diff
@@ -474,8 +474,8 @@ class StrongHomClass (L : outParam Language) (F : Type _) (M N : outParam <| Typ
 #align first_order.language.strong_hom_class FirstOrder.Language.StrongHomClass
 
 --Porting note: using implicit brackets for `Structure` arguments
-instance (priority := 100) StrongHomClass.homClass {F M N} {_ : L.Structure M}
-    {_ : L.Structure N} [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N where
+instance (priority := 100) StrongHomClass.homClass [L.Structure M]
+    [L.Structure N] [FunLike F M fun _ => N] [StrongHomClass L F M N] : HomClass L F M N where
   map_fun := StrongHomClass.map_fun
   map_rel φ _ R x := (StrongHomClass.map_rel φ R x).2
 #align first_order.language.strong_hom_class.hom_class FirstOrder.Language.StrongHomClass.homClass
chore: tidy various files (#3358)
Diff
@@ -182,9 +182,7 @@ theorem card_eq_card_functions_add_card_relations :
       (Cardinal.sum fun l => Cardinal.lift.{v} (#L.Functions l)) +
         Cardinal.sum fun l => Cardinal.lift.{u} (#L.Relations l) := by
   simp [card, Symbols]
-#align
-  first_order.language.card_eq_card_functions_add_card_relations
-  FirstOrder.Language.card_eq_card_functions_add_card_relations
+#align first_order.language.card_eq_card_functions_add_card_relations FirstOrder.Language.card_eq_card_functions_add_card_relations
 
 instance [L.IsRelational] {n : ℕ} : IsEmpty (L.Functions n) :=
   IsRelational.empty_functions n
@@ -195,15 +193,11 @@ instance [L.IsAlgebraic] {n : ℕ} : IsEmpty (L.Relations n) :=
 instance isRelational_of_empty_functions {symb : ℕ → Type _} :
     IsRelational ⟨fun _ => Empty, symb⟩ :=
   ⟨fun _ => instIsEmptyEmpty⟩
-#align
-  first_order.language.is_relational_of_empty_functions
-  FirstOrder.Language.isRelational_of_empty_functions
+#align first_order.language.is_relational_of_empty_functions FirstOrder.Language.isRelational_of_empty_functions
 
 instance isAlgebraic_of_empty_relations {symb : ℕ → Type _} : IsAlgebraic ⟨symb, fun _ => Empty⟩ :=
   ⟨fun _ => instIsEmptyEmpty⟩
-#align
-  first_order.language.is_algebraic_of_empty_relations
-  FirstOrder.Language.isAlgebraic_of_empty_relations
+#align first_order.language.is_algebraic_of_empty_relations FirstOrder.Language.isAlgebraic_of_empty_relations
 
 instance isRelational_empty : IsRelational Language.empty :=
   Language.isRelational_of_empty_functions
@@ -240,17 +234,13 @@ instance subsingleton_mk₂_functions {c f₁ f₂ : Type u} {r₁ r₂ : Type v
     Subsingleton ((Language.mk₂ c f₁ f₂ r₁ r₂).Functions n) :=
   Nat.casesOn n h0 fun n =>
     Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun _ => ⟨fun x => PEmpty.elim x⟩
-#align
-  first_order.language.subsingleton_mk₂_functions
-  FirstOrder.Language.subsingleton_mk₂_functions
+#align first_order.language.subsingleton_mk₂_functions FirstOrder.Language.subsingleton_mk₂_functions
 
 instance subsingleton_mk₂_relations {c f₁ f₂ : Type u} {r₁ r₂ : Type v} [h1 : Subsingleton r₁]
     [h2 : Subsingleton r₂] {n : ℕ} : Subsingleton ((Language.mk₂ c f₁ f₂ r₁ r₂).Relations n) :=
   Nat.casesOn n ⟨fun x => PEmpty.elim x⟩ fun n =>
     Nat.casesOn n h1 fun n => Nat.casesOn n h2 fun _ => ⟨fun x => PEmpty.elim x⟩
-#align
-  first_order.language.subsingleton_mk₂_relations
-  FirstOrder.Language.subsingleton_mk₂_relations
+#align first_order.language.subsingleton_mk₂_relations FirstOrder.Language.subsingleton_mk₂_relations
 
 @[simp]
 theorem empty_card : Language.empty.card = 0 := by simp [card_eq_card_functions_add_card_relations]
@@ -263,9 +253,7 @@ instance isEmpty_empty : IsEmpty Language.empty.Symbols := by
 
 instance Countable.countable_functions [h : Countable L.Symbols] : Countable (Σl, L.Functions l) :=
   @Function.Injective.countable _ _ h _ Sum.inl_injective
-#align
-  first_order.language.countable.countable_functions
-  FirstOrder.Language.Countable.countable_functions
+#align first_order.language.countable.countable_functions FirstOrder.Language.Countable.countable_functions
 
 @[simp]
 theorem card_functions_sum (i : ℕ) :
@@ -320,9 +308,7 @@ open Structure
 /-- Used for defining `FirstOrder.Language.Theory.Model.inhabited`. -/
 def inhabited.trivialStructure {α : Type _} [Inhabited α] : L.Structure α :=
   ⟨default, default⟩
-#align
-  first_order.language.inhabited.trivial_structure
-  FirstOrder.Language.inhabited.trivialStructure
+#align first_order.language.inhabited.trivial_structure FirstOrder.Language.inhabited.trivialStructure
 
 /-! ### Maps -/
 
@@ -398,9 +384,7 @@ theorem funMap_eq_coe_constants {c : L.Constants} {x : Fin 0 → M} : funMap c x
   be a global instance, because `L` becomes a metavariable. -/
 theorem nonempty_of_nonempty_constants [h : Nonempty L.Constants] : Nonempty M :=
   h.map (↑)
-#align
-  first_order.language.nonempty_of_nonempty_constants
-  FirstOrder.Language.nonempty_of_nonempty_constants
+#align first_order.language.nonempty_of_nonempty_constants FirstOrder.Language.nonempty_of_nonempty_constants
 
 /-- The function map for `FirstOrder.Language.Structure₂`. -/
 def funMap₂ {c f₁ f₂ : Type u} {r₁ r₂ : Type v} (c' : c → M) (f₁' : f₁ → M → M)
@@ -501,9 +485,7 @@ def HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M]
     [FunLike F M fun _ => N] [HomClass L F M N] : StrongHomClass L F M N where
   map_fun := HomClass.map_fun
   map_rel _ n R _ := (IsAlgebraic.empty_relations n).elim R
-#align
-  first_order.language.hom_class.strong_hom_class_of_is_algebraic
-  FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
+#align first_order.language.hom_class.strong_hom_class_of_is_algebraic FirstOrder.Language.HomClass.strongHomClassOfIsAlgebraic
 
 theorem HomClass.map_constants {F M N} [L.Structure M] [L.Structure N] [FunLike F M fun _ => N]
     [HomClass L F M N] (φ : F) (c : L.Constants) : φ c = c :=
@@ -698,17 +680,13 @@ def ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) : M
 theorem coeFn_ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
     (ofInjective hf : M → N) = f :=
   rfl
-#align
-  first_order.language.embedding.coe_fn_of_injective
-  FirstOrder.Language.Embedding.coeFn_ofInjective
+#align first_order.language.embedding.coe_fn_of_injective FirstOrder.Language.Embedding.coeFn_ofInjective
 
 @[simp]
 theorem ofInjective_toHom [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
     (ofInjective hf).toHom = f := by
   ext; simp
-#align
-  first_order.language.embedding.of_injective_to_hom
-  FirstOrder.Language.Embedding.ofInjective_toHom
+#align first_order.language.embedding.of_injective_to_hom FirstOrder.Language.Embedding.ofInjective_toHom
 
 variable (L) (M)
 
@@ -762,9 +740,7 @@ end Embedding
 def StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [EmbeddingLike F M N]
     [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
   ⟨⟨φ, EmbeddingLike.injective φ⟩, StrongHomClass.map_fun φ, StrongHomClass.map_rel φ⟩
-#align
-  first_order.language.strong_hom_class.to_embedding
-  FirstOrder.Language.StrongHomClass.toEmbedding
+#align first_order.language.strong_hom_class.to_embedding FirstOrder.Language.StrongHomClass.toEmbedding
 
 namespace Equiv
 
@@ -787,14 +763,13 @@ instance : StrongHomClass L (M ≃[L] N) M N where
 /-- The inverse of a first-order equivalence is a first-order equivalence. -/
 @[symm]
 def symm (f : M ≃[L] N) : N ≃[L] M :=
-  {
-    f.toEquiv.symm with
-    map_fun' := @fun n f' x => by
+  { f.toEquiv.symm with
+    map_fun' := fun n f' {x} => by
       simp only [Equiv.toFun_as_coe]
       rw [Equiv.symm_apply_eq]
       refine' Eq.trans _ (f.map_fun' f' (f.toEquiv.symm ∘ x)).symm
       rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id]
-    map_rel' := @fun n r x => by
+    map_rel' := fun n r {x} => by
       simp only [Equiv.toFun_as_coe]
       refine' (f.map_rel' r (f.toEquiv.symm ∘ x)).symm.trans _
       rw [← Function.comp.assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.comp.left_id] }
@@ -933,8 +908,8 @@ section SumStructure
 variable (L₁ L₂ : Language) (S : Type _) [L₁.Structure S] [L₂.Structure S]
 
 instance sumStructure : (L₁.sum L₂).Structure S where
-  funMap := @fun _ => Sum.elim funMap funMap
-  rel_map := @fun _ => Sum.elim rel_map rel_map
+  funMap := Sum.elim funMap funMap
+  rel_map := Sum.elim rel_map rel_map
 set_option linter.uppercaseLean3 false in
 #align first_order.language.sum_Structure FirstOrder.Language.sumStructure
 
@@ -977,9 +952,7 @@ theorem empty.nonempty_embedding_iff :
     Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} (#M) ≤ Cardinal.lift.{w} (#N) :=
   _root_.trans ⟨Nonempty.map fun f => f.toEmbedding, Nonempty.map fun f => { toEmbedding := f }⟩
     Cardinal.lift_mk_le'.symm
-#align
-  first_order.language.empty.nonempty_embedding_iff
-  FirstOrder.Language.empty.nonempty_embedding_iff
+#align first_order.language.empty.nonempty_embedding_iff FirstOrder.Language.empty.nonempty_embedding_iff
 
 @[simp]
 theorem empty.nonempty_equiv_iff :
feat: port ModelTheory.Basic (#2296)

Co-authored-by: Lukas Miaskiwskyi <lukas.mias@gmail.com> Co-authored-by: Arien Malec <arien.malec@gmail.com> Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: int-y1 <jason_yuen2007@hotmail.com> Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: qawbecrdtey <qawbecrdtey@naver.com>

Dependencies 7 + 302

303 files ported (97.7%)
124037 lines ported (97.6%)
Show graph

The unported dependencies are