model_theory.syntax
⟷
Mathlib.ModelTheory.Syntax
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -73,8 +73,8 @@ open scoped FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:377:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:377:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -368,7 +368,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:377:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1398,7 +1398,19 @@ theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
L.distinctConstantsTheory s =
⋃ t : Finset s,
L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s)) :=
- by classical
+ by
+ classical
+ simp only [distinct_constants_theory]
+ rw [← image_Union, ← Union_inter]
+ refine' congr rfl (congr (congr rfl _) rfl)
+ ext ⟨i, j⟩
+ simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_Union,
+ mem_image, Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
+ refine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩
+ · simp
+ · simp
+ · rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
+ exact ⟨is, js⟩
#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_iUnion
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -1398,19 +1398,7 @@ theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
L.distinctConstantsTheory s =
⋃ t : Finset s,
L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s)) :=
- by
- classical
- simp only [distinct_constants_theory]
- rw [← image_Union, ← Union_inter]
- refine' congr rfl (congr (congr rfl _) rfl)
- ext ⟨i, j⟩
- simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_Union,
- mem_image, Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
- refine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩
- · simp
- · simp
- · rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
- exact ⟨is, js⟩
+ by classical
#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_iUnion
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -73,8 +73,8 @@ open scoped FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -368,7 +368,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:380:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ 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.List.ProdSigma
-import Mathbin.Data.Set.Prod
-import Mathbin.Logic.Equiv.Fin
-import Mathbin.ModelTheory.LanguageMap
+import Data.List.ProdSigma
+import Data.Set.Prod
+import Logic.Equiv.Fin
+import ModelTheory.LanguageMap
#align_import model_theory.syntax from "leanprover-community/mathlib"@"ce38d86c0b2d427ce208c3cee3159cb421d2b3c4"
@@ -73,8 +73,8 @@ open scoped FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -368,7 +368,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
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.syntax
-! leanprover-community/mathlib commit ce38d86c0b2d427ce208c3cee3159cb421d2b3c4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.List.ProdSigma
import Mathbin.Data.Set.Prod
import Mathbin.Logic.Equiv.Fin
import Mathbin.ModelTheory.LanguageMap
+#align_import model_theory.syntax from "leanprover-community/mathlib"@"ce38d86c0b2d427ce208c3cee3159cb421d2b3c4"
+
/-!
# Basics on First-Order Syntax
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -294,7 +294,7 @@ instance inhabitedOfConstant [Inhabited L.Constants] : Inhabited (L.term α) :=
#print FirstOrder.Language.Term.liftAt /-
/-- Raises all of the `fin`-indexed variables of a term greater than or equal to `m` by `n'`. -/
def liftAt {n : ℕ} (n' m : ℕ) : L.term (Sum α (Fin n)) → L.term (Sum α (Fin (n + n'))) :=
- relabel (Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat n' i)
+ relabel (Sum.map id fun i => if ↑i < m then Fin.castAddEmb n' i else Fin.addNatEmb n' i)
#align first_order.language.term.lift_at FirstOrder.Language.Term.liftAt
-/
@@ -529,16 +529,16 @@ def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset
def castLE : ∀ {m n : ℕ} (h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
| m, n, h, falsum => falsum
| m, n, h, equal t₁ t₂ =>
- equal (t₁.relabel (Sum.map id (Fin.castLE h))) (t₂.relabel (Sum.map id (Fin.castLE h)))
- | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
- | m, n, h, imp f₁ f₂ => (f₁.castLE h).imp (f₂.castLE h)
- | m, n, h, all f => (f.castLE (add_le_add_right h 1)).all
+ equal (t₁.relabel (Sum.map id (Fin.castLEEmb h))) (t₂.relabel (Sum.map id (Fin.castLEEmb h)))
+ | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLEEmb h)) ∘ ts)
+ | m, n, h, imp f₁ f₂ => (f₁.castLEEmb h).imp (f₂.castLEEmb h)
+ | m, n, h, all f => (f.castLEEmb (add_le_add_right h 1)).all
#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLE
-/
#print FirstOrder.Language.BoundedFormula.castLE_rfl /-
@[simp]
-theorem castLE_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h = φ :=
+theorem castLE_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLEEmb h = φ :=
by
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
· rfl
@@ -552,7 +552,7 @@ theorem castLE_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h
#print FirstOrder.Language.BoundedFormula.castLE_castLE /-
@[simp]
theorem castLE_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormula α k) :
- (φ.castLE km).castLE mn = φ.castLE (km.trans mn) :=
+ (φ.castLEEmb km).castLEEmb mn = φ.castLEEmb (km.trans mn) :=
by
revert m n
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3 <;> intro m n km mn
@@ -688,7 +688,8 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
{xs : Fin (n + m) → M} :
- Sum.elim v xs ∘ relabelAux g m = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) :=
+ Sum.elim v xs ∘ relabelAux g m =
+ Sum.elim (Sum.elim v (xs ∘ castAddEmb m) ∘ g) (xs ∘ natAddEmb n) :=
by
ext x
cases x
@@ -701,7 +702,7 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
#print FirstOrder.Language.BoundedFormula.relabelAux_sum_inl /-
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
- relabelAux (Sum.inl : α → Sum α (Fin n)) k = Sum.map id (natAdd n) :=
+ relabelAux (Sum.inl : α → Sum α (Fin n)) k = Sum.map id (natAddEmb n) :=
by
ext x
cases x <;> · simp [relabel_aux]
@@ -773,7 +774,7 @@ theorem relabel_ex (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α (k
#print FirstOrder.Language.BoundedFormula.relabel_sum_inl /-
@[simp]
theorem relabel_sum_inl (φ : L.BoundedFormula α n) :
- (φ.relabel Sum.inl : L.BoundedFormula α (0 + n)) = φ.castLE (ge_of_eq (zero_add n)) :=
+ (φ.relabel Sum.inl : L.BoundedFormula α (0 + n)) = φ.castLEEmb (ge_of_eq (zero_add n)) :=
by
simp only [relabel, relabel_aux_sum_inl]
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
@@ -855,7 +856,7 @@ theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic
-/
#print FirstOrder.Language.BoundedFormula.IsAtomic.castLE /-
-theorem IsAtomic.castLE {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
+theorem IsAtomic.castLE {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLEEmb h).IsAtomic :=
IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLE
-/
@@ -902,8 +903,8 @@ theorem IsQF.liftAt {k m : ℕ} (h : IsQF φ) : (φ.liftAt k m).IsQF :=
-/
#print FirstOrder.Language.BoundedFormula.IsQF.castLE /-
-theorem IsQF.castLE {h : l ≤ n} (hφ : IsQF φ) : (φ.castLE h).IsQF :=
- IsQF.rec_on hφ isQF_bot (fun _ ih => ih.castLE.IsQF) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
+theorem IsQF.castLE {h : l ≤ n} (hφ : IsQF φ) : (φ.castLEEmb h).IsQF :=
+ IsQF.rec_on hφ isQF_bot (fun _ ih => ih.castLEEmb.IsQF) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
#align first_order.language.bounded_formula.is_qf.cast_le FirstOrder.Language.BoundedFormula.IsQF.castLE
-/
@@ -965,16 +966,16 @@ theorem IsPrenex.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsPrenex
-/
#print FirstOrder.Language.BoundedFormula.IsPrenex.castLE /-
-theorem IsPrenex.castLE (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLE h).IsPrenex :=
- IsPrenex.rec_on hφ (fun _ _ ih _ _ => ih.castLE.IsPrenex) (fun _ _ _ ih _ _ => ih.all)
+theorem IsPrenex.castLE (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLEEmb h).IsPrenex :=
+ IsPrenex.rec_on hφ (fun _ _ ih _ _ => ih.castLEEmb.IsPrenex) (fun _ _ _ ih _ _ => ih.all)
fun _ _ _ ih _ _ => ih.ex
#align first_order.language.bounded_formula.is_prenex.cast_le FirstOrder.Language.BoundedFormula.IsPrenex.castLE
-/
#print FirstOrder.Language.BoundedFormula.IsPrenex.liftAt /-
theorem IsPrenex.liftAt {k m : ℕ} (h : IsPrenex φ) : (φ.liftAt k m).IsPrenex :=
- IsPrenex.rec_on h (fun _ _ ih => ih.liftAt.IsPrenex) (fun _ _ _ ih => ih.castLE.all)
- fun _ _ _ ih => ih.castLE.ex
+ IsPrenex.rec_on h (fun _ _ ih => ih.liftAt.IsPrenex) (fun _ _ _ ih => ih.castLEEmb.all)
+ fun _ _ _ ih => ih.castLEEmb.ex
#align first_order.language.bounded_formula.is_prenex.lift_at FirstOrder.Language.BoundedFormula.IsPrenex.liftAt
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -76,8 +76,8 @@ open scoped FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -139,6 +139,7 @@ theorem relabel_id_eq_id : (Term.relabel id : L.term α → L.term α) = id :=
#align first_order.language.term.relabel_id_eq_id FirstOrder.Language.Term.relabel_id_eq_id
-/
+#print FirstOrder.Language.Term.relabel_relabel /-
@[simp]
theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
(t.relabel f).relabel g = t.relabel (g ∘ f) :=
@@ -147,12 +148,15 @@ theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
· rfl
· simp [ih]
#align first_order.language.term.relabel_relabel FirstOrder.Language.Term.relabel_relabel
+-/
+#print FirstOrder.Language.Term.relabel_comp_relabel /-
@[simp]
theorem relabel_comp_relabel (f : α → β) (g : β → γ) :
(Term.relabel g ∘ Term.relabel f : L.term α → L.term γ) = Term.relabel (g ∘ f) :=
funext (relabel_relabel f g)
#align first_order.language.term.relabel_comp_relabel FirstOrder.Language.Term.relabel_comp_relabel
+-/
#print FirstOrder.Language.Term.relabelEquiv /-
/-- Relabels a term's variables along a bijection. -/
@@ -259,17 +263,21 @@ def constantsVarsEquivLeft : L[[γ]].term (Sum α β) ≃ L.term (Sum (Sum γ α
#align first_order.language.term.constants_vars_equiv_left FirstOrder.Language.Term.constantsVarsEquivLeft
-/
+#print FirstOrder.Language.Term.constantsVarsEquivLeft_apply /-
@[simp]
theorem constantsVarsEquivLeft_apply (t : L[[γ]].term (Sum α β)) :
constantsVarsEquivLeft t = (constantsToVars t).relabel (Equiv.sumAssoc _ _ _).symm :=
rfl
#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_apply
+-/
+#print FirstOrder.Language.Term.constantsVarsEquivLeft_symm_apply /-
@[simp]
theorem constantsVarsEquivLeft_symm_apply (t : L.term (Sum (Sum γ α) β)) :
constantsVarsEquivLeft.symm t = varsToConstants (t.relabel (Equiv.sumAssoc _ _ _)) :=
rfl
#align first_order.language.term.constants_vars_equiv_left_symm_apply FirstOrder.Language.Term.constantsVarsEquivLeft_symm_apply
+-/
#print FirstOrder.Language.Term.inhabitedOfVar /-
instance inhabitedOfVar [Inhabited α] : Inhabited (L.term α) :=
@@ -301,7 +309,6 @@ def subst : L.term α → (α → L.term β) → L.term β
end Term
--- mathport name: language.term.var
scoped[FirstOrder] prefix:arg "&" => FirstOrder.Language.Term.var ∘ Sum.inr
namespace Lhom
@@ -333,6 +340,7 @@ theorem id_onTerm : ((LHom.id L).onTerm : L.term α → L.term α) = id :=
/- warning: first_order.language.Lhom.comp_on_term clashes with first_order.language.LHom.comp_on_term -> FirstOrder.Language.LHom.comp_onTerm
Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.comp_on_term FirstOrder.Language.LHom.comp_onTermₓ'. -/
+#print FirstOrder.Language.LHom.comp_onTerm /-
@[simp]
theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
((φ.comp ψ).onTerm : L.term α → L''.term α) = φ.onTerm ∘ ψ.onTerm :=
@@ -343,9 +351,11 @@ theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
· simp_rw [on_term, ih]
rfl
#align first_order.language.Lhom.comp_on_term FirstOrder.Language.LHom.comp_onTerm
+-/
end Lhom
+#print FirstOrder.Language.Lequiv.onTerm /-
/-- Maps a term's symbols along a language equivalence. -/
@[simps]
def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
@@ -357,10 +367,11 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
right_inv := by
rw [Function.rightInverse_iff_comp, ← Lhom.comp_on_term, φ.right_inv, Lhom.id_on_term]
#align first_order.language.Lequiv.on_term FirstOrder.Language.Lequiv.onTerm
+-/
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
@@ -621,6 +632,7 @@ def liftAt : ∀ {n : ℕ} (n' m : ℕ), L.BoundedFormula α n → L.BoundedForm
#align first_order.language.bounded_formula.lift_at FirstOrder.Language.BoundedFormula.liftAt
-/
+#print FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRel /-
@[simp]
theorem mapTermRel_mapTermRel {L'' : Language}
(ft : ∀ n, L.term (Sum α (Fin n)) → L'.term (Sum β (Fin n)))
@@ -637,6 +649,7 @@ theorem mapTermRel_mapTermRel {L'' : Language}
· simp [map_term_rel, ih1, ih2]
· simp [map_term_rel, ih3]
#align first_order.language.bounded_formula.map_term_rel_map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRel
+-/
#print FirstOrder.Language.BoundedFormula.mapTermRel_id_id_id /-
@[simp]
@@ -671,6 +684,7 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
#align first_order.language.bounded_formula.relabel_aux FirstOrder.Language.BoundedFormula.relabelAux
-/
+#print FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux /-
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
{xs : Fin (n + m) → M} :
@@ -682,7 +696,9 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
cases' g x with l r <;> simp
· simp [bounded_formula.relabel_aux]
#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux
+-/
+#print FirstOrder.Language.BoundedFormula.relabelAux_sum_inl /-
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
relabelAux (Sum.inl : α → Sum α (Fin n)) k = Sum.map id (natAdd n) :=
@@ -690,6 +706,7 @@ theorem relabelAux_sum_inl (k : ℕ) :
ext x
cases x <;> · simp [relabel_aux]
#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inl
+-/
#print FirstOrder.Language.BoundedFormula.relabel /-
/-- Relabels a bounded formula's variables along a particular function. -/
@@ -1087,6 +1104,7 @@ theorem id_onBoundedFormula :
#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.LHom.id_onBoundedFormula
-/
+#print FirstOrder.Language.LHom.comp_onBoundedFormula /-
@[simp]
theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
((φ.comp ψ).onBoundedFormula : L.BoundedFormula α n → L''.BoundedFormula α n) =
@@ -1102,6 +1120,7 @@ theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →
· simp only [on_bounded_formula, Function.comp_apply, ih1, ih2, eq_self_iff_true, and_self_iff]
· simp only [ih3, on_bounded_formula, Function.comp_apply]
#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.LHom.comp_onBoundedFormula
+-/
#print FirstOrder.Language.LHom.onFormula /-
/-- Maps a formula's symbols along a language map. -/
@@ -1124,16 +1143,19 @@ def onTheory (g : L →ᴸ L') (T : L.Theory) : L'.Theory :=
#align first_order.language.Lhom.on_Theory FirstOrder.Language.LHom.onTheory
-/
+#print FirstOrder.Language.LHom.mem_onTheory /-
@[simp]
theorem mem_onTheory {g : L →ᴸ L'} {T : L.Theory} {φ : L'.Sentence} :
φ ∈ g.onTheory T ↔ ∃ φ₀, φ₀ ∈ T ∧ g.onSentence φ₀ = φ :=
Set.mem_image _ _ _
#align first_order.language.Lhom.mem_on_Theory FirstOrder.Language.LHom.mem_onTheory
+-/
end Lhom
namespace Lequiv
+#print FirstOrder.Language.LEquiv.onBoundedFormula /-
/-- Maps a bounded formula's symbols along a language equivalence. -/
@[simps]
def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFormula α n
@@ -1147,57 +1169,62 @@ def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFo
rw [Function.rightInverse_iff_comp, ← Lhom.comp_on_bounded_formula, φ.right_inv,
Lhom.id_on_bounded_formula]
#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.LEquiv.onBoundedFormula
+-/
+#print FirstOrder.Language.LEquiv.onBoundedFormula_symm /-
theorem onBoundedFormula_symm (φ : L ≃ᴸ L') :
(φ.onBoundedFormula.symm : L'.BoundedFormula α n ≃ L.BoundedFormula α n) =
φ.symm.onBoundedFormula :=
rfl
#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.LEquiv.onBoundedFormula_symm
+-/
+#print FirstOrder.Language.LEquiv.onFormula /-
/-- Maps a formula's symbols along a language equivalence. -/
def onFormula (φ : L ≃ᴸ L') : L.Formula α ≃ L'.Formula α :=
φ.onBoundedFormula
#align first_order.language.Lequiv.on_formula FirstOrder.Language.LEquiv.onFormula
+-/
+#print FirstOrder.Language.LEquiv.onFormula_apply /-
@[simp]
theorem onFormula_apply (φ : L ≃ᴸ L') :
(φ.onFormula : L.Formula α → L'.Formula α) = φ.toLhom.onFormula :=
rfl
#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_apply
+-/
+#print FirstOrder.Language.LEquiv.onFormula_symm /-
@[simp]
theorem onFormula_symm (φ : L ≃ᴸ L') :
(φ.onFormula.symm : L'.Formula α ≃ L.Formula α) = φ.symm.onFormula :=
rfl
#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symm
+-/
+#print FirstOrder.Language.LEquiv.onSentence /-
/-- Maps a sentence's symbols along a language equivalence. -/
@[simps]
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence :=
φ.onFormula
#align first_order.language.Lequiv.on_sentence FirstOrder.Language.LEquiv.onSentence
+-/
end Lequiv
--- mathport name: term.bd_equal
scoped[FirstOrder] infixl:88 " =' " => FirstOrder.Language.Term.bdEqual
--- mathport name: bounded_formula.imp
-- input \~- or \simeq
scoped[FirstOrder] infixr:62 " ⟹ " => FirstOrder.Language.BoundedFormula.imp
--- mathport name: bounded_formula.all
-- input \==>
scoped[FirstOrder] prefix:110 "∀'" => FirstOrder.Language.BoundedFormula.all
--- mathport name: bounded_formula.not
scoped[FirstOrder] prefix:arg "∼" => FirstOrder.Language.BoundedFormula.not
--- mathport name: bounded_formula.iff
-- input \~, the ASCII character ~ has too low precedence
scoped[FirstOrder] infixl:61 " ⇔ " => FirstOrder.Language.BoundedFormula.iff
--- mathport name: bounded_formula.ex
-- input \<=>
scoped[FirstOrder] prefix:110 "∃'" => FirstOrder.Language.BoundedFormula.ex
@@ -1354,10 +1381,12 @@ variable {L} {α}
open Set
+#print FirstOrder.Language.monotone_distinctConstantsTheory /-
theorem monotone_distinctConstantsTheory :
Monotone (L.distinctConstantsTheory : Set α → L[[α]].Theory) := fun s t st =>
image_subset _ (inter_subset_inter_left _ (prod_mono st st))
#align first_order.language.monotone_distinct_constants_theory FirstOrder.Language.monotone_distinctConstantsTheory
+-/
#print FirstOrder.Language.directed_distinctConstantsTheory /-
theorem directed_distinctConstantsTheory :
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -76,8 +76,8 @@ open scoped FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -360,7 +360,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:370:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
@@ -1373,17 +1373,17 @@ theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s)) :=
by
classical
- simp only [distinct_constants_theory]
- rw [← image_Union, ← Union_inter]
- refine' congr rfl (congr (congr rfl _) rfl)
- ext ⟨i, j⟩
- simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_Union,
- mem_image, Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
- refine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩
- · simp
- · simp
- · rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
- exact ⟨is, js⟩
+ simp only [distinct_constants_theory]
+ rw [← image_Union, ← Union_inter]
+ refine' congr rfl (congr (congr rfl _) rfl)
+ ext ⟨i, j⟩
+ simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_Union,
+ mem_image, Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
+ refine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩
+ · simp
+ · simp
+ · rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
+ exact ⟨is, js⟩
#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_iUnion
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -72,7 +72,7 @@ variable {M : Type w} {N P : Type _} [L.Structure M] [L.Structure N] [L.Structur
variable {α : Type u'} {β : Type v'} {γ : Type _}
-open FirstOrder
+open scoped FirstOrder
open Structure Fin
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -139,12 +139,6 @@ theorem relabel_id_eq_id : (Term.relabel id : L.term α → L.term α) = id :=
#align first_order.language.term.relabel_id_eq_id FirstOrder.Language.Term.relabel_id_eq_id
-/
-/- warning: first_order.language.term.relabel_relabel -> FirstOrder.Language.Term.relabel_relabel is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (f : α -> β) (g : β -> γ) (t : FirstOrder.Language.Term.{u1, u2, u3} L α), Eq.{succ (max u1 u5)} (FirstOrder.Language.Term.{u1, u2, u5} L γ) (FirstOrder.Language.Term.relabel.{u1, u2, u4, u5} L β γ g (FirstOrder.Language.Term.relabel.{u1, u2, u3, u4} L α β f t)) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u5} L α γ (Function.comp.{succ u3, succ u4, succ u5} α β γ g f) t)
-but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (f : α -> β) (g : β -> γ) (t : FirstOrder.Language.Term.{u2, u3, u4} L α), Eq.{max (succ u2) (succ u1)} (FirstOrder.Language.Term.{u2, u3, u1} L γ) (FirstOrder.Language.Term.relabel.{u2, u3, u5, u1} L β γ g (FirstOrder.Language.Term.relabel.{u2, u3, u4, u5} L α β f t)) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u1} L α γ (Function.comp.{succ u4, succ u5, succ u1} α β γ g f) t)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.relabel_relabel FirstOrder.Language.Term.relabel_relabelₓ'. -/
@[simp]
theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
(t.relabel f).relabel g = t.relabel (g ∘ f) :=
@@ -154,12 +148,6 @@ theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
· simp [ih]
#align first_order.language.term.relabel_relabel FirstOrder.Language.Term.relabel_relabel
-/- warning: first_order.language.term.relabel_comp_relabel -> FirstOrder.Language.Term.relabel_comp_relabel is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (f : α -> β) (g : β -> γ), Eq.{max (succ (max u1 u3)) (succ (max u1 u5))} ((FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u1, u2, u5} L γ)) (Function.comp.{succ (max u1 u3), succ (max u1 u4), succ (max u1 u5)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u1, u2, u4} L β) (FirstOrder.Language.Term.{u1, u2, u5} L γ) (FirstOrder.Language.Term.relabel.{u1, u2, u4, u5} L β γ g) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u4} L α β f)) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u5} L α γ (Function.comp.{succ u3, succ u4, succ u5} α β γ g f))
-but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (f : α -> β) (g : β -> γ), Eq.{max (max (succ u2) (succ u4)) (succ u1)} ((FirstOrder.Language.Term.{u2, u3, u4} L α) -> (FirstOrder.Language.Term.{u2, u3, u1} L γ)) (Function.comp.{max (succ u2) (succ u4), max (succ u5) (succ u2), max (succ u2) (succ u1)} (FirstOrder.Language.Term.{u2, u3, u4} L α) (FirstOrder.Language.Term.{u2, u3, u5} L β) (FirstOrder.Language.Term.{u2, u3, u1} L γ) (FirstOrder.Language.Term.relabel.{u2, u3, u5, u1} L β γ g) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u5} L α β f)) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u1} L α γ (Function.comp.{succ u4, succ u5, succ u1} α β γ g f))
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.relabel_comp_relabel FirstOrder.Language.Term.relabel_comp_relabelₓ'. -/
@[simp]
theorem relabel_comp_relabel (f : α → β) (g : β → γ) :
(Term.relabel g ∘ Term.relabel f : L.term α → L.term γ) = Term.relabel (g ∘ f) :=
@@ -271,24 +259,12 @@ def constantsVarsEquivLeft : L[[γ]].term (Sum α β) ≃ L.term (Sum (Sum γ α
#align first_order.language.term.constants_vars_equiv_left FirstOrder.Language.Term.constantsVarsEquivLeft
-/
-/- warning: first_order.language.term.constants_vars_equiv_left_apply -> FirstOrder.Language.Term.constantsVarsEquivLeft_apply is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)), Eq.{succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (coeFn.{max 1 (max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))) (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4)), max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))} (Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (fun (_x : Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) => (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) -> (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (Equiv.hasCoeToFun.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ) t) (FirstOrder.Language.Term.relabel.{u1, u2, max u5 u3 u4, max (max u5 u3) u4} L (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (coeFn.{max 1 (max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)) (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4)), max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)} (Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (fun (_x : Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) => (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) -> (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.hasCoeToFun.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.symm.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Equiv.sumAssoc.{u5, u3, u4} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ t))
-but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (succ u2) (succ u1)) (succ (max u5 u4)), max (succ u2) (succ (max u5 u4 u1))} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (fun (_x : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ) t) (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max (max u5 u4) u1} L (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (fun (_x : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Equiv.symm.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Equiv.sumAssoc.{u1, u4, u5} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u2, u3, max u4 u5, u1} L (Sum.{u4, u5} α β) γ t))
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_apply (t : L[[γ]].term (Sum α β)) :
constantsVarsEquivLeft t = (constantsToVars t).relabel (Equiv.sumAssoc _ _ _).symm :=
rfl
#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_apply
-/- warning: first_order.language.term.constants_vars_equiv_left_symm_apply -> FirstOrder.Language.Term.constantsVarsEquivLeft_symm_apply is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)), Eq.{succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))) (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4)), max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))} (Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (fun (_x : Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) => (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) -> (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.symm.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ (FirstOrder.Language.Term.relabel.{u1, u2, max (max u5 u3) u4, max u5 u3 u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))) (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4), max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))} (Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (fun (_x : Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) => (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) -> (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.sumAssoc.{u5, u3, u4} γ α β)) t))
-but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (fun (_x : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (Equiv.symm.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u2, u3, max u5 u4, u1} L (Sum.{u4, u5} α β) γ (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max u1 u5 u4} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (succ u5) (succ (max u4 u1)), max (succ (max u5 u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (fun (_x : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Equiv.sumAssoc.{u1, u4, u5} γ α β)) t))
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_symm_apply FirstOrder.Language.Term.constantsVarsEquivLeft_symm_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_symm_apply (t : L.term (Sum (Sum γ α) β)) :
constantsVarsEquivLeft.symm t = varsToConstants (t.relabel (Equiv.sumAssoc _ _ _)) :=
@@ -356,11 +332,6 @@ theorem id_onTerm : ((LHom.id L).onTerm : L.term α → L.term α) = id :=
-/
/- warning: first_order.language.Lhom.comp_on_term clashes with first_order.language.LHom.comp_on_term -> FirstOrder.Language.LHom.comp_onTerm
-warning: first_order.language.Lhom.comp_on_term -> FirstOrder.Language.LHom.comp_onTerm is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {L'' : FirstOrder.Language.{u6, u7}} (φ : FirstOrder.Language.LHom.{u4, u5, u6, u7} L' L'') (ψ : FirstOrder.Language.LHom.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u3)) (succ (max u6 u3))} ((FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u6, u7, u3} L'' α)) (FirstOrder.Language.LHom.onTerm.{u1, u2, u3, u6, u7} L L'' α (FirstOrder.Language.LHom.comp.{u1, u2, u4, u5, u6, u7} L L' L'' φ ψ)) (Function.comp.{succ (max u1 u3), succ (max u4 u3), succ (max u6 u3)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α) (FirstOrder.Language.Term.{u6, u7, u3} L'' α) (FirstOrder.Language.LHom.onTerm.{u4, u5, u3, u6, u7} L' L'' α φ) (FirstOrder.Language.LHom.onTerm.{u1, u2, u3, u4, u5} L L' α ψ))
-but is expected to have type
- forall {L : FirstOrder.Language.{u5, u6}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u7}} {L'' : FirstOrder.Language.{u4, u3}} (φ : FirstOrder.Language.LHom.{u2, u1, u4, u3} L' L'') (ψ : FirstOrder.Language.LHom.{u5, u6, u2, u1} L L'), Eq.{max (max (succ u5) (succ u7)) (succ u4)} ((FirstOrder.Language.Term.{u5, u6, u7} L α) -> (FirstOrder.Language.Term.{u4, u3, u7} L'' α)) (FirstOrder.Language.LHom.onTerm.{u5, u6, u7, u4, u3} L L'' α (FirstOrder.Language.LHom.comp.{u5, u6, u2, u1, u4, u3} L L' L'' φ ψ)) (Function.comp.{max (succ u5) (succ u7), max (succ u2) (succ u7), max (succ u4) (succ u7)} (FirstOrder.Language.Term.{u5, u6, u7} L α) (FirstOrder.Language.Term.{u2, u1, u7} L' α) (FirstOrder.Language.Term.{u4, u3, u7} L'' α) (FirstOrder.Language.LHom.onTerm.{u2, u1, u7, u4, u3} L' L'' α φ) (FirstOrder.Language.LHom.onTerm.{u5, u6, u7, u2, u1} L L' α ψ))
Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.comp_on_term FirstOrder.Language.LHom.comp_onTermₓ'. -/
@[simp]
theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
@@ -375,12 +346,6 @@ theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
end Lhom
-/- warning: first_order.language.Lequiv.on_term -> FirstOrder.Language.Lequiv.onTerm is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u3), succ (max u4 u3)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (succ u1) (succ u3), max (succ u3) (succ u4)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_term FirstOrder.Language.Lequiv.onTermₓ'. -/
/-- Maps a term's symbols along a language equivalence. -/
@[simps]
def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
@@ -656,12 +621,6 @@ def liftAt : ∀ {n : ℕ} (n' m : ℕ), L.BoundedFormula α n → L.BoundedForm
#align first_order.language.bounded_formula.lift_at FirstOrder.Language.BoundedFormula.liftAt
-/
-/- warning: first_order.language.bounded_formula.map_term_rel_map_term_rel -> FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRel is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u5, u6}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u7}} {L'' : FirstOrder.Language.{u8, u9}} (ft : forall (n : Nat), (FirstOrder.Language.Term.{u1, u2, u3} L (Sum.{u3, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin n)))) (fr : forall (n : Nat), (FirstOrder.Language.Relations.{u1, u2} L n) -> (FirstOrder.Language.Relations.{u5, u6} L' n)) (ft' : forall (n : Nat), (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin n))) -> (FirstOrder.Language.Term.{u8, u9, u7} L'' (Sum.{u7, 0} γ (Fin n)))) (fr' : forall (n : Nat), (FirstOrder.Language.Relations.{u5, u6} L' n) -> (FirstOrder.Language.Relations.{u8, u9} L'' n)) {n : Nat} (φ : FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n), Eq.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ n) (FirstOrder.Language.BoundedFormula.mapTermRel.{u5, u6, u4, u7, u8, u9} L' L'' β γ (fun (n : Nat) => n) ft' fr' (fun (_x : Nat) => id.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n (FirstOrder.Language.BoundedFormula.mapTermRel.{u1, u2, u3, u4, u5, u6} L L' α β (fun (n : Nat) => n) ft fr (fun (_x : Nat) => id.{succ (max u5 u6 u4)} (FirstOrder.Language.BoundedFormula.{u5, u6, u4} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n φ)) (FirstOrder.Language.BoundedFormula.mapTermRel.{u1, u2, u3, u7, u8, u9} L L'' α γ (fun {n : Nat} => n) (fun (_x : Nat) => Function.comp.{succ (max u1 u3), succ (max u5 u4), succ (max u8 u7)} (FirstOrder.Language.Term.{u1, u2, u3} L (Sum.{u3, 0} α (Fin _x))) (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin _x))) (FirstOrder.Language.Term.{u8, u9, u7} L'' (Sum.{u7, 0} γ (Fin _x))) (ft' _x) (ft _x)) (fun (_x : Nat) => Function.comp.{succ u2, succ u6, succ u9} (FirstOrder.Language.Relations.{u1, u2} L _x) (FirstOrder.Language.Relations.{u5, u6} L' _x) (FirstOrder.Language.Relations.{u8, u9} L'' _x) (fr' _x) (fr _x)) (fun (_x : Nat) => id.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n φ)
-but is expected to have type
- forall {L : FirstOrder.Language.{u6, u7}} {L' : FirstOrder.Language.{u3, u2}} {α : Type.{u8}} {β : Type.{u9}} {γ : Type.{u1}} {L'' : FirstOrder.Language.{u5, u4}} (ft : forall (n : Nat), (FirstOrder.Language.Term.{u6, u7, u8} L (Sum.{u8, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin n)))) (fr : forall (n : Nat), (FirstOrder.Language.Relations.{u6, u7} L n) -> (FirstOrder.Language.Relations.{u3, u2} L' n)) (ft' : forall (n : Nat), (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin n))) -> (FirstOrder.Language.Term.{u5, u4, u1} L'' (Sum.{u1, 0} γ (Fin n)))) (fr' : forall (n : Nat), (FirstOrder.Language.Relations.{u3, u2} L' n) -> (FirstOrder.Language.Relations.{u5, u4} L'' n)) {n : Nat} (φ : FirstOrder.Language.BoundedFormula.{u6, u7, u8} L α n), Eq.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ n) (FirstOrder.Language.BoundedFormula.mapTermRel.{u3, u2, u9, u1, u5, u4} L' L'' β γ (fun (n : Nat) => n) ft' fr' (fun (_x : Nat) => id.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n (FirstOrder.Language.BoundedFormula.mapTermRel.{u6, u7, u8, u9, u3, u2} L L' α β (fun (n : Nat) => n) ft fr (fun (_x : Nat) => id.{max (max (succ u9) (succ u2)) (succ u3)} (FirstOrder.Language.BoundedFormula.{u3, u2, u9} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n φ)) (FirstOrder.Language.BoundedFormula.mapTermRel.{u6, u7, u8, u1, u5, u4} L L'' α γ (fun (n : Nat) => n) (fun (_x : Nat) => Function.comp.{max (succ u8) (succ u6), max (succ u9) (succ u3), max (succ u5) (succ u1)} (FirstOrder.Language.Term.{u6, u7, u8} L (Sum.{u8, 0} α (Fin _x))) (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin _x))) (FirstOrder.Language.Term.{u5, u4, u1} L'' (Sum.{u1, 0} γ (Fin _x))) (ft' _x) (ft _x)) (fun (_x : Nat) => Function.comp.{succ u7, succ u2, succ u4} (FirstOrder.Language.Relations.{u6, u7} L _x) (FirstOrder.Language.Relations.{u3, u2} L' _x) (FirstOrder.Language.Relations.{u5, u4} L'' _x) (fr' _x) (fr _x)) (fun (_x : Nat) => id.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n φ)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.map_term_rel_map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRelₓ'. -/
@[simp]
theorem mapTermRel_mapTermRel {L'' : Language}
(ft : ∀ n, L.term (Sum α (Fin n)) → L'.term (Sum β (Fin n)))
@@ -712,9 +671,6 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
#align first_order.language.bounded_formula.relabel_aux FirstOrder.Language.BoundedFormula.relabelAux
-/
-/- warning: first_order.language.bounded_formula.sum_elim_comp_relabel_aux -> FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
{xs : Fin (n + m) → M} :
@@ -727,12 +683,6 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
· simp [bounded_formula.relabel_aux]
#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux
-/- warning: first_order.language.bounded_formula.relabel_aux_sum_inl -> FirstOrder.Language.BoundedFormula.relabelAux_sum_inl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (id.{succ u1} α) (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe k) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (fun (_x : RelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) => (Fin k) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (Fin.natAdd n k)))
-but is expected to have type
- forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))) (Fin.natAdd n k)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inlₓ'. -/
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
relabelAux (Sum.inl : α → Sum α (Fin n)) k = Sum.map id (natAdd n) :=
@@ -1137,12 +1087,6 @@ theorem id_onBoundedFormula :
#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.LHom.id_onBoundedFormula
-/
-/- warning: first_order.language.Lhom.comp_on_bounded_formula -> FirstOrder.Language.LHom.comp_onBoundedFormula is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat} {L'' : FirstOrder.Language.{u6, u7}} (φ : FirstOrder.Language.LHom.{u4, u5, u6, u7} L' L'') (ψ : FirstOrder.Language.LHom.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u2 u3)) (succ (max u6 u7 u3))} ((FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u6, u7, u3} L'' α n)) (FirstOrder.Language.LHom.onBoundedFormula.{u1, u2, u3, u6, u7} L L'' α (FirstOrder.Language.LHom.comp.{u1, u2, u4, u5, u6, u7} L L' L'' φ ψ) n) (Function.comp.{succ (max u1 u2 u3), succ (max u4 u5 u3), succ (max u6 u7 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.BoundedFormula.{u6, u7, u3} L'' α n) (FirstOrder.Language.LHom.onBoundedFormula.{u4, u5, u3, u6, u7} L' L'' α φ n) (FirstOrder.Language.LHom.onBoundedFormula.{u1, u2, u3, u4, u5} L L' α ψ n))
-but is expected to have type
- forall {L : FirstOrder.Language.{u5, u6}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u7}} {n : Nat} {L'' : FirstOrder.Language.{u4, u3}} (φ : FirstOrder.Language.LHom.{u2, u1, u4, u3} L' L'') (ψ : FirstOrder.Language.LHom.{u5, u6, u2, u1} L L'), Eq.{max (max (max (max (succ u5) (succ u7)) (succ u6)) (succ u3)) (succ u4)} ((FirstOrder.Language.BoundedFormula.{u5, u6, u7} L α n) -> (FirstOrder.Language.BoundedFormula.{u4, u3, u7} L'' α n)) (FirstOrder.Language.LHom.onBoundedFormula.{u5, u6, u7, u4, u3} L L'' α (FirstOrder.Language.LHom.comp.{u5, u6, u2, u1, u4, u3} L L' L'' φ ψ) n) (Function.comp.{max (max (succ u5) (succ u6)) (succ u7), max (max (succ u1) (succ u2)) (succ u7), max (max (succ u3) (succ u4)) (succ u7)} (FirstOrder.Language.BoundedFormula.{u5, u6, u7} L α n) (FirstOrder.Language.BoundedFormula.{u2, u1, u7} L' α n) (FirstOrder.Language.BoundedFormula.{u4, u3, u7} L'' α n) (FirstOrder.Language.LHom.onBoundedFormula.{u2, u1, u7, u4, u3} L' L'' α φ n) (FirstOrder.Language.LHom.onBoundedFormula.{u5, u6, u7, u2, u1} L L' α ψ n))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.LHom.comp_onBoundedFormulaₓ'. -/
@[simp]
theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
((φ.comp ψ).onBoundedFormula : L.BoundedFormula α n → L''.BoundedFormula α n) =
@@ -1180,12 +1124,6 @@ def onTheory (g : L →ᴸ L') (T : L.Theory) : L'.Theory :=
#align first_order.language.Lhom.on_Theory FirstOrder.Language.LHom.onTheory
-/
-/- warning: first_order.language.Lhom.mem_on_Theory -> FirstOrder.Language.LHom.mem_onTheory is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} {g : FirstOrder.Language.LHom.{u1, u2, u3, u4} L L'} {T : FirstOrder.Language.Theory.{u1, u2} L} {φ : FirstOrder.Language.Sentence.{u3, u4} L'}, Iff (Membership.Mem.{max u3 u4, max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L') (FirstOrder.Language.Theory.{u3, u4} L') (Set.hasMem.{max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L')) φ (FirstOrder.Language.LHom.onTheory.{u1, u2, u3, u4} L L' g T)) (Exists.{succ (max u1 u2)} (FirstOrder.Language.Sentence.{u1, u2} L) (fun (φ₀ : FirstOrder.Language.Sentence.{u1, u2} L) => And (Membership.Mem.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasMem.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) φ₀ T) (Eq.{succ (max u3 u4)} (FirstOrder.Language.Sentence.{u3, u4} L') (FirstOrder.Language.LHom.onSentence.{u1, u2, u3, u4} L L' g φ₀) φ)))
-but is expected to have type
- forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {g : FirstOrder.Language.LHom.{u3, u4, u2, u1} L L'} {T : FirstOrder.Language.Theory.{u3, u4} L} {φ : FirstOrder.Language.Sentence.{u2, u1} L'}, Iff (Membership.mem.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u2, u1} L') (FirstOrder.Language.Theory.{u2, u1} L') (Set.instMembershipSet.{max u1 u2} (FirstOrder.Language.Sentence.{u2, u1} L')) φ (FirstOrder.Language.LHom.onTheory.{u3, u4, u2, u1} L L' g T)) (Exists.{succ (max u3 u4)} (FirstOrder.Language.Sentence.{u3, u4} L) (fun (φ₀ : FirstOrder.Language.Sentence.{u3, u4} L) => And (Membership.mem.{max u3 u4, max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L) (FirstOrder.Language.Theory.{u3, u4} L) (Set.instMembershipSet.{max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L)) φ₀ T) (Eq.{max (succ u1) (succ u2)} (FirstOrder.Language.Sentence.{u2, u1} L') (FirstOrder.Language.LHom.onSentence.{u3, u4, u2, u1} L L' g φ₀) φ)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.mem_on_Theory FirstOrder.Language.LHom.mem_onTheoryₓ'. -/
@[simp]
theorem mem_onTheory {g : L →ᴸ L'} {T : L.Theory} {φ : L'.Sentence} :
φ ∈ g.onTheory T ↔ ∃ φ₀, φ₀ ∈ T ∧ g.onSentence φ₀ = φ :=
@@ -1196,12 +1134,6 @@ end Lhom
namespace Lequiv
-/- warning: first_order.language.Lequiv.on_bounded_formula -> FirstOrder.Language.LEquiv.onBoundedFormula is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u3) (succ u5)) (succ u4)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.LEquiv.onBoundedFormulaₓ'. -/
/-- Maps a bounded formula's symbols along a language equivalence. -/
@[simps]
def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFormula α n
@@ -1216,59 +1148,29 @@ def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFo
Lhom.id_on_bounded_formula]
#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.LEquiv.onBoundedFormula
-/- warning: first_order.language.Lequiv.on_bounded_formula_symm -> FirstOrder.Language.LEquiv.onBoundedFormula_symm is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max 1 (max (succ (max u4 u5 u3)) (succ (max u1 u2 u3))) (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u4 u5 u3), succ (max u1 u2 u3)} (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)) (Equiv.symm.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.LEquiv.onBoundedFormula.{u1, u2, u3, u4, u5} L L' α n φ)) (FirstOrder.Language.LEquiv.onBoundedFormula.{u4, u5, u3, u1, u2} L' L α n (FirstOrder.Language.Lequiv.symm.{u1, u2, u4, u5} L L' φ))
-but is expected to have type
- forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} {n : Nat} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (Equiv.{max (max (succ u1) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u2, u1, u5} L' α n) (FirstOrder.Language.BoundedFormula.{u3, u4, u5} L α n)) (Equiv.symm.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u3, u4, u5} L α n) (FirstOrder.Language.BoundedFormula.{u2, u1, u5} L' α n) (FirstOrder.Language.LEquiv.onBoundedFormula.{u3, u4, u5, u2, u1} L L' α n φ)) (FirstOrder.Language.LEquiv.onBoundedFormula.{u2, u1, u5, u3, u4} L' L α n (FirstOrder.Language.LEquiv.symm.{u3, u4, u2, u1} L L' φ))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.LEquiv.onBoundedFormula_symmₓ'. -/
theorem onBoundedFormula_symm (φ : L ≃ᴸ L') :
(φ.onBoundedFormula.symm : L'.BoundedFormula α n ≃ L.BoundedFormula α n) =
φ.symm.onBoundedFormula :=
rfl
#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.LEquiv.onBoundedFormula_symm
-/- warning: first_order.language.Lequiv.on_formula -> FirstOrder.Language.LEquiv.onFormula is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u3) (succ u5)) (succ u4)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula FirstOrder.Language.LEquiv.onFormulaₓ'. -/
/-- Maps a formula's symbols along a language equivalence. -/
def onFormula (φ : L ≃ᴸ L') : L.Formula α ≃ L'.Formula α :=
φ.onBoundedFormula
#align first_order.language.Lequiv.on_formula FirstOrder.Language.LEquiv.onFormula
-/- warning: first_order.language.Lequiv.on_formula_apply -> FirstOrder.Language.LEquiv.onFormula_apply is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} ((fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (coeFn.{max 1 (max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))) (succ (max u4 u5 u3)) (succ (max u1 u2 u3)), max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (Equiv.hasCoeToFun.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u1, u2, u3, u4, u5} L L' α (FirstOrder.Language.Lequiv.toLhom.{u1, u2, u4, u5} L L' φ))
-but is expected to have type
- forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (forall (a : FirstOrder.Language.Formula.{u3, u4, u5} L α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) a) (FunLike.coe.{max (max (max (max (succ u3) (succ u4)) (succ u1)) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (Equiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u5) (succ u1)) (succ u2)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.Formula.{u3, u4, u5} L α) (fun (_x : FirstOrder.Language.Formula.{u3, u4, u5} L α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) _x) (Equiv.instFunLikeEquiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u3, u4, u5, u2, u1} L L' α (FirstOrder.Language.LEquiv.toLHom.{u3, u4, u2, u1} L L' φ))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_applyₓ'. -/
@[simp]
theorem onFormula_apply (φ : L ≃ᴸ L') :
(φ.onFormula : L.Formula α → L'.Formula α) = φ.toLhom.onFormula :=
rfl
#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_apply
-/- warning: first_order.language.Lequiv.on_formula_symm -> FirstOrder.Language.LEquiv.onFormula_symm is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max 1 (max (succ (max u4 u5 u3)) (succ (max u1 u2 u3))) (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u4 u5 u3), succ (max u1 u2 u3)} (FirstOrder.Language.Formula.{u4, u5, u3} L' α) (FirstOrder.Language.Formula.{u1, u2, u3} L α)) (Equiv.symm.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (FirstOrder.Language.LEquiv.onFormula.{u4, u5, u3, u1, u2} L' L α (FirstOrder.Language.Lequiv.symm.{u1, u2, u4, u5} L L' φ))
-but is expected to have type
- forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (Equiv.{max (max (succ u1) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5)} (FirstOrder.Language.Formula.{u2, u1, u5} L' α) (FirstOrder.Language.Formula.{u3, u4, u5} L α)) (Equiv.symm.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LEquiv.onFormula.{u2, u1, u5, u3, u4} L' L α (FirstOrder.Language.LEquiv.symm.{u3, u4, u2, u1} L L' φ))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symmₓ'. -/
@[simp]
theorem onFormula_symm (φ : L ≃ᴸ L') :
(φ.onFormula.symm : L'.Formula α ≃ L.Formula α) = φ.symm.onFormula :=
rfl
#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symm
-/- warning: first_order.language.Lequiv.on_sentence -> FirstOrder.Language.LEquiv.onSentence is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, (FirstOrder.Language.Lequiv.{u1, u2, u3, u4} L L') -> (Equiv.{succ (max u1 u2), succ (max u3 u4)} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Sentence.{u3, u4} L'))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, (FirstOrder.Language.LEquiv.{u1, u2, u3, u4} L L') -> (Equiv.{max (succ u1) (succ u2), max (succ u4) (succ u3)} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Sentence.{u3, u4} L'))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_sentence FirstOrder.Language.LEquiv.onSentenceₓ'. -/
/-- Maps a sentence's symbols along a language equivalence. -/
@[simps]
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence :=
@@ -1452,12 +1354,6 @@ variable {L} {α}
open Set
-/- warning: first_order.language.monotone_distinct_constants_theory -> FirstOrder.Language.monotone_distinctConstantsTheory is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}}, Monotone.{u3, max (max u1 u3) u2} (Set.{u3} α) (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (PartialOrder.toPreorder.{u3} (Set.{u3} α) (CompleteSemilatticeInf.toPartialOrder.{u3} (Set.{u3} α) (CompleteLattice.toCompleteSemilatticeInf.{u3} (Set.{u3} α) (Order.Coframe.toCompleteLattice.{u3} (Set.{u3} α) (CompleteDistribLattice.toCoframe.{u3} (Set.{u3} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u3} (Set.{u3} α) (Set.completeBooleanAlgebra.{u3} α))))))) (PartialOrder.toPreorder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteSemilatticeInf.toPartialOrder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteLattice.toCompleteSemilatticeInf.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Order.Coframe.toCompleteLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteDistribLattice.toCoframe.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteBooleanAlgebra.toCompleteDistribLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.completeBooleanAlgebra.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))))))))) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}}, Monotone.{u3, max (max u1 u3) u2} (Set.{u3} α) (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (PartialOrder.toPreorder.{u3} (Set.{u3} α) (CompleteSemilatticeInf.toPartialOrder.{u3} (Set.{u3} α) (CompleteLattice.toCompleteSemilatticeInf.{u3} (Set.{u3} α) (Order.Coframe.toCompleteLattice.{u3} (Set.{u3} α) (CompleteDistribLattice.toCoframe.{u3} (Set.{u3} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u3} (Set.{u3} α) (Set.instCompleteBooleanAlgebraSet.{u3} α))))))) (PartialOrder.toPreorder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteSemilatticeInf.toPartialOrder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteLattice.toCompleteSemilatticeInf.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Order.Coframe.toCompleteLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteDistribLattice.toCoframe.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteBooleanAlgebra.toCompleteDistribLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instCompleteBooleanAlgebraSet.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))))))))) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.monotone_distinct_constants_theory FirstOrder.Language.monotone_distinctConstantsTheoryₓ'. -/
theorem monotone_distinctConstantsTheory :
Monotone (L.distinctConstantsTheory : Set α → L[[α]].Theory) := fun s t st =>
image_subset _ (inter_subset_inter_left _ (prod_mono st st))
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -713,10 +713,7 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
-/
/- warning: first_order.language.bounded_formula.sum_elim_comp_relabel_aux -> FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe n) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin n) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe m) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin m) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.natAdd n m))))
-but is expected to have type
- forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.Hom.Lattice._hyg.494 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (InfHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Lattice.toInf.{0} (Fin n) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n)))) (Lattice.toInf.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))))) (LatticeHomClass.toInfHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n))) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (OrderHomClass.toLatticeHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin n) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))) (Fin.natAdd n m))))
+<too large>
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -275,7 +275,7 @@ def constantsVarsEquivLeft : L[[γ]].term (Sum α β) ≃ L.term (Sum (Sum γ α
lean 3 declaration is
forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)), Eq.{succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (coeFn.{max 1 (max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))) (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4)), max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))} (Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (fun (_x : Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) => (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) -> (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (Equiv.hasCoeToFun.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ) t) (FirstOrder.Language.Term.relabel.{u1, u2, max u5 u3 u4, max (max u5 u3) u4} L (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (coeFn.{max 1 (max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)) (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4)), max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)} (Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (fun (_x : Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) => (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) -> (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.hasCoeToFun.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.symm.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Equiv.sumAssoc.{u5, u3, u4} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ t))
but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (succ u2) (succ u1)) (succ (max u5 u4)), max (succ u2) (succ (max u5 u4 u1))} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (fun (_x : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ) t) (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max (max u5 u4) u1} L (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (fun (_x : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Equiv.symm.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Equiv.sumAssoc.{u1, u4, u5} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u2, u3, max u4 u5, u1} L (Sum.{u4, u5} α β) γ t))
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (succ u2) (succ u1)) (succ (max u5 u4)), max (succ u2) (succ (max u5 u4 u1))} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (fun (_x : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ) t) (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max (max u5 u4) u1} L (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (fun (_x : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Equiv.symm.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Equiv.sumAssoc.{u1, u4, u5} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u2, u3, max u4 u5, u1} L (Sum.{u4, u5} α β) γ t))
Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_apply (t : L[[γ]].term (Sum α β)) :
@@ -287,7 +287,7 @@ theorem constantsVarsEquivLeft_apply (t : L[[γ]].term (Sum α β)) :
lean 3 declaration is
forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)), Eq.{succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))) (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4)), max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))} (Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (fun (_x : Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) => (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) -> (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.symm.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ (FirstOrder.Language.Term.relabel.{u1, u2, max (max u5 u3) u4, max u5 u3 u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))) (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4), max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))} (Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (fun (_x : Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) => (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) -> (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.sumAssoc.{u5, u3, u4} γ α β)) t))
but is expected to have type
- forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (fun (_x : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (Equiv.symm.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u2, u3, max u5 u4, u1} L (Sum.{u4, u5} α β) γ (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max u1 u5 u4} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (succ u5) (succ (max u4 u1)), max (succ (max u5 u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (fun (_x : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Equiv.sumAssoc.{u1, u4, u5} γ α β)) t))
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (fun (_x : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (Equiv.symm.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u2, u3, max u5 u4, u1} L (Sum.{u4, u5} α β) γ (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max u1 u5 u4} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (succ u5) (succ (max u4 u1)), max (succ (max u5 u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (fun (_x : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Equiv.sumAssoc.{u1, u4, u5} γ α β)) t))
Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_symm_apply FirstOrder.Language.Term.constantsVarsEquivLeft_symm_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_symm_apply (t : L.term (Sum (Sum γ α) β)) :
@@ -716,7 +716,7 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
lean 3 declaration is
forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe n) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin n) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe m) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin m) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.natAdd n m))))
but is expected to have type
- forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.Hom.Lattice._hyg.494 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (InfHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Lattice.toInf.{0} (Fin n) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n)))) (Lattice.toInf.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))))) (LatticeHomClass.toInfHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n))) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (OrderHomClass.toLatticeHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin n) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n m))))
+ forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.Hom.Lattice._hyg.494 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (InfHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Lattice.toInf.{0} (Fin n) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n)))) (Lattice.toInf.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))))) (LatticeHomClass.toInfHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n))) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (OrderHomClass.toLatticeHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin n) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))) (Fin.natAdd n m))))
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
@@ -734,7 +734,7 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
lean 3 declaration is
forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (id.{succ u1} α) (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe k) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (fun (_x : RelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) => (Fin k) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (Fin.natAdd n k)))
but is expected to have type
- forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n k)))
+ forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.869 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.684 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.682 x._@.Mathlib.Order.Hom.Basic._hyg.684) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.699 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.697 x._@.Mathlib.Order.Hom.Basic._hyg.699))) (Fin.natAdd n k)))
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inlₓ'. -/
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
@@ -1246,7 +1246,7 @@ def onFormula (φ : L ≃ᴸ L') : L.Formula α ≃ L'.Formula α :=
lean 3 declaration is
forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} ((fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (coeFn.{max 1 (max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))) (succ (max u4 u5 u3)) (succ (max u1 u2 u3)), max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (Equiv.hasCoeToFun.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u1, u2, u3, u4, u5} L L' α (FirstOrder.Language.Lequiv.toLhom.{u1, u2, u4, u5} L L' φ))
but is expected to have type
- forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (forall (a : FirstOrder.Language.Formula.{u3, u4, u5} L α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) a) (FunLike.coe.{max (max (max (max (succ u3) (succ u4)) (succ u1)) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (Equiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u5) (succ u1)) (succ u2)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.Formula.{u3, u4, u5} L α) (fun (_x : FirstOrder.Language.Formula.{u3, u4, u5} L α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) _x) (Equiv.instFunLikeEquiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u3, u4, u5, u2, u1} L L' α (FirstOrder.Language.LEquiv.toLHom.{u3, u4, u2, u1} L L' φ))
+ forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (forall (a : FirstOrder.Language.Formula.{u3, u4, u5} L α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) a) (FunLike.coe.{max (max (max (max (succ u3) (succ u4)) (succ u1)) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (Equiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u5) (succ u1)) (succ u2)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.Formula.{u3, u4, u5} L α) (fun (_x : FirstOrder.Language.Formula.{u3, u4, u5} L α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.812 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) _x) (Equiv.instFunLikeEquiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u3, u4, u5, u2, u1} L L' α (FirstOrder.Language.LEquiv.toLHom.{u3, u4, u2, u1} L L' φ))
Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_applyₓ'. -/
@[simp]
theorem onFormula_apply (φ : L ≃ᴸ L') :
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -100,7 +100,7 @@ open Finset
@[simp]
def varFinset [DecidableEq α] : L.term α → Finset α
| var i => {i}
- | func f ts => univ.bunionᵢ fun i => (ts i).varFinset
+ | func f ts => univ.biUnion fun i => (ts i).varFinset
#align first_order.language.term.var_finset FirstOrder.Language.Term.varFinset
-/
@@ -110,7 +110,7 @@ def varFinset [DecidableEq α] : L.term α → Finset α
def varFinsetLeft [DecidableEq α] : L.term (Sum α β) → Finset α
| var (Sum.inl i) => {i}
| var (Sum.inr i) => ∅
- | func f ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
+ | func f ts => univ.biUnion fun i => (ts i).varFinsetLeft
#align first_order.language.term.var_finset_left FirstOrder.Language.Term.varFinsetLeft
-/
@@ -179,7 +179,7 @@ def relabelEquiv (g : α ≃ β) : L.term α ≃ L.term β :=
def restrictVar [DecidableEq α] : ∀ (t : L.term α) (f : t.varFinset → β), L.term β
| var a, f => var (f ⟨a, mem_singleton_self a⟩)
| func F ts, f =>
- func F fun i => (ts i).restrictVar (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
+ func F fun i => (ts i).restrictVar (f ∘ Set.inclusion (subset_biUnion_of_mem _ (mem_univ i)))
#align first_order.language.term.restrict_var FirstOrder.Language.Term.restrictVar
-/
@@ -191,7 +191,7 @@ def restrictVarLeft [DecidableEq α] {γ : Type _} :
| var (Sum.inr a), f => var (Sum.inr a)
| func F ts, f =>
func F fun i =>
- (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
+ (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_biUnion_of_mem _ (mem_univ i)))
#align first_order.language.term.restrict_var_left FirstOrder.Language.Term.restrictVarLeft
-/
@@ -541,7 +541,7 @@ open Finset
def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset α
| n, falsum => ∅
| n, equal t₁ t₂ => t₁.varFinsetLeft ∪ t₂.varFinsetLeft
- | n, Rel R ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
+ | n, Rel R ts => univ.biUnion fun i => (ts i).varFinsetLeft
| n, imp f₁ f₂ => f₁.freeVarFinset ∪ f₂.freeVarFinset
| n, all f => f.freeVarFinset
#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinset
@@ -609,7 +609,7 @@ def restrictFreeVar [DecidableEq α] :
equal (t₁.restrictVarLeft (f ∘ Set.inclusion (subset_union_left _ _)))
(t₂.restrictVarLeft (f ∘ Set.inclusion (subset_union_right _ _)))
| n, Rel R ts, f =>
- rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
+ rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_biUnion_of_mem _ (mem_univ i)))
| n, imp φ₁ φ₂, f =>
(φ₁.restrictFreeVar (f ∘ Set.inclusion (subset_union_left _ _))).imp
(φ₂.restrictFreeVar (f ∘ Set.inclusion (subset_union_right _ _)))
@@ -1473,8 +1473,8 @@ theorem directed_distinctConstantsTheory :
#align first_order.language.directed_distinct_constants_theory FirstOrder.Language.directed_distinctConstantsTheory
-/
-#print FirstOrder.Language.distinctConstantsTheory_eq_unionᵢ /-
-theorem distinctConstantsTheory_eq_unionᵢ (s : Set α) :
+#print FirstOrder.Language.distinctConstantsTheory_eq_iUnion /-
+theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
L.distinctConstantsTheory s =
⋃ t : Finset s,
L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s)) :=
@@ -1491,7 +1491,7 @@ theorem distinctConstantsTheory_eq_unionᵢ (s : Set α) :
· simp
· rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
exact ⟨is, js⟩
-#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_unionᵢ
+#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_iUnion
-/
end Cardinality
mathlib commit https://github.com/leanprover-community/mathlib/commit/8b8ba04e2f326f3f7cf24ad129beda58531ada61
@@ -716,7 +716,7 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
lean 3 declaration is
forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe n) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin n) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe m) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin m) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.natAdd n m))))
but is expected to have type
- forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n m))))
+ forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.Hom.Lattice._hyg.494 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (InfHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Lattice.toInf.{0} (Fin n) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n)))) (Lattice.toInf.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))))) (LatticeHomClass.toInfHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (DistribLattice.toLattice.{0} (Fin n) (instDistribLattice.{0} (Fin n) (Fin.instLinearOrderFin n))) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (OrderHomClass.toLatticeHomClass.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin n) (DistribLattice.toLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instDistribLattice.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Fin.instLinearOrderFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n m))))
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -76,8 +76,8 @@ open FirstOrder
open Structure Fin
-/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: var {} -/
-/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: func {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: var {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: func {} -/
#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
@@ -395,7 +395,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
-/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: falsum {} -/
+/- ./././Mathport/Syntax/Translate/Command.lean:369:30: infer kinds are unsupported in Lean 4: falsum {} -/
#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -716,7 +716,7 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
lean 3 declaration is
forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe n) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin n) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe m) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin m) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.natAdd n m))))
but is expected to have type
- forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.toEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.castAdd n m))))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.toEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.natAdd n m)))))
+ forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin n) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin m) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n m))))
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
@@ -734,7 +734,7 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
lean 3 declaration is
forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (id.{succ u1} α) (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe k) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (fun (_x : RelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) => (Fin k) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (Fin.natAdd n k)))
but is expected to have type
- forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (RelEmbedding.toEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.natAdd n k))))
+ forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Order.RelIso.Basic._hyg.867 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (RelHomClass.toFunLike.{0, 0, 0} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin k) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (RelEmbedding.instRelHomClassRelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697))) (Fin.natAdd n k)))
Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inlₓ'. -/
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/730c6d4cab72b9d84fcfb9e95e8796e9cd8f40ba
@@ -438,7 +438,7 @@ variable {L} {α} {n : ℕ}
/-- Applies a relation to terms as a bounded formula. -/
def Relations.boundedFormula {l : ℕ} (R : L.Relations n) (ts : Fin n → L.term (Sum α (Fin l))) :
L.BoundedFormula α l :=
- BoundedFormula.Rel R ts
+ BoundedFormula.rel R ts
#align first_order.language.relations.bounded_formula FirstOrder.Language.Relations.boundedFormula
-/
@@ -554,7 +554,7 @@ def castLE : ∀ {m n : ℕ} (h : m ≤ n), L.BoundedFormula α m → L.BoundedF
| m, n, h, falsum => falsum
| m, n, h, equal t₁ t₂ =>
equal (t₁.relabel (Sum.map id (Fin.castLE h))) (t₂.relabel (Sum.map id (Fin.castLE h)))
- | m, n, h, Rel R ts => Rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
+ | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
| m, n, h, imp f₁ f₂ => (f₁.castLE h).imp (f₂.castLE h)
| m, n, h, all f => (f.castLE (add_le_add_right h 1)).all
#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLE
@@ -609,7 +609,7 @@ def restrictFreeVar [DecidableEq α] :
equal (t₁.restrictVarLeft (f ∘ Set.inclusion (subset_union_left _ _)))
(t₂.restrictVarLeft (f ∘ Set.inclusion (subset_union_right _ _)))
| n, Rel R ts, f =>
- Rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
+ rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
| n, imp φ₁ φ₂, f =>
(φ₁.restrictFreeVar (f ∘ Set.inclusion (subset_union_left _ _))).imp
(φ₂.restrictFreeVar (f ∘ Set.inclusion (subset_union_right _ _)))
@@ -641,7 +641,7 @@ def mapTermRel {g : ℕ → ℕ} (ft : ∀ n, L.term (Sum α (Fin n)) → L'.ter
∀ {n}, L.BoundedFormula α n → L'.BoundedFormula β (g n)
| n, falsum => falsum
| n, equal t₁ t₂ => equal (ft _ t₁) (ft _ t₂)
- | n, Rel R ts => Rel (fr _ R) fun i => ft _ (ts i)
+ | n, Rel R ts => rel (fr _ R) fun i => ft _ (ts i)
| n, imp φ₁ φ₂ => φ₁.mapTermRel.imp φ₂.mapTermRel
| n, all φ => (h n φ.mapTermRel).all
#align first_order.language.bounded_formula.map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel
@@ -880,19 +880,19 @@ theorem not_ex_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsAtomic :=
#print FirstOrder.Language.BoundedFormula.IsAtomic.relabel /-
theorem IsAtomic.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsAtomic)
(f : α → Sum β (Fin n)) : (φ.relabel f).IsAtomic :=
- IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
+ IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.relabel FirstOrder.Language.BoundedFormula.IsAtomic.relabel
-/
#print FirstOrder.Language.BoundedFormula.IsAtomic.liftAt /-
theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic :=
- IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
+ IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.lift_at FirstOrder.Language.BoundedFormula.IsAtomic.liftAt
-/
#print FirstOrder.Language.BoundedFormula.IsAtomic.castLE /-
theorem IsAtomic.castLE {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
- IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
+ IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLE
-/
@@ -1092,7 +1092,7 @@ theorem isPrenex_toPrenexImp {φ ψ : L.BoundedFormula α n} (hφ : IsPrenex φ)
def toPrenex : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
| _, falsum => ⊥
| _, equal t₁ t₂ => t₁.bdEqual t₂
- | _, Rel R ts => Rel R ts
+ | _, Rel R ts => rel R ts
| _, imp f₁ f₂ => f₁.toPrenex.toPrenexImp f₂.toPrenex
| _, all f => f.toPrenex.all
#align first_order.language.bounded_formula.to_prenex FirstOrder.Language.BoundedFormula.toPrenex
@@ -1101,7 +1101,7 @@ def toPrenex : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
#print FirstOrder.Language.BoundedFormula.toPrenex_isPrenex /-
theorem toPrenex_isPrenex (φ : L.BoundedFormula α n) : φ.toPrenex.IsPrenex :=
BoundedFormula.recOn φ (fun _ => isQF_bot.IsPrenex) (fun _ _ _ => (IsAtomic.equal _ _).IsPrenex)
- (fun _ _ _ _ => (IsAtomic.Rel _ _).IsPrenex) (fun _ _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
+ (fun _ _ _ _ => (IsAtomic.rel _ _).IsPrenex) (fun _ _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
fun _ _ => IsPrenex.all
#align first_order.language.bounded_formula.to_prenex_is_prenex FirstOrder.Language.BoundedFormula.toPrenex_isPrenex
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/cd8fafa2fac98e1a67097e8a91ad9901cfde48af
@@ -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.syntax
-! leanprover-community/mathlib commit d565b3df44619c1498326936be16f1a935df0728
+! leanprover-community/mathlib commit ce38d86c0b2d427ce208c3cee3159cb421d2b3c4
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.ModelTheory.LanguageMap
/-!
# Basics on First-Order Syntax
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
This file defines first-order terms, formulas, sentences, and theories in a style inspired by the
[Flypitch project](https://flypitch.github.io/).
mathlib commit https://github.com/leanprover-community/mathlib/commit/17ad94b4953419f3e3ce3e77da3239c62d1d09f0
@@ -75,12 +75,14 @@ open Structure Fin
/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: var {} -/
/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: func {} -/
+#print FirstOrder.Language.Term /-
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
inductive Term (α : Type u') : Type max u u'
| var : ∀ a : α, term
| func : ∀ {l : ℕ} (f : L.Functions l) (ts : Fin l → term), term
#align first_order.language.term FirstOrder.Language.Term
+-/
export Term ()
@@ -90,25 +92,16 @@ namespace Term
open Finset
-/- warning: first_order.language.term.var_finset -> FirstOrder.Language.Term.varFinset is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} [_inst_4 : DecidableEq.{succ u3} α], (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (Finset.{u3} α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} [_inst_4 : DecidableEq.{succ u2} α], (FirstOrder.Language.Term.{u1, u3, u2} L α) -> (Finset.{u2} α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.var_finset FirstOrder.Language.Term.varFinsetₓ'. -/
+#print FirstOrder.Language.Term.varFinset /-
/-- The `finset` of variables used in a given term. -/
@[simp]
def varFinset [DecidableEq α] : L.term α → Finset α
| var i => {i}
| func f ts => univ.bunionᵢ fun i => (ts i).varFinset
#align first_order.language.term.var_finset FirstOrder.Language.Term.varFinset
+-/
-/- warning: first_order.language.term.var_finset_left -> FirstOrder.Language.Term.varFinsetLeft is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} [_inst_4 : DecidableEq.{succ u3} α], (FirstOrder.Language.Term.{u1, u2, max u3 u4} L (Sum.{u3, u4} α β)) -> (Finset.{u3} α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {β : Type.{u4}} [_inst_4 : DecidableEq.{succ u2} α], (FirstOrder.Language.Term.{u1, u3, max u2 u4} L (Sum.{u2, u4} α β)) -> (Finset.{u2} α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.var_finset_left FirstOrder.Language.Term.varFinsetLeftₓ'. -/
+#print FirstOrder.Language.Term.varFinsetLeft /-
/-- The `finset` of variables from the left side of a sum used in a given term. -/
@[simp]
def varFinsetLeft [DecidableEq α] : L.term (Sum α β) → Finset α
@@ -116,32 +109,39 @@ def varFinsetLeft [DecidableEq α] : L.term (Sum α β) → Finset α
| var (Sum.inr i) => ∅
| func f ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
#align first_order.language.term.var_finset_left FirstOrder.Language.Term.varFinsetLeft
+-/
-/- warning: first_order.language.term.relabel -> FirstOrder.Language.Term.relabel is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}}, (α -> β) -> (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u1, u2, u4} L β)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {β : Type.{u4}}, (α -> β) -> (FirstOrder.Language.Term.{u1, u3, u2} L α) -> (FirstOrder.Language.Term.{u1, u3, u4} L β)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.relabel FirstOrder.Language.Term.relabelₓ'. -/
+#print FirstOrder.Language.Term.relabel /-
/-- Relabels a term's variables along a particular function. -/
@[simp]
def relabel (g : α → β) : L.term α → L.term β
| var i => var (g i)
| func f ts => func f fun i => (ts i).relabel
#align first_order.language.term.relabel FirstOrder.Language.Term.relabel
+-/
+#print FirstOrder.Language.Term.relabel_id /-
theorem relabel_id (t : L.term α) : t.relabel id = t :=
by
induction' t with _ _ _ _ ih
· rfl
· simp [ih]
#align first_order.language.term.relabel_id FirstOrder.Language.Term.relabel_id
+-/
+#print FirstOrder.Language.Term.relabel_id_eq_id /-
@[simp]
theorem relabel_id_eq_id : (Term.relabel id : L.term α → L.term α) = id :=
funext relabel_id
#align first_order.language.term.relabel_id_eq_id FirstOrder.Language.Term.relabel_id_eq_id
+-/
+/- warning: first_order.language.term.relabel_relabel -> FirstOrder.Language.Term.relabel_relabel is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (f : α -> β) (g : β -> γ) (t : FirstOrder.Language.Term.{u1, u2, u3} L α), Eq.{succ (max u1 u5)} (FirstOrder.Language.Term.{u1, u2, u5} L γ) (FirstOrder.Language.Term.relabel.{u1, u2, u4, u5} L β γ g (FirstOrder.Language.Term.relabel.{u1, u2, u3, u4} L α β f t)) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u5} L α γ (Function.comp.{succ u3, succ u4, succ u5} α β γ g f) t)
+but is expected to have type
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (f : α -> β) (g : β -> γ) (t : FirstOrder.Language.Term.{u2, u3, u4} L α), Eq.{max (succ u2) (succ u1)} (FirstOrder.Language.Term.{u2, u3, u1} L γ) (FirstOrder.Language.Term.relabel.{u2, u3, u5, u1} L β γ g (FirstOrder.Language.Term.relabel.{u2, u3, u4, u5} L α β f t)) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u1} L α γ (Function.comp.{succ u4, succ u5, succ u1} α β γ g f) t)
+Case conversion may be inaccurate. Consider using '#align first_order.language.term.relabel_relabel FirstOrder.Language.Term.relabel_relabelₓ'. -/
@[simp]
theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
(t.relabel f).relabel g = t.relabel (g ∘ f) :=
@@ -151,37 +151,36 @@ theorem relabel_relabel (f : α → β) (g : β → γ) (t : L.term α) :
· simp [ih]
#align first_order.language.term.relabel_relabel FirstOrder.Language.Term.relabel_relabel
+/- warning: first_order.language.term.relabel_comp_relabel -> FirstOrder.Language.Term.relabel_comp_relabel is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (f : α -> β) (g : β -> γ), Eq.{max (succ (max u1 u3)) (succ (max u1 u5))} ((FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u1, u2, u5} L γ)) (Function.comp.{succ (max u1 u3), succ (max u1 u4), succ (max u1 u5)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u1, u2, u4} L β) (FirstOrder.Language.Term.{u1, u2, u5} L γ) (FirstOrder.Language.Term.relabel.{u1, u2, u4, u5} L β γ g) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u4} L α β f)) (FirstOrder.Language.Term.relabel.{u1, u2, u3, u5} L α γ (Function.comp.{succ u3, succ u4, succ u5} α β γ g f))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (f : α -> β) (g : β -> γ), Eq.{max (max (succ u2) (succ u4)) (succ u1)} ((FirstOrder.Language.Term.{u2, u3, u4} L α) -> (FirstOrder.Language.Term.{u2, u3, u1} L γ)) (Function.comp.{max (succ u2) (succ u4), max (succ u5) (succ u2), max (succ u2) (succ u1)} (FirstOrder.Language.Term.{u2, u3, u4} L α) (FirstOrder.Language.Term.{u2, u3, u5} L β) (FirstOrder.Language.Term.{u2, u3, u1} L γ) (FirstOrder.Language.Term.relabel.{u2, u3, u5, u1} L β γ g) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u5} L α β f)) (FirstOrder.Language.Term.relabel.{u2, u3, u4, u1} L α γ (Function.comp.{succ u4, succ u5, succ u1} α β γ g f))
+Case conversion may be inaccurate. Consider using '#align first_order.language.term.relabel_comp_relabel FirstOrder.Language.Term.relabel_comp_relabelₓ'. -/
@[simp]
theorem relabel_comp_relabel (f : α → β) (g : β → γ) :
(Term.relabel g ∘ Term.relabel f : L.term α → L.term γ) = Term.relabel (g ∘ f) :=
funext (relabel_relabel f g)
#align first_order.language.term.relabel_comp_relabel FirstOrder.Language.Term.relabel_comp_relabel
+#print FirstOrder.Language.Term.relabelEquiv /-
/-- Relabels a term's variables along a bijection. -/
@[simps]
def relabelEquiv (g : α ≃ β) : L.term α ≃ L.term β :=
⟨relabel g, relabel g.symm, fun t => by simp, fun t => by simp⟩
#align first_order.language.term.relabel_equiv FirstOrder.Language.Term.relabelEquiv
+-/
-/- warning: first_order.language.term.restrict_var -> FirstOrder.Language.Term.restrictVar is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} [_inst_4 : DecidableEq.{succ u3} α] (t : FirstOrder.Language.Term.{u1, u2, u3} L α), ((coeSort.{succ u3, succ (succ u3)} (Finset.{u3} α) Type.{u3} (Finset.hasCoeToSort.{u3} α) (FirstOrder.Language.Term.varFinset.{u1, u2, u3} L α (fun (a : α) (b : α) => _inst_4 a b) t)) -> β) -> (FirstOrder.Language.Term.{u1, u2, u4} L β)
-but is expected to have type
- PUnit.{max (max (max (succ (succ u1)) (succ (succ u2))) (succ (succ u3))) (succ (succ u4))}
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.restrict_var FirstOrder.Language.Term.restrictVarₓ'. -/
+#print FirstOrder.Language.Term.restrictVar /-
/-- Restricts a term to use only a set of the given variables. -/
def restrictVar [DecidableEq α] : ∀ (t : L.term α) (f : t.varFinset → β), L.term β
| var a, f => var (f ⟨a, mem_singleton_self a⟩)
| func F ts, f =>
func F fun i => (ts i).restrictVar (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
#align first_order.language.term.restrict_var FirstOrder.Language.Term.restrictVar
+-/
-/- warning: first_order.language.term.restrict_var_left -> FirstOrder.Language.Term.restrictVarLeft is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} [_inst_4 : DecidableEq.{succ u3} α] {γ : Type.{u5}} (t : FirstOrder.Language.Term.{u1, u2, max u3 u5} L (Sum.{u3, u5} α γ)), ((coeSort.{succ u3, succ (succ u3)} (Finset.{u3} α) Type.{u3} (Finset.hasCoeToSort.{u3} α) (FirstOrder.Language.Term.varFinsetLeft.{u1, u2, u3, u5} L α γ (fun (a : α) (b : α) => _inst_4 a b) t)) -> β) -> (FirstOrder.Language.Term.{u1, u2, max u4 u5} L (Sum.{u4, u5} β γ))
-but is expected to have type
- PUnit.{max (max (max (max (succ (succ u1)) (succ (succ u2))) (succ (succ u3))) (succ (succ u4))) (succ (succ u5))}
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.restrict_var_left FirstOrder.Language.Term.restrictVarLeftₓ'. -/
+#print FirstOrder.Language.Term.restrictVarLeft /-
/-- Restricts a term to use only a set of the given variables on the left side of a sum. -/
def restrictVarLeft [DecidableEq α] {γ : Type _} :
∀ (t : L.term (Sum α γ)) (f : t.varFinsetLeft → β), L.term (Sum β γ)
@@ -191,32 +190,34 @@ def restrictVarLeft [DecidableEq α] {γ : Type _} :
func F fun i =>
(ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
#align first_order.language.term.restrict_var_left FirstOrder.Language.Term.restrictVarLeft
+-/
end Term
+#print FirstOrder.Language.Constants.term /-
/-- The representation of a constant symbol as a term. -/
def Constants.term (c : L.Constants) : L.term α :=
func c default
#align first_order.language.constants.term FirstOrder.Language.Constants.term
+-/
+#print FirstOrder.Language.Functions.apply₁ /-
/-- Applies a unary function to a term. -/
def Functions.apply₁ (f : L.Functions 1) (t : L.term α) : L.term α :=
func f ![t]
#align first_order.language.functions.apply₁ FirstOrder.Language.Functions.apply₁
+-/
+#print FirstOrder.Language.Functions.apply₂ /-
/-- Applies a binary function to two terms. -/
def Functions.apply₂ (f : L.Functions 2) (t₁ t₂ : L.term α) : L.term α :=
func f ![t₁, t₂]
#align first_order.language.functions.apply₂ FirstOrder.Language.Functions.apply₂
+-/
namespace Term
-/- warning: first_order.language.term.constants_to_vars -> FirstOrder.Language.Term.constantsToVars is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {γ : Type.{u4}}, (FirstOrder.Language.Term.{max u1 u4, u2, u3} (FirstOrder.Language.withConstants.{u1, u2, u4} L γ) α) -> (FirstOrder.Language.Term.{u1, u2, max u4 u3} L (Sum.{u4, u3} γ α))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u4}} {α : Type.{u2}} {γ : Type.{u3}}, (FirstOrder.Language.Term.{max u1 u3, u4, u2} (FirstOrder.Language.withConstants.{u1, u4, u3} L γ) α) -> (FirstOrder.Language.Term.{u1, u4, max u3 u2} L (Sum.{u3, u2} γ α))
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_to_vars FirstOrder.Language.Term.constantsToVarsₓ'. -/
+#print FirstOrder.Language.Term.constantsToVars /-
/-- Sends a term with constants to a term with extra variables. -/
@[simp]
def constantsToVars : L[[γ]].term α → L.term (Sum γ α)
@@ -226,13 +227,9 @@ def constantsToVars : L[[γ]].term α → L.term (Sum γ α)
| @func _ _ (n + 1) f ts =>
Sum.casesOn f (fun f => func f fun i => (ts i).constantsToVars) fun c => isEmptyElim c
#align first_order.language.term.constants_to_vars FirstOrder.Language.Term.constantsToVars
+-/
-/- warning: first_order.language.term.vars_to_constants -> FirstOrder.Language.Term.varsToConstants is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {γ : Type.{u4}}, (FirstOrder.Language.Term.{u1, u2, max u4 u3} L (Sum.{u4, u3} γ α)) -> (FirstOrder.Language.Term.{max u1 u4, u2, u3} (FirstOrder.Language.withConstants.{u1, u2, u4} L γ) α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u4}} {α : Type.{u2}} {γ : Type.{u3}}, (FirstOrder.Language.Term.{u1, u4, max u3 u2} L (Sum.{u3, u2} γ α)) -> (FirstOrder.Language.Term.{max u1 u3, u4, u2} (FirstOrder.Language.withConstants.{u1, u4, u3} L γ) α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.vars_to_constants FirstOrder.Language.Term.varsToConstantsₓ'. -/
+#print FirstOrder.Language.Term.varsToConstants /-
/-- Sends a term with extra variables to a term with constants. -/
@[simp]
def varsToConstants : L.term (Sum γ α) → L[[γ]].term α
@@ -240,7 +237,9 @@ def varsToConstants : L.term (Sum γ α) → L[[γ]].term α
| var (Sum.inl c) => Constants.term (Sum.inr c)
| func f ts => func (Sum.inl f) fun i => (ts i).varsToConstants
#align first_order.language.term.vars_to_constants FirstOrder.Language.Term.varsToConstants
+-/
+#print FirstOrder.Language.Term.constantsVarsEquiv /-
/-- A bijection between terms with constants and terms with extra variables. -/
@[simps]
def constantsVarsEquiv : L[[γ]].term α ≃ L.term (Sum γ α) :=
@@ -260,49 +259,66 @@ def constantsVarsEquiv : L[[γ]].term α ≃ L.term (Sum γ α) :=
· cases x <;> rfl
· cases n <;> · simp [vars_to_constants, constants_to_vars, ih]⟩
#align first_order.language.term.constants_vars_equiv FirstOrder.Language.Term.constantsVarsEquiv
+-/
+#print FirstOrder.Language.Term.constantsVarsEquivLeft /-
/-- A bijection between terms with constants and terms with extra variables. -/
def constantsVarsEquivLeft : L[[γ]].term (Sum α β) ≃ L.term (Sum (Sum γ α) β) :=
constantsVarsEquiv.trans (relabelEquiv (Equiv.sumAssoc _ _ _)).symm
#align first_order.language.term.constants_vars_equiv_left FirstOrder.Language.Term.constantsVarsEquivLeft
+-/
+/- warning: first_order.language.term.constants_vars_equiv_left_apply -> FirstOrder.Language.Term.constantsVarsEquivLeft_apply is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)), Eq.{succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (coeFn.{max 1 (max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))) (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4)), max (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4))} (Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (fun (_x : Equiv.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) => (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) -> (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (Equiv.hasCoeToFun.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ) t) (FirstOrder.Language.Term.relabel.{u1, u2, max u5 u3 u4, max (max u5 u3) u4} L (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (coeFn.{max 1 (max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)) (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4)), max (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4)} (Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (fun (_x : Equiv.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) => (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) -> (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.hasCoeToFun.{max (succ u5) (succ (max u3 u4)), max (succ (max u5 u3)) (succ u4)} (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (Equiv.symm.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (Equiv.sumAssoc.{u5, u3, u4} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ t))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (succ u2) (succ u1)) (succ (max u5 u4)), max (succ u2) (succ (max u5 u4 u1))} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (fun (_x : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) => FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β))) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ) t) (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max (max u5 u4) u1} L (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (fun (_x : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) => Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (Equiv.symm.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (Equiv.sumAssoc.{u1, u4, u5} γ α β))) (FirstOrder.Language.Term.constantsToVars.{u2, u3, max u4 u5, u1} L (Sum.{u4, u5} α β) γ t))
+Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_apply (t : L[[γ]].term (Sum α β)) :
constantsVarsEquivLeft t = (constantsToVars t).relabel (Equiv.sumAssoc _ _ _).symm :=
rfl
#align first_order.language.term.constants_vars_equiv_left_apply FirstOrder.Language.Term.constantsVarsEquivLeft_apply
+/- warning: first_order.language.term.constants_vars_equiv_left_symm_apply -> FirstOrder.Language.Term.constantsVarsEquivLeft_symm_apply is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u5}} (t : FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)), Eq.{succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))) (succ (max (max u1 u5) u3 u4)) (succ (max u1 (max u5 u3) u4)), max (succ (max u1 (max u5 u3) u4)) (succ (max (max u1 u5) u3 u4))} (Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (fun (_x : Equiv.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) => (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) -> (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{succ (max u1 (max u5 u3) u4), succ (max (max u1 u5) u3 u4)} (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β))) (Equiv.symm.{succ (max (max u1 u5) u3 u4), succ (max u1 (max u5 u3) u4)} (FirstOrder.Language.Term.{max u1 u5, u2, max u3 u4} (FirstOrder.Language.withConstants.{u1, u2, u5} L γ) (Sum.{u3, u4} α β)) (FirstOrder.Language.Term.{u1, u2, max (max u5 u3) u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u1, u2, u3, u4, u5} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u1, u2, max u3 u4, u5} L (Sum.{u3, u4} α β) γ (FirstOrder.Language.Term.relabel.{u1, u2, max (max u5 u3) u4, max u5 u3 u4} L (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β)) (coeFn.{max 1 (max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))) (max (succ u5) (succ (max u3 u4))) (succ (max u5 u3)) (succ u4), max (max (succ (max u5 u3)) (succ u4)) (succ u5) (succ (max u3 u4))} (Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (fun (_x : Equiv.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) => (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) -> (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.hasCoeToFun.{max (succ (max u5 u3)) (succ u4), max (succ u5) (succ (max u3 u4))} (Sum.{max u5 u3, u4} (Sum.{u5, u3} γ α) β) (Sum.{u5, max u3 u4} γ (Sum.{u3, u4} α β))) (Equiv.sumAssoc.{u5, u3, u4} γ α β)) t))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u2, u3}} {α : Type.{u4}} {β : Type.{u5}} {γ : Type.{u1}} (t : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)), Eq.{max (max (max (succ u2) (succ u4)) (succ u5)) (succ u1)} ((fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) t) (FunLike.coe.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (Equiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (fun (_x : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) => FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β))) (Equiv.symm.{max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2), max (max (max (succ u1) (succ u5)) (succ u4)) (succ u2)} (FirstOrder.Language.Term.{max u2 u1, u3, max u5 u4} (FirstOrder.Language.withConstants.{u2, u3, u1} L γ) (Sum.{u4, u5} α β)) (FirstOrder.Language.Term.{u2, u3, max u5 u4 u1} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β)) (FirstOrder.Language.Term.constantsVarsEquivLeft.{u2, u3, u4, u5, u1} L α β γ)) t) (FirstOrder.Language.Term.varsToConstants.{u2, u3, max u5 u4, u1} L (Sum.{u4, u5} α β) γ (FirstOrder.Language.Term.relabel.{u2, u3, max (max u5 u4) u1, max u1 u5 u4} L (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) (FunLike.coe.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Equiv.{max (succ u5) (succ (max u4 u1)), max (succ (max u5 u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (fun (_x : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) => Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β)) _x) (Equiv.instFunLikeEquiv.{max (max (succ u5) (succ u4)) (succ u1), max (max (succ u5) (succ u4)) (succ u1)} (Sum.{max u4 u1, u5} (Sum.{u1, u4} γ α) β) (Sum.{u1, max u5 u4} γ (Sum.{u4, u5} α β))) (Equiv.sumAssoc.{u1, u4, u5} γ α β)) t))
+Case conversion may be inaccurate. Consider using '#align first_order.language.term.constants_vars_equiv_left_symm_apply FirstOrder.Language.Term.constantsVarsEquivLeft_symm_applyₓ'. -/
@[simp]
theorem constantsVarsEquivLeft_symm_apply (t : L.term (Sum (Sum γ α) β)) :
constantsVarsEquivLeft.symm t = varsToConstants (t.relabel (Equiv.sumAssoc _ _ _)) :=
rfl
#align first_order.language.term.constants_vars_equiv_left_symm_apply FirstOrder.Language.Term.constantsVarsEquivLeft_symm_apply
+#print FirstOrder.Language.Term.inhabitedOfVar /-
instance inhabitedOfVar [Inhabited α] : Inhabited (L.term α) :=
⟨var default⟩
#align first_order.language.term.inhabited_of_var FirstOrder.Language.Term.inhabitedOfVar
+-/
+#print FirstOrder.Language.Term.inhabitedOfConstant /-
instance inhabitedOfConstant [Inhabited L.Constants] : Inhabited (L.term α) :=
⟨(default : L.Constants).term⟩
#align first_order.language.term.inhabited_of_constant FirstOrder.Language.Term.inhabitedOfConstant
+-/
+#print FirstOrder.Language.Term.liftAt /-
/-- Raises all of the `fin`-indexed variables of a term greater than or equal to `m` by `n'`. -/
def liftAt {n : ℕ} (n' m : ℕ) : L.term (Sum α (Fin n)) → L.term (Sum α (Fin (n + n'))) :=
relabel (Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat n' i)
#align first_order.language.term.lift_at FirstOrder.Language.Term.liftAt
+-/
-/- warning: first_order.language.term.subst -> FirstOrder.Language.Term.subst is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}}, (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (α -> (FirstOrder.Language.Term.{u1, u2, u4} L β)) -> (FirstOrder.Language.Term.{u1, u2, u4} L β)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {β : Type.{u4}}, (FirstOrder.Language.Term.{u1, u3, u2} L α) -> (α -> (FirstOrder.Language.Term.{u1, u3, u4} L β)) -> (FirstOrder.Language.Term.{u1, u3, u4} L β)
-Case conversion may be inaccurate. Consider using '#align first_order.language.term.subst FirstOrder.Language.Term.substₓ'. -/
+#print FirstOrder.Language.Term.subst /-
/-- Substitutes the variables in a given term with terms. -/
@[simp]
def subst : L.term α → (α → L.term β) → L.term β
| var a, tf => tf a
| func f ts, tf => func f fun i => (ts i).subst tf
#align first_order.language.term.subst FirstOrder.Language.Term.subst
+-/
end Term
@@ -311,19 +327,20 @@ scoped[FirstOrder] prefix:arg "&" => FirstOrder.Language.Term.var ∘ Sum.inr
namespace Lhom
-/- warning: first_order.language.Lhom.on_term -> FirstOrder.Language.LHom.onTerm is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LHom.{u1, u2, u4, u5} L L') -> (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u4, u5, u3} L' α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.LHom.{u1, u5, u3, u4} L L') -> (FirstOrder.Language.Term.{u1, u5, u2} L α) -> (FirstOrder.Language.Term.{u3, u4, u2} L' α)
+/- warning: first_order.language.Lhom.on_term clashes with first_order.language.LHom.on_term -> FirstOrder.Language.LHom.onTerm
Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_term FirstOrder.Language.LHom.onTermₓ'. -/
+#print FirstOrder.Language.LHom.onTerm /-
/-- Maps a term's symbols along a language map. -/
@[simp]
def onTerm (φ : L →ᴸ L') : L.term α → L'.term α
| var i => var i
| func f ts => func (φ.onFunction f) fun i => on_term (ts i)
#align first_order.language.Lhom.on_term FirstOrder.Language.LHom.onTerm
+-/
+/- warning: first_order.language.Lhom.id_on_term clashes with first_order.language.LHom.id_on_term -> FirstOrder.Language.LHom.id_onTerm
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.id_on_term FirstOrder.Language.LHom.id_onTermₓ'. -/
+#print FirstOrder.Language.LHom.id_onTerm /-
@[simp]
theorem id_onTerm : ((LHom.id L).onTerm : L.term α → L.term α) = id :=
by
@@ -333,7 +350,15 @@ theorem id_onTerm : ((LHom.id L).onTerm : L.term α → L.term α) = id :=
· simp_rw [on_term, ih]
rfl
#align first_order.language.Lhom.id_on_term FirstOrder.Language.LHom.id_onTerm
+-/
+/- warning: first_order.language.Lhom.comp_on_term clashes with first_order.language.LHom.comp_on_term -> FirstOrder.Language.LHom.comp_onTerm
+warning: first_order.language.Lhom.comp_on_term -> FirstOrder.Language.LHom.comp_onTerm is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {L'' : FirstOrder.Language.{u6, u7}} (φ : FirstOrder.Language.LHom.{u4, u5, u6, u7} L' L'') (ψ : FirstOrder.Language.LHom.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u3)) (succ (max u6 u3))} ((FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u6, u7, u3} L'' α)) (FirstOrder.Language.LHom.onTerm.{u1, u2, u3, u6, u7} L L'' α (FirstOrder.Language.LHom.comp.{u1, u2, u4, u5, u6, u7} L L' L'' φ ψ)) (Function.comp.{succ (max u1 u3), succ (max u4 u3), succ (max u6 u3)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α) (FirstOrder.Language.Term.{u6, u7, u3} L'' α) (FirstOrder.Language.LHom.onTerm.{u4, u5, u3, u6, u7} L' L'' α φ) (FirstOrder.Language.LHom.onTerm.{u1, u2, u3, u4, u5} L L' α ψ))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u5, u6}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u7}} {L'' : FirstOrder.Language.{u4, u3}} (φ : FirstOrder.Language.LHom.{u2, u1, u4, u3} L' L'') (ψ : FirstOrder.Language.LHom.{u5, u6, u2, u1} L L'), Eq.{max (max (succ u5) (succ u7)) (succ u4)} ((FirstOrder.Language.Term.{u5, u6, u7} L α) -> (FirstOrder.Language.Term.{u4, u3, u7} L'' α)) (FirstOrder.Language.LHom.onTerm.{u5, u6, u7, u4, u3} L L'' α (FirstOrder.Language.LHom.comp.{u5, u6, u2, u1, u4, u3} L L' L'' φ ψ)) (Function.comp.{max (succ u5) (succ u7), max (succ u2) (succ u7), max (succ u4) (succ u7)} (FirstOrder.Language.Term.{u5, u6, u7} L α) (FirstOrder.Language.Term.{u2, u1, u7} L' α) (FirstOrder.Language.Term.{u4, u3, u7} L'' α) (FirstOrder.Language.LHom.onTerm.{u2, u1, u7, u4, u3} L' L'' α φ) (FirstOrder.Language.LHom.onTerm.{u5, u6, u7, u2, u1} L L' α ψ))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.comp_on_term FirstOrder.Language.LHom.comp_onTermₓ'. -/
@[simp]
theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
((φ.comp ψ).onTerm : L.term α → L''.term α) = φ.onTerm ∘ ψ.onTerm :=
@@ -347,6 +372,12 @@ theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
end Lhom
+/- warning: first_order.language.Lequiv.on_term -> FirstOrder.Language.Lequiv.onTerm is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u3), succ (max u4 u3)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (succ u1) (succ u3), max (succ u3) (succ u4)} (FirstOrder.Language.Term.{u1, u2, u3} L α) (FirstOrder.Language.Term.{u4, u5, u3} L' α))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_term FirstOrder.Language.Lequiv.onTermₓ'. -/
/-- Maps a term's symbols along a language equivalence. -/
@[simps]
def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
@@ -362,6 +393,7 @@ def Lequiv.onTerm (φ : L ≃ᴸ L') : L.term α ≃ L'.term α
variable (L) (α)
/- ./././Mathport/Syntax/Translate/Command.lean:364:30: infer kinds are unsupported in Lean 4: falsum {} -/
+#print FirstOrder.Language.BoundedFormula /-
/-- `bounded_formula α n` is the type of formulas with free variables indexed by `α` and up to `n`
additional free variables. -/
inductive BoundedFormula : ℕ → Type max u v u'
@@ -371,69 +403,92 @@ inductive BoundedFormula : ℕ → Type max u v u'
| imp {n} (f₁ f₂ : bounded_formula n) : bounded_formula n
| all {n} (f : bounded_formula (n + 1)) : bounded_formula n
#align first_order.language.bounded_formula FirstOrder.Language.BoundedFormula
+-/
+#print FirstOrder.Language.Formula /-
/-- `formula α` is the type of formulas with all free variables indexed by `α`. -/
@[reducible]
def Formula :=
L.BoundedFormula α 0
#align first_order.language.formula FirstOrder.Language.Formula
+-/
+#print FirstOrder.Language.Sentence /-
/-- A sentence is a formula with no free variables. -/
@[reducible]
def Sentence :=
L.Formula Empty
#align first_order.language.sentence FirstOrder.Language.Sentence
+-/
+#print FirstOrder.Language.Theory /-
/-- A theory is a set of sentences. -/
@[reducible]
def Theory :=
Set L.Sentence
#align first_order.language.Theory FirstOrder.Language.Theory
+-/
variable {L} {α} {n : ℕ}
+#print FirstOrder.Language.Relations.boundedFormula /-
/-- Applies a relation to terms as a bounded formula. -/
def Relations.boundedFormula {l : ℕ} (R : L.Relations n) (ts : Fin n → L.term (Sum α (Fin l))) :
L.BoundedFormula α l :=
- BoundedFormula.rel R ts
+ BoundedFormula.Rel R ts
#align first_order.language.relations.bounded_formula FirstOrder.Language.Relations.boundedFormula
+-/
+#print FirstOrder.Language.Relations.boundedFormula₁ /-
/-- Applies a unary relation to a term as a bounded formula. -/
def Relations.boundedFormula₁ (r : L.Relations 1) (t : L.term (Sum α (Fin n))) :
L.BoundedFormula α n :=
r.BoundedFormula ![t]
#align first_order.language.relations.bounded_formula₁ FirstOrder.Language.Relations.boundedFormula₁
+-/
+#print FirstOrder.Language.Relations.boundedFormula₂ /-
/-- Applies a binary relation to two terms as a bounded formula. -/
def Relations.boundedFormula₂ (r : L.Relations 2) (t₁ t₂ : L.term (Sum α (Fin n))) :
L.BoundedFormula α n :=
r.BoundedFormula ![t₁, t₂]
#align first_order.language.relations.bounded_formula₂ FirstOrder.Language.Relations.boundedFormula₂
+-/
+#print FirstOrder.Language.Term.bdEqual /-
/-- The equality of two terms as a bounded formula. -/
def Term.bdEqual (t₁ t₂ : L.term (Sum α (Fin n))) : L.BoundedFormula α n :=
BoundedFormula.equal t₁ t₂
#align first_order.language.term.bd_equal FirstOrder.Language.Term.bdEqual
+-/
+#print FirstOrder.Language.Relations.formula /-
/-- Applies a relation to terms as a bounded formula. -/
def Relations.formula (R : L.Relations n) (ts : Fin n → L.term α) : L.Formula α :=
R.BoundedFormula fun i => (ts i).relabel Sum.inl
#align first_order.language.relations.formula FirstOrder.Language.Relations.formula
+-/
+#print FirstOrder.Language.Relations.formula₁ /-
/-- Applies a unary relation to a term as a formula. -/
def Relations.formula₁ (r : L.Relations 1) (t : L.term α) : L.Formula α :=
r.Formula ![t]
#align first_order.language.relations.formula₁ FirstOrder.Language.Relations.formula₁
+-/
+#print FirstOrder.Language.Relations.formula₂ /-
/-- Applies a binary relation to two terms as a formula. -/
def Relations.formula₂ (r : L.Relations 2) (t₁ t₂ : L.term α) : L.Formula α :=
r.Formula ![t₁, t₂]
#align first_order.language.relations.formula₂ FirstOrder.Language.Relations.formula₂
+-/
+#print FirstOrder.Language.Term.equal /-
/-- The equality of two terms as a first-order formula. -/
def Term.equal (t₁ t₂ : L.term α) : L.Formula α :=
(t₁.relabel Sum.inl).bdEqual (t₂.relabel Sum.inl)
#align first_order.language.term.equal FirstOrder.Language.Term.equal
+-/
namespace BoundedFormula
@@ -443,17 +498,21 @@ instance : Inhabited (L.BoundedFormula α n) :=
instance : Bot (L.BoundedFormula α n) :=
⟨falsum⟩
+#print FirstOrder.Language.BoundedFormula.not /-
/-- The negation of a bounded formula is also a bounded formula. -/
@[match_pattern]
protected def not (φ : L.BoundedFormula α n) : L.BoundedFormula α n :=
φ.imp ⊥
#align first_order.language.bounded_formula.not FirstOrder.Language.BoundedFormula.not
+-/
+#print FirstOrder.Language.BoundedFormula.ex /-
/-- Puts an `∃` quantifier on a bounded formula. -/
@[match_pattern]
protected def ex (φ : L.BoundedFormula α (n + 1)) : L.BoundedFormula α n :=
φ.Not.all.Not
#align first_order.language.bounded_formula.ex FirstOrder.Language.BoundedFormula.ex
+-/
instance : Top (L.BoundedFormula α n) :=
⟨BoundedFormula.not ⊥⟩
@@ -464,19 +523,16 @@ instance : Inf (L.BoundedFormula α n) :=
instance : Sup (L.BoundedFormula α n) :=
⟨fun f g => f.Not.imp g⟩
+#print FirstOrder.Language.BoundedFormula.iff /-
/-- The biimplication between two bounded formulas. -/
protected def iff (φ ψ : L.BoundedFormula α n) :=
φ.imp ψ ⊓ ψ.imp φ
#align first_order.language.bounded_formula.iff FirstOrder.Language.BoundedFormula.iff
+-/
open Finset
-/- warning: first_order.language.bounded_formula.free_var_finset -> FirstOrder.Language.BoundedFormula.freeVarFinset is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} [_inst_4 : DecidableEq.{succ u3} α] {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (Finset.{u3} α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} [_inst_4 : DecidableEq.{succ u2} α] {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (Finset.{u2} α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinsetₓ'. -/
+#print FirstOrder.Language.BoundedFormula.freeVarFinset /-
/-- The `finset` of variables used in a given formula. -/
@[simp]
def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset α
@@ -486,26 +542,24 @@ def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset
| n, imp f₁ f₂ => f₁.freeVarFinset ∪ f₂.freeVarFinset
| n, all f => f.freeVarFinset
#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinset
+-/
-/- warning: first_order.language.bounded_formula.cast_le -> FirstOrder.Language.BoundedFormula.castLe is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {m : Nat} {n : Nat}, (LE.le.{0} Nat Nat.hasLe m n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α m) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {m : Nat} {n : Nat}, (LE.le.{0} Nat Nat.hasLe m n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α m) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLeₓ'. -/
+#print FirstOrder.Language.BoundedFormula.castLE /-
/-- Casts `L.bounded_formula α m` as `L.bounded_formula α n`, where `m ≤ n`. -/
@[simp]
-def castLe : ∀ {m n : ℕ} (h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
+def castLE : ∀ {m n : ℕ} (h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
| m, n, h, falsum => falsum
| m, n, h, equal t₁ t₂ =>
equal (t₁.relabel (Sum.map id (Fin.castLE h))) (t₂.relabel (Sum.map id (Fin.castLE h)))
- | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
+ | m, n, h, Rel R ts => Rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
| m, n, h, imp f₁ f₂ => (f₁.castLE h).imp (f₂.castLE h)
| m, n, h, all f => (f.castLE (add_le_add_right h 1)).all
-#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLe
+#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLE
+-/
+#print FirstOrder.Language.BoundedFormula.castLE_rfl /-
@[simp]
-theorem castLe_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h = φ :=
+theorem castLE_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h = φ :=
by
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
· rfl
@@ -513,10 +567,12 @@ theorem castLe_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h
· simp [Fin.castLE_of_eq]
· simp [Fin.castLE_of_eq, ih1, ih2]
· simp [Fin.castLE_of_eq, ih3]
-#align first_order.language.bounded_formula.cast_le_rfl FirstOrder.Language.BoundedFormula.castLe_rfl
+#align first_order.language.bounded_formula.cast_le_rfl FirstOrder.Language.BoundedFormula.castLE_rfl
+-/
+#print FirstOrder.Language.BoundedFormula.castLE_castLE /-
@[simp]
-theorem castLe_castLe {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormula α k) :
+theorem castLE_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormula α k) :
(φ.castLE km).castLE mn = φ.castLE (km.trans mn) :=
by
revert m n
@@ -528,22 +584,20 @@ theorem castLe_castLe {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormu
simp
· simp [ih1, ih2]
· simp only [cast_le, ih3]
-#align first_order.language.bounded_formula.cast_le_cast_le FirstOrder.Language.BoundedFormula.castLe_castLe
+#align first_order.language.bounded_formula.cast_le_cast_le FirstOrder.Language.BoundedFormula.castLE_castLE
+-/
+#print FirstOrder.Language.BoundedFormula.castLE_comp_castLE /-
@[simp]
-theorem castLe_comp_castLe {k m n} (km : k ≤ m) (mn : m ≤ n) :
- (BoundedFormula.castLe mn ∘ BoundedFormula.castLe km :
+theorem castLE_comp_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) :
+ (BoundedFormula.castLE mn ∘ BoundedFormula.castLE km :
L.BoundedFormula α k → L.BoundedFormula α n) =
- BoundedFormula.castLe (km.trans mn) :=
- funext (castLe_castLe km mn)
-#align first_order.language.bounded_formula.cast_le_comp_cast_le FirstOrder.Language.BoundedFormula.castLe_comp_castLe
+ BoundedFormula.castLE (km.trans mn) :=
+ funext (castLE_castLE km mn)
+#align first_order.language.bounded_formula.cast_le_comp_cast_le FirstOrder.Language.BoundedFormula.castLE_comp_castLE
+-/
-/- warning: first_order.language.bounded_formula.restrict_free_var -> FirstOrder.Language.BoundedFormula.restrictFreeVar is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {β : Type.{u4}} [_inst_4 : DecidableEq.{succ u3} α] {n : Nat} (φ : FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n), ((coeSort.{succ u3, succ (succ u3)} (Finset.{u3} α) Type.{u3} (Finset.hasCoeToSort.{u3} α) (FirstOrder.Language.BoundedFormula.freeVarFinset.{u1, u2, u3} L α (fun (a : α) (b : α) => _inst_4 a b) n φ)) -> β) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u4} L β n)
-but is expected to have type
- PUnit.{max (max (max (succ (succ u1)) (succ (succ u2))) (succ (succ u3))) (succ (succ u4))}
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.restrict_free_var FirstOrder.Language.BoundedFormula.restrictFreeVarₓ'. -/
+#print FirstOrder.Language.BoundedFormula.restrictFreeVar /-
/-- Restricts a bounded formula to only use a particular set of free variables. -/
def restrictFreeVar [DecidableEq α] :
∀ {n : ℕ} (φ : L.BoundedFormula α n) (f : φ.freeVarFinset → β), L.BoundedFormula β n
@@ -552,43 +606,31 @@ def restrictFreeVar [DecidableEq α] :
equal (t₁.restrictVarLeft (f ∘ Set.inclusion (subset_union_left _ _)))
(t₂.restrictVarLeft (f ∘ Set.inclusion (subset_union_right _ _)))
| n, Rel R ts, f =>
- rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
+ Rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem _ (mem_univ i)))
| n, imp φ₁ φ₂, f =>
(φ₁.restrictFreeVar (f ∘ Set.inclusion (subset_union_left _ _))).imp
(φ₂.restrictFreeVar (f ∘ Set.inclusion (subset_union_right _ _)))
| n, all φ, f => (φ.restrictFreeVar f).all
#align first_order.language.bounded_formula.restrict_free_var FirstOrder.Language.BoundedFormula.restrictFreeVar
+-/
-/- warning: first_order.language.bounded_formula.alls -> FirstOrder.Language.BoundedFormula.alls is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.Formula.{u1, u2, u3} L α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.Formula.{u1, u3, u2} L α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.alls FirstOrder.Language.BoundedFormula.allsₓ'. -/
+#print FirstOrder.Language.BoundedFormula.alls /-
/-- Places universal quantifiers on all extra variables of a bounded formula. -/
def alls : ∀ {n}, L.BoundedFormula α n → L.Formula α
| 0, φ => φ
| n + 1, φ => φ.all.alls
#align first_order.language.bounded_formula.alls FirstOrder.Language.BoundedFormula.alls
+-/
-/- warning: first_order.language.bounded_formula.exs -> FirstOrder.Language.BoundedFormula.exs is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.Formula.{u1, u2, u3} L α)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.Formula.{u1, u3, u2} L α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.exs FirstOrder.Language.BoundedFormula.exsₓ'. -/
+#print FirstOrder.Language.BoundedFormula.exs /-
/-- Places existential quantifiers on all extra variables of a bounded formula. -/
def exs : ∀ {n}, L.BoundedFormula α n → L.Formula α
| 0, φ => φ
| n + 1, φ => φ.ex.exs
#align first_order.language.bounded_formula.exs FirstOrder.Language.BoundedFormula.exs
+-/
-/- warning: first_order.language.bounded_formula.map_term_rel -> FirstOrder.Language.BoundedFormula.mapTermRel is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u5, u6}} {α : Type.{u3}} {β : Type.{u4}} {g : Nat -> Nat}, (forall (n : Nat), (FirstOrder.Language.Term.{u1, u2, u3} L (Sum.{u3, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin (g n))))) -> (forall (n : Nat), (FirstOrder.Language.Relations.{u1, u2} L n) -> (FirstOrder.Language.Relations.{u5, u6} L' n)) -> (forall (n : Nat), (FirstOrder.Language.BoundedFormula.{u5, u6, u4} L' β (g (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) -> (FirstOrder.Language.BoundedFormula.{u5, u6, u4} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (g n) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) -> (forall {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u5, u6, u4} L' β (g n)))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}} {β : Type.{u6}} {g : Nat -> Nat}, (forall (n : Nat), (FirstOrder.Language.Term.{u1, u5, u2} L (Sum.{u2, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u3, u4, u6} L' (Sum.{u6, 0} β (Fin (g n))))) -> (forall (n : Nat), (FirstOrder.Language.Relations.{u1, u5} L n) -> (FirstOrder.Language.Relations.{u3, u4} L' n)) -> (forall (n : Nat), (FirstOrder.Language.BoundedFormula.{u3, u4, u6} L' β (g (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) -> (FirstOrder.Language.BoundedFormula.{u3, u4, u6} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) (g n) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) -> (forall {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u5, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u3, u4, u6} L' β (g n)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.map_term_rel FirstOrder.Language.BoundedFormula.mapTermRelₓ'. -/
+#print FirstOrder.Language.BoundedFormula.mapTermRel /-
/-- Maps bounded formulas along a map of terms and a map of relations. -/
def mapTermRel {g : ℕ → ℕ} (ft : ∀ n, L.term (Sum α (Fin n)) → L'.term (Sum β (Fin (g n))))
(fr : ∀ n, L.Relations n → L'.Relations n)
@@ -596,18 +638,27 @@ def mapTermRel {g : ℕ → ℕ} (ft : ∀ n, L.term (Sum α (Fin n)) → L'.ter
∀ {n}, L.BoundedFormula α n → L'.BoundedFormula β (g n)
| n, falsum => falsum
| n, equal t₁ t₂ => equal (ft _ t₁) (ft _ t₂)
- | n, Rel R ts => rel (fr _ R) fun i => ft _ (ts i)
+ | n, Rel R ts => Rel (fr _ R) fun i => ft _ (ts i)
| n, imp φ₁ φ₂ => φ₁.mapTermRel.imp φ₂.mapTermRel
| n, all φ => (h n φ.mapTermRel).all
#align first_order.language.bounded_formula.map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel
+-/
+#print FirstOrder.Language.BoundedFormula.liftAt /-
/-- Raises all of the `fin`-indexed variables of a formula greater than or equal to `m` by `n'`. -/
def liftAt : ∀ {n : ℕ} (n' m : ℕ), L.BoundedFormula α n → L.BoundedFormula α (n + n') :=
fun n n' m φ =>
φ.mapTermRel (fun k t => t.liftAt n' m) (fun _ => id) fun _ =>
- castLe (by rw [add_assoc, add_comm 1, add_assoc])
+ castLE (by rw [add_assoc, add_comm 1, add_assoc])
#align first_order.language.bounded_formula.lift_at FirstOrder.Language.BoundedFormula.liftAt
+-/
+/- warning: first_order.language.bounded_formula.map_term_rel_map_term_rel -> FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRel is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u5, u6}} {α : Type.{u3}} {β : Type.{u4}} {γ : Type.{u7}} {L'' : FirstOrder.Language.{u8, u9}} (ft : forall (n : Nat), (FirstOrder.Language.Term.{u1, u2, u3} L (Sum.{u3, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin n)))) (fr : forall (n : Nat), (FirstOrder.Language.Relations.{u1, u2} L n) -> (FirstOrder.Language.Relations.{u5, u6} L' n)) (ft' : forall (n : Nat), (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin n))) -> (FirstOrder.Language.Term.{u8, u9, u7} L'' (Sum.{u7, 0} γ (Fin n)))) (fr' : forall (n : Nat), (FirstOrder.Language.Relations.{u5, u6} L' n) -> (FirstOrder.Language.Relations.{u8, u9} L'' n)) {n : Nat} (φ : FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n), Eq.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ n) (FirstOrder.Language.BoundedFormula.mapTermRel.{u5, u6, u4, u7, u8, u9} L' L'' β γ (fun (n : Nat) => n) ft' fr' (fun (_x : Nat) => id.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n (FirstOrder.Language.BoundedFormula.mapTermRel.{u1, u2, u3, u4, u5, u6} L L' α β (fun (n : Nat) => n) ft fr (fun (_x : Nat) => id.{succ (max u5 u6 u4)} (FirstOrder.Language.BoundedFormula.{u5, u6, u4} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n φ)) (FirstOrder.Language.BoundedFormula.mapTermRel.{u1, u2, u3, u7, u8, u9} L L'' α γ (fun {n : Nat} => n) (fun (_x : Nat) => Function.comp.{succ (max u1 u3), succ (max u5 u4), succ (max u8 u7)} (FirstOrder.Language.Term.{u1, u2, u3} L (Sum.{u3, 0} α (Fin _x))) (FirstOrder.Language.Term.{u5, u6, u4} L' (Sum.{u4, 0} β (Fin _x))) (FirstOrder.Language.Term.{u8, u9, u7} L'' (Sum.{u7, 0} γ (Fin _x))) (ft' _x) (ft _x)) (fun (_x : Nat) => Function.comp.{succ u2, succ u6, succ u9} (FirstOrder.Language.Relations.{u1, u2} L _x) (FirstOrder.Language.Relations.{u5, u6} L' _x) (FirstOrder.Language.Relations.{u8, u9} L'' _x) (fr' _x) (fr _x)) (fun (_x : Nat) => id.{succ (max u8 u9 u7)} (FirstOrder.Language.BoundedFormula.{u8, u9, u7} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) _x (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))) n φ)
+but is expected to have type
+ forall {L : FirstOrder.Language.{u6, u7}} {L' : FirstOrder.Language.{u3, u2}} {α : Type.{u8}} {β : Type.{u9}} {γ : Type.{u1}} {L'' : FirstOrder.Language.{u5, u4}} (ft : forall (n : Nat), (FirstOrder.Language.Term.{u6, u7, u8} L (Sum.{u8, 0} α (Fin n))) -> (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin n)))) (fr : forall (n : Nat), (FirstOrder.Language.Relations.{u6, u7} L n) -> (FirstOrder.Language.Relations.{u3, u2} L' n)) (ft' : forall (n : Nat), (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin n))) -> (FirstOrder.Language.Term.{u5, u4, u1} L'' (Sum.{u1, 0} γ (Fin n)))) (fr' : forall (n : Nat), (FirstOrder.Language.Relations.{u3, u2} L' n) -> (FirstOrder.Language.Relations.{u5, u4} L'' n)) {n : Nat} (φ : FirstOrder.Language.BoundedFormula.{u6, u7, u8} L α n), Eq.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ n) (FirstOrder.Language.BoundedFormula.mapTermRel.{u3, u2, u9, u1, u5, u4} L' L'' β γ (fun (n : Nat) => n) ft' fr' (fun (_x : Nat) => id.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n (FirstOrder.Language.BoundedFormula.mapTermRel.{u6, u7, u8, u9, u3, u2} L L' α β (fun (n : Nat) => n) ft fr (fun (_x : Nat) => id.{max (max (succ u9) (succ u2)) (succ u3)} (FirstOrder.Language.BoundedFormula.{u3, u2, u9} L' β (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n φ)) (FirstOrder.Language.BoundedFormula.mapTermRel.{u6, u7, u8, u1, u5, u4} L L'' α γ (fun (n : Nat) => n) (fun (_x : Nat) => Function.comp.{max (succ u8) (succ u6), max (succ u9) (succ u3), max (succ u5) (succ u1)} (FirstOrder.Language.Term.{u6, u7, u8} L (Sum.{u8, 0} α (Fin _x))) (FirstOrder.Language.Term.{u3, u2, u9} L' (Sum.{u9, 0} β (Fin _x))) (FirstOrder.Language.Term.{u5, u4, u1} L'' (Sum.{u1, 0} γ (Fin _x))) (ft' _x) (ft _x)) (fun (_x : Nat) => Function.comp.{succ u7, succ u2, succ u4} (FirstOrder.Language.Relations.{u6, u7} L _x) (FirstOrder.Language.Relations.{u3, u2} L' _x) (FirstOrder.Language.Relations.{u5, u4} L'' _x) (fr' _x) (fr _x)) (fun (_x : Nat) => id.{max (max (succ u1) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u5, u4, u1} L'' γ (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) _x (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))))) n φ)
+Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.map_term_rel_map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRelₓ'. -/
@[simp]
theorem mapTermRel_mapTermRel {L'' : Language}
(ft : ∀ n, L.term (Sum α (Fin n)) → L'.term (Sum β (Fin n)))
@@ -625,6 +676,7 @@ theorem mapTermRel_mapTermRel {L'' : Language}
· simp [map_term_rel, ih3]
#align first_order.language.bounded_formula.map_term_rel_map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel_mapTermRel
+#print FirstOrder.Language.BoundedFormula.mapTermRel_id_id_id /-
@[simp]
theorem mapTermRel_id_id_id {n} (φ : L.BoundedFormula α n) :
(φ.mapTermRel (fun _ => id) (fun _ => id) fun _ => id) = φ :=
@@ -636,7 +688,9 @@ theorem mapTermRel_id_id_id {n} (φ : L.BoundedFormula α n) :
· simp [map_term_rel, ih1, ih2]
· simp [map_term_rel, ih3]
#align first_order.language.bounded_formula.map_term_rel_id_id_id FirstOrder.Language.BoundedFormula.mapTermRel_id_id_id
+-/
+#print FirstOrder.Language.BoundedFormula.mapTermRelEquiv /-
/-- An equivalence of bounded formulas given by an equivalence of terms and an equivalence of
relations. -/
@[simps]
@@ -646,12 +700,21 @@ def mapTermRelEquiv (ft : ∀ n, L.term (Sum α (Fin n)) ≃ L'.term (Sum β (Fi
mapTermRel (fun n => (ft n).symm) (fun n => (fr n).symm) fun _ => id, fun φ => by simp, fun φ =>
by simp⟩
#align first_order.language.bounded_formula.map_term_rel_equiv FirstOrder.Language.BoundedFormula.mapTermRelEquiv
+-/
+#print FirstOrder.Language.BoundedFormula.relabelAux /-
/-- A function to help relabel the variables in bounded formulas. -/
def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β (Fin (n + k)) :=
Sum.map id finSumFinEquiv ∘ Equiv.sumAssoc _ _ _ ∘ Sum.map g id
#align first_order.language.bounded_formula.relabel_aux FirstOrder.Language.BoundedFormula.relabelAux
+-/
+/- warning: first_order.language.bounded_formula.sum_elim_comp_relabel_aux -> FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux is a dubious translation:
+lean 3 declaration is
+ forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe n) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin n) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin n) (Fin.hasLe n)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.castAdd n m)))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) M xs (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe m) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (fun (_x : RelEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) => (Fin m) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (LE.le.{0} (Fin m) (Fin.hasLe m)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n m)))) (Fin.natAdd n m))))
+but is expected to have type
+ forall {M : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} {n : Nat} {m : Nat} {g : α -> (Sum.{u3, 0} β (Fin n))} {v : β -> M} {xs : (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) -> M}, Eq.{max (succ u2) (succ u1)} ((Sum.{u2, 0} α (Fin m)) -> M) (Function.comp.{succ u2, succ u3, succ u1} (Sum.{u2, 0} α (Fin m)) (Sum.{u3, 0} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) M (Sum.elim.{u3, 0, succ u1} β (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M v xs) (FirstOrder.Language.BoundedFormula.relabelAux.{u2, u3} α β n g m)) (Sum.elim.{u2, 0, succ u1} α (Fin m) M (Function.comp.{succ u2, succ u3, succ u1} α (Sum.{u3, 0} β (Fin n)) M (Sum.elim.{u3, 0, succ u1} β (Fin n) M v (Function.comp.{1, 1, succ u1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (fun (_x : Fin n) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin n) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.toEmbedding.{0, 0} (Fin n) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin n) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin n) => LE.le.{0} (Fin n) (instLEFin n) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.castAdd n m))))) g) (Function.comp.{1, 1, succ u1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) M xs (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (fun (_x : Fin m) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin m) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m))) (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)))) (RelEmbedding.toEmbedding.{0, 0} (Fin m) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin m) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin m) => LE.le.{0} (Fin m) (instLEFin m) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n m)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.natAdd n m)))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAuxₓ'. -/
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
{xs : Fin (n + m) → M} :
@@ -664,6 +727,12 @@ theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β
· simp [bounded_formula.relabel_aux]
#align first_order.language.bounded_formula.sum_elim_comp_relabel_aux FirstOrder.Language.BoundedFormula.sum_elim_comp_relabelAux
+/- warning: first_order.language.bounded_formula.relabel_aux_sum_inl -> FirstOrder.Language.BoundedFormula.relabelAux_sum_inl is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (id.{succ u1} α) (coeFn.{1, 1} (OrderEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe k) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (fun (_x : RelEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) => (Fin k) -> (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k))) (RelEmbedding.hasCoeToFun.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (LE.le.{0} (Fin k) (Fin.hasLe k)) (LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)) (Fin.hasLe (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n k)))) (Fin.natAdd n k)))
+but is expected to have type
+ forall {α : Type.{u1}} {n : Nat} (k : Nat), Eq.{succ u1} ((Sum.{u1, 0} α (Fin k)) -> (Sum.{u1, 0} α (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (FirstOrder.Language.BoundedFormula.relabelAux.{u1, u1} α α n (Sum.inl.{u1, 0} α (Fin n)) k) (Sum.map.{u1, 0, u1, 0} α α (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (id.{succ u1} α) (FunLike.coe.{1, 1, 1} (Function.Embedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (fun (_x : Fin k) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : Fin k) => Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) _x) (EmbeddingLike.toFunLike.{1, 1, 1} (Function.Embedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k))) (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (Function.instEmbeddingLikeEmbedding.{1, 1} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)))) (RelEmbedding.toEmbedding.{0, 0} (Fin k) (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.680 : Fin k) (x._@.Mathlib.Order.Hom.Basic._hyg.682 : Fin k) => LE.le.{0} (Fin k) (instLEFin k) x._@.Mathlib.Order.Hom.Basic._hyg.680 x._@.Mathlib.Order.Hom.Basic._hyg.682) (fun (x._@.Mathlib.Order.Hom.Basic._hyg.695 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (x._@.Mathlib.Order.Hom.Basic._hyg.697 : Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) => LE.le.{0} (Fin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) (instLEFin (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n k)) x._@.Mathlib.Order.Hom.Basic._hyg.695 x._@.Mathlib.Order.Hom.Basic._hyg.697) (Fin.natAdd n k))))
+Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inlₓ'. -/
@[simp]
theorem relabelAux_sum_inl (k : ℕ) :
relabelAux (Sum.inl : α → Sum α (Fin n)) k = Sum.map id (natAdd n) :=
@@ -672,39 +741,52 @@ theorem relabelAux_sum_inl (k : ℕ) :
cases x <;> · simp [relabel_aux]
#align first_order.language.bounded_formula.relabel_aux_sum_inl FirstOrder.Language.BoundedFormula.relabelAux_sum_inl
+#print FirstOrder.Language.BoundedFormula.relabel /-
/-- Relabels a bounded formula's variables along a particular function. -/
def relabel (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α k) : L.BoundedFormula β (n + k) :=
φ.mapTermRel (fun _ t => t.relabel (relabelAux g _)) (fun _ => id) fun _ =>
- castLe (ge_of_eq (add_assoc _ _ _))
+ castLE (ge_of_eq (add_assoc _ _ _))
#align first_order.language.bounded_formula.relabel FirstOrder.Language.BoundedFormula.relabel
+-/
+#print FirstOrder.Language.BoundedFormula.relabelEquiv /-
/-- Relabels a bounded formula's free variables along a bijection. -/
def relabelEquiv (g : α ≃ β) {k} : L.BoundedFormula α k ≃ L.BoundedFormula β k :=
mapTermRelEquiv (fun n => Term.relabelEquiv (g.sumCongr (Equiv.refl _))) fun n => Equiv.refl _
#align first_order.language.bounded_formula.relabel_equiv FirstOrder.Language.BoundedFormula.relabelEquiv
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_falsum /-
@[simp]
theorem relabel_falsum (g : α → Sum β (Fin n)) {k} :
(falsum : L.BoundedFormula α k).relabel g = falsum :=
rfl
#align first_order.language.bounded_formula.relabel_falsum FirstOrder.Language.BoundedFormula.relabel_falsum
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_bot /-
@[simp]
theorem relabel_bot (g : α → Sum β (Fin n)) {k} : (⊥ : L.BoundedFormula α k).relabel g = ⊥ :=
rfl
#align first_order.language.bounded_formula.relabel_bot FirstOrder.Language.BoundedFormula.relabel_bot
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_imp /-
@[simp]
theorem relabel_imp (g : α → Sum β (Fin n)) {k} (φ ψ : L.BoundedFormula α k) :
(φ.imp ψ).relabel g = (φ.relabel g).imp (ψ.relabel g) :=
rfl
#align first_order.language.bounded_formula.relabel_imp FirstOrder.Language.BoundedFormula.relabel_imp
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_not /-
@[simp]
theorem relabel_not (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α k) :
φ.Not.relabel g = (φ.relabel g).Not := by simp [bounded_formula.not]
#align first_order.language.bounded_formula.relabel_not FirstOrder.Language.BoundedFormula.relabel_not
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_all /-
@[simp]
theorem relabel_all (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α (k + 1)) :
φ.all.relabel g = (φ.relabel g).all :=
@@ -712,12 +794,16 @@ theorem relabel_all (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α (k
rw [relabel, map_term_rel, relabel]
simp
#align first_order.language.bounded_formula.relabel_all FirstOrder.Language.BoundedFormula.relabel_all
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_ex /-
@[simp]
theorem relabel_ex (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α (k + 1)) :
φ.ex.relabel g = (φ.relabel g).ex := by simp [bounded_formula.ex]
#align first_order.language.bounded_formula.relabel_ex FirstOrder.Language.BoundedFormula.relabel_ex
+-/
+#print FirstOrder.Language.BoundedFormula.relabel_sum_inl /-
@[simp]
theorem relabel_sum_inl (φ : L.BoundedFormula α n) :
(φ.relabel Sum.inl : L.BoundedFormula α (0 + n)) = φ.castLE (ge_of_eq (zero_add n)) :=
@@ -730,25 +816,25 @@ theorem relabel_sum_inl (φ : L.BoundedFormula α n) :
· simp [map_term_rel, ih1, ih2]
· simp [map_term_rel, ih3, cast_le]
#align first_order.language.bounded_formula.relabel_sum_inl FirstOrder.Language.BoundedFormula.relabel_sum_inl
+-/
+#print FirstOrder.Language.BoundedFormula.subst /-
/-- Substitutes the variables in a given formula with terms. -/
@[simp]
def subst {n : ℕ} (φ : L.BoundedFormula α n) (f : α → L.term β) : L.BoundedFormula β n :=
φ.mapTermRel (fun _ t => t.subst (Sum.elim (Term.relabel Sum.inl ∘ f) (var ∘ Sum.inr)))
(fun _ => id) fun _ => id
#align first_order.language.bounded_formula.subst FirstOrder.Language.BoundedFormula.subst
+-/
+#print FirstOrder.Language.BoundedFormula.constantsVarsEquiv /-
/-- A bijection sending formulas with constants to formulas with extra variables. -/
def constantsVarsEquiv : L[[γ]].BoundedFormula α n ≃ L.BoundedFormula (Sum γ α) n :=
mapTermRelEquiv (fun _ => Term.constantsVarsEquivLeft) fun _ => Equiv.sumEmpty _ _
#align first_order.language.bounded_formula.constants_vars_equiv FirstOrder.Language.BoundedFormula.constantsVarsEquiv
+-/
-/- warning: first_order.language.bounded_formula.to_formula -> FirstOrder.Language.BoundedFormula.toFormula is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.Formula.{u1, u2, u3} L (Sum.{u3, 0} α (Fin n)))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.Formula.{u1, u3, u2} L (Sum.{u2, 0} α (Fin n)))
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.to_formula FirstOrder.Language.BoundedFormula.toFormulaₓ'. -/
+#print FirstOrder.Language.BoundedFormula.toFormula /-
/-- Turns the extra variables of a bounded formula into free variables. -/
@[simp]
def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin n))
@@ -760,11 +846,13 @@ def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin
(φ.toFormula.relabel
(Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ finSumFinEquiv.symm))).all
#align first_order.language.bounded_formula.to_formula FirstOrder.Language.BoundedFormula.toFormula
+-/
variable {l : ℕ} {φ ψ : L.BoundedFormula α l} {θ : L.BoundedFormula α l.succ}
variable {v : α → M} {xs : Fin l → M}
+#print FirstOrder.Language.BoundedFormula.IsAtomic /-
/-- An atomic formula is either equality or a relation symbol applied to terms.
Note that `⊥` and `⊤` are not considered atomic in this convention. -/
inductive IsAtomic : L.BoundedFormula α n → Prop
@@ -773,119 +861,157 @@ inductive IsAtomic : L.BoundedFormula α n → Prop
Rel {l : ℕ} (R : L.Relations l) (ts : Fin l → L.term (Sum α (Fin n))) :
IsAtomic (R.BoundedFormula ts)
#align first_order.language.bounded_formula.is_atomic FirstOrder.Language.BoundedFormula.IsAtomic
+-/
+#print FirstOrder.Language.BoundedFormula.not_all_isAtomic /-
theorem not_all_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.all.IsAtomic := fun con => by
cases Con
#align first_order.language.bounded_formula.not_all_is_atomic FirstOrder.Language.BoundedFormula.not_all_isAtomic
+-/
+#print FirstOrder.Language.BoundedFormula.not_ex_isAtomic /-
theorem not_ex_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsAtomic := fun con => by cases Con
#align first_order.language.bounded_formula.not_ex_is_atomic FirstOrder.Language.BoundedFormula.not_ex_isAtomic
+-/
+#print FirstOrder.Language.BoundedFormula.IsAtomic.relabel /-
theorem IsAtomic.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsAtomic)
(f : α → Sum β (Fin n)) : (φ.relabel f).IsAtomic :=
- IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
+ IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
#align first_order.language.bounded_formula.is_atomic.relabel FirstOrder.Language.BoundedFormula.IsAtomic.relabel
+-/
+#print FirstOrder.Language.BoundedFormula.IsAtomic.liftAt /-
theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic :=
- IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
+ IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
#align first_order.language.bounded_formula.is_atomic.lift_at FirstOrder.Language.BoundedFormula.IsAtomic.liftAt
+-/
-theorem IsAtomic.castLe {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
- IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
-#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLe
+#print FirstOrder.Language.BoundedFormula.IsAtomic.castLE /-
+theorem IsAtomic.castLE {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
+ IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.Rel _ _
+#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLE
+-/
+#print FirstOrder.Language.BoundedFormula.IsQF /-
/-- A quantifier-free formula is a formula defined without quantifiers. These are all equivalent
to boolean combinations of atomic formulas. -/
-inductive IsQf : L.BoundedFormula α n → Prop
+inductive IsQF : L.BoundedFormula α n → Prop
| falsum : is_qf falsum
| of_is_atomic {φ} (h : IsAtomic φ) : is_qf φ
| imp {φ₁ φ₂} (h₁ : is_qf φ₁) (h₂ : is_qf φ₂) : is_qf (φ₁.imp φ₂)
-#align first_order.language.bounded_formula.is_qf FirstOrder.Language.BoundedFormula.IsQf
+#align first_order.language.bounded_formula.is_qf FirstOrder.Language.BoundedFormula.IsQF
+-/
-theorem IsAtomic.isQf {φ : L.BoundedFormula α n} : IsAtomic φ → IsQf φ :=
- IsQf.of_is_atomic
-#align first_order.language.bounded_formula.is_atomic.is_qf FirstOrder.Language.BoundedFormula.IsAtomic.isQf
+#print FirstOrder.Language.BoundedFormula.IsAtomic.isQF /-
+theorem IsAtomic.isQF {φ : L.BoundedFormula α n} : IsAtomic φ → IsQF φ :=
+ IsQF.of_isAtomic
+#align first_order.language.bounded_formula.is_atomic.is_qf FirstOrder.Language.BoundedFormula.IsAtomic.isQF
+-/
-theorem isQf_bot : IsQf (⊥ : L.BoundedFormula α n) :=
- IsQf.falsum
-#align first_order.language.bounded_formula.is_qf_bot FirstOrder.Language.BoundedFormula.isQf_bot
+#print FirstOrder.Language.BoundedFormula.isQF_bot /-
+theorem isQF_bot : IsQF (⊥ : L.BoundedFormula α n) :=
+ IsQF.falsum
+#align first_order.language.bounded_formula.is_qf_bot FirstOrder.Language.BoundedFormula.isQF_bot
+-/
-theorem IsQf.not {φ : L.BoundedFormula α n} (h : IsQf φ) : IsQf φ.Not :=
- h.imp isQf_bot
-#align first_order.language.bounded_formula.is_qf.not FirstOrder.Language.BoundedFormula.IsQf.not
+#print FirstOrder.Language.BoundedFormula.IsQF.not /-
+theorem IsQF.not {φ : L.BoundedFormula α n} (h : IsQF φ) : IsQF φ.Not :=
+ h.imp isQF_bot
+#align first_order.language.bounded_formula.is_qf.not FirstOrder.Language.BoundedFormula.IsQF.not
+-/
-theorem IsQf.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsQf) (f : α → Sum β (Fin n)) :
- (φ.relabel f).IsQf :=
- IsQf.rec_on h isQf_bot (fun _ h => (h.relabel f).IsQf) fun _ _ _ _ h1 h2 => h1.imp h2
-#align first_order.language.bounded_formula.is_qf.relabel FirstOrder.Language.BoundedFormula.IsQf.relabel
+#print FirstOrder.Language.BoundedFormula.IsQF.relabel /-
+theorem IsQF.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsQF) (f : α → Sum β (Fin n)) :
+ (φ.relabel f).IsQF :=
+ IsQF.rec_on h isQF_bot (fun _ h => (h.relabel f).IsQF) fun _ _ _ _ h1 h2 => h1.imp h2
+#align first_order.language.bounded_formula.is_qf.relabel FirstOrder.Language.BoundedFormula.IsQF.relabel
+-/
-theorem IsQf.liftAt {k m : ℕ} (h : IsQf φ) : (φ.liftAt k m).IsQf :=
- IsQf.rec_on h isQf_bot (fun _ ih => ih.liftAt.IsQf) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
-#align first_order.language.bounded_formula.is_qf.lift_at FirstOrder.Language.BoundedFormula.IsQf.liftAt
+#print FirstOrder.Language.BoundedFormula.IsQF.liftAt /-
+theorem IsQF.liftAt {k m : ℕ} (h : IsQF φ) : (φ.liftAt k m).IsQF :=
+ IsQF.rec_on h isQF_bot (fun _ ih => ih.liftAt.IsQF) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
+#align first_order.language.bounded_formula.is_qf.lift_at FirstOrder.Language.BoundedFormula.IsQF.liftAt
+-/
-theorem IsQf.castLe {h : l ≤ n} (hφ : IsQf φ) : (φ.castLE h).IsQf :=
- IsQf.rec_on hφ isQf_bot (fun _ ih => ih.castLE.IsQf) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
-#align first_order.language.bounded_formula.is_qf.cast_le FirstOrder.Language.BoundedFormula.IsQf.castLe
+#print FirstOrder.Language.BoundedFormula.IsQF.castLE /-
+theorem IsQF.castLE {h : l ≤ n} (hφ : IsQF φ) : (φ.castLE h).IsQF :=
+ IsQF.rec_on hφ isQF_bot (fun _ ih => ih.castLE.IsQF) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
+#align first_order.language.bounded_formula.is_qf.cast_le FirstOrder.Language.BoundedFormula.IsQF.castLE
+-/
-theorem not_all_isQf (φ : L.BoundedFormula α (n + 1)) : ¬φ.all.IsQf := fun con =>
+#print FirstOrder.Language.BoundedFormula.not_all_isQF /-
+theorem not_all_isQF (φ : L.BoundedFormula α (n + 1)) : ¬φ.all.IsQF := fun con =>
by
cases' Con with _ con
exact φ.not_all_is_atomic Con
-#align first_order.language.bounded_formula.not_all_is_qf FirstOrder.Language.BoundedFormula.not_all_isQf
+#align first_order.language.bounded_formula.not_all_is_qf FirstOrder.Language.BoundedFormula.not_all_isQF
+-/
-theorem not_ex_isQf (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsQf := fun con =>
+#print FirstOrder.Language.BoundedFormula.not_ex_isQF /-
+theorem not_ex_isQF (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsQF := fun con =>
by
cases' Con with _ con _ _ con
· exact φ.not_ex_is_atomic Con
· exact not_all_is_qf _ Con
-#align first_order.language.bounded_formula.not_ex_is_qf FirstOrder.Language.BoundedFormula.not_ex_isQf
+#align first_order.language.bounded_formula.not_ex_is_qf FirstOrder.Language.BoundedFormula.not_ex_isQF
+-/
+#print FirstOrder.Language.BoundedFormula.IsPrenex /-
/-- Indicates that a bounded formula is in prenex normal form - that is, it consists of quantifiers
applied to a quantifier-free formula. -/
inductive IsPrenex : ∀ {n}, L.BoundedFormula α n → Prop
- | of_is_qf {n} {φ : L.BoundedFormula α n} (h : IsQf φ) : is_prenex φ
+ | of_is_qf {n} {φ : L.BoundedFormula α n} (h : IsQF φ) : is_prenex φ
| all {n} {φ : L.BoundedFormula α (n + 1)} (h : is_prenex φ) : is_prenex φ.all
| ex {n} {φ : L.BoundedFormula α (n + 1)} (h : is_prenex φ) : is_prenex φ.ex
#align first_order.language.bounded_formula.is_prenex FirstOrder.Language.BoundedFormula.IsPrenex
+-/
-theorem IsQf.isPrenex {φ : L.BoundedFormula α n} : IsQf φ → IsPrenex φ :=
- IsPrenex.of_is_qf
-#align first_order.language.bounded_formula.is_qf.is_prenex FirstOrder.Language.BoundedFormula.IsQf.isPrenex
+#print FirstOrder.Language.BoundedFormula.IsQF.isPrenex /-
+theorem IsQF.isPrenex {φ : L.BoundedFormula α n} : IsQF φ → IsPrenex φ :=
+ IsPrenex.of_isQF
+#align first_order.language.bounded_formula.is_qf.is_prenex FirstOrder.Language.BoundedFormula.IsQF.isPrenex
+-/
+#print FirstOrder.Language.BoundedFormula.IsAtomic.isPrenex /-
theorem IsAtomic.isPrenex {φ : L.BoundedFormula α n} (h : IsAtomic φ) : IsPrenex φ :=
- h.IsQf.IsPrenex
+ h.IsQF.IsPrenex
#align first_order.language.bounded_formula.is_atomic.is_prenex FirstOrder.Language.BoundedFormula.IsAtomic.isPrenex
+-/
+#print FirstOrder.Language.BoundedFormula.IsPrenex.induction_on_all_not /-
theorem IsPrenex.induction_on_all_not {P : ∀ {n}, L.BoundedFormula α n → Prop}
{φ : L.BoundedFormula α n} (h : IsPrenex φ)
- (hq : ∀ {m} {ψ : L.BoundedFormula α m}, ψ.IsQf → P ψ)
+ (hq : ∀ {m} {ψ : L.BoundedFormula α m}, ψ.IsQF → P ψ)
(ha : ∀ {m} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)
(hn : ∀ {m} {ψ : L.BoundedFormula α m}, P ψ → P ψ.Not) : P φ :=
IsPrenex.rec_on h (fun _ _ => hq) (fun _ _ _ => ha) fun _ _ _ ih => hn (ha (hn ih))
#align first_order.language.bounded_formula.is_prenex.induction_on_all_not FirstOrder.Language.BoundedFormula.IsPrenex.induction_on_all_not
+-/
+#print FirstOrder.Language.BoundedFormula.IsPrenex.relabel /-
theorem IsPrenex.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsPrenex)
(f : α → Sum β (Fin n)) : (φ.relabel f).IsPrenex :=
IsPrenex.rec_on h (fun _ _ h => (h.relabel f).IsPrenex) (fun _ _ _ h => by simp [h.all])
fun _ _ _ h => by simp [h.ex]
#align first_order.language.bounded_formula.is_prenex.relabel FirstOrder.Language.BoundedFormula.IsPrenex.relabel
+-/
-theorem IsPrenex.castLe (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLE h).IsPrenex :=
+#print FirstOrder.Language.BoundedFormula.IsPrenex.castLE /-
+theorem IsPrenex.castLE (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLE h).IsPrenex :=
IsPrenex.rec_on hφ (fun _ _ ih _ _ => ih.castLE.IsPrenex) (fun _ _ _ ih _ _ => ih.all)
fun _ _ _ ih _ _ => ih.ex
-#align first_order.language.bounded_formula.is_prenex.cast_le FirstOrder.Language.BoundedFormula.IsPrenex.castLe
+#align first_order.language.bounded_formula.is_prenex.cast_le FirstOrder.Language.BoundedFormula.IsPrenex.castLE
+-/
+#print FirstOrder.Language.BoundedFormula.IsPrenex.liftAt /-
theorem IsPrenex.liftAt {k m : ℕ} (h : IsPrenex φ) : (φ.liftAt k m).IsPrenex :=
IsPrenex.rec_on h (fun _ _ ih => ih.liftAt.IsPrenex) (fun _ _ _ ih => ih.castLE.all)
fun _ _ _ ih => ih.castLE.ex
#align first_order.language.bounded_formula.is_prenex.lift_at FirstOrder.Language.BoundedFormula.IsPrenex.liftAt
+-/
-/- warning: first_order.language.bounded_formula.to_prenex_imp_right -> FirstOrder.Language.BoundedFormula.toPrenexImpRight is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.to_prenex_imp_right FirstOrder.Language.BoundedFormula.toPrenexImpRightₓ'. -/
+#print FirstOrder.Language.BoundedFormula.toPrenexImpRight /-
/-- An auxiliary operation to `first_order.language.bounded_formula.to_prenex`.
If `φ` is quantifier-free and `ψ` is in prenex normal form, then `φ.to_prenex_imp_right ψ`
is a prenex normal form for `φ.imp ψ`. -/
@@ -894,9 +1020,11 @@ def toPrenexImpRight : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
| n, φ, all ψ => ((φ.liftAt 1 n).toPrenexImpRight ψ).all
| n, φ, ψ => φ.imp ψ
#align first_order.language.bounded_formula.to_prenex_imp_right FirstOrder.Language.BoundedFormula.toPrenexImpRight
+-/
-theorem IsQf.toPrenexImpRight {φ : L.BoundedFormula α n} :
- ∀ {ψ : L.BoundedFormula α n}, IsQf ψ → φ.toPrenexImpRight ψ = φ.imp ψ
+#print FirstOrder.Language.BoundedFormula.IsQF.toPrenexImpRight /-
+theorem IsQF.toPrenexImpRight {φ : L.BoundedFormula α n} :
+ ∀ {ψ : L.BoundedFormula α n}, IsQF ψ → φ.toPrenexImpRight ψ = φ.imp ψ
| _, is_qf.falsum => rfl
| _, is_qf.of_is_atomic (is_atomic.equal _ _) => rfl
| _, is_qf.of_is_atomic (is_atomic.rel _ _) => rfl
@@ -904,9 +1032,11 @@ theorem IsQf.toPrenexImpRight {φ : L.BoundedFormula α n} :
| _, is_qf.imp (is_qf.of_is_atomic (is_atomic.equal _ _)) _ => rfl
| _, is_qf.imp (is_qf.of_is_atomic (is_atomic.rel _ _)) _ => rfl
| _, is_qf.imp (is_qf.imp _ _) _ => rfl
-#align first_order.language.bounded_formula.is_qf.to_prenex_imp_right FirstOrder.Language.BoundedFormula.IsQf.toPrenexImpRight
+#align first_order.language.bounded_formula.is_qf.to_prenex_imp_right FirstOrder.Language.BoundedFormula.IsQF.toPrenexImpRight
+-/
-theorem isPrenex_toPrenexImpRight {φ ψ : L.BoundedFormula α n} (hφ : IsQf φ) (hψ : IsPrenex ψ) :
+#print FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImpRight /-
+theorem isPrenex_toPrenexImpRight {φ ψ : L.BoundedFormula α n} (hφ : IsQF φ) (hψ : IsPrenex ψ) :
IsPrenex (φ.toPrenexImpRight ψ) :=
by
induction' hψ with _ _ hψ _ _ _ ih1 _ _ _ ih2
@@ -915,13 +1045,9 @@ theorem isPrenex_toPrenexImpRight {φ ψ : L.BoundedFormula α n} (hφ : IsQf φ
· exact (ih1 hφ.lift_at).all
· exact (ih2 hφ.lift_at).ex
#align first_order.language.bounded_formula.is_prenex_to_prenex_imp_right FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImpRight
+-/
-/- warning: first_order.language.bounded_formula.to_prenex_imp -> FirstOrder.Language.BoundedFormula.toPrenexImp is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.to_prenex_imp FirstOrder.Language.BoundedFormula.toPrenexImpₓ'. -/
+#print FirstOrder.Language.BoundedFormula.toPrenexImp /-
/-- An auxiliary operation to `first_order.language.bounded_formula.to_prenex`.
If `φ` and `ψ` are in prenex normal form, then `φ.to_prenex_imp ψ`
is a prenex normal form for `φ.imp ψ`. -/
@@ -930,9 +1056,11 @@ def toPrenexImp : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n → L
| n, all φ, ψ => (φ.toPrenexImp (ψ.liftAt 1 n)).ex
| _, φ, ψ => φ.toPrenexImpRight ψ
#align first_order.language.bounded_formula.to_prenex_imp FirstOrder.Language.BoundedFormula.toPrenexImp
+-/
-theorem IsQf.toPrenexImp :
- ∀ {φ ψ : L.BoundedFormula α n}, φ.IsQf → φ.toPrenexImp ψ = φ.toPrenexImpRight ψ
+#print FirstOrder.Language.BoundedFormula.IsQF.toPrenexImp /-
+theorem IsQF.toPrenexImp :
+ ∀ {φ ψ : L.BoundedFormula α n}, φ.IsQF → φ.toPrenexImp ψ = φ.toPrenexImpRight ψ
| _, _, is_qf.falsum => rfl
| _, _, is_qf.of_is_atomic (is_atomic.equal _ _) => rfl
| _, _, is_qf.of_is_atomic (is_atomic.rel _ _) => rfl
@@ -940,8 +1068,10 @@ theorem IsQf.toPrenexImp :
| _, _, is_qf.imp (is_qf.of_is_atomic (is_atomic.equal _ _)) _ => rfl
| _, _, is_qf.imp (is_qf.of_is_atomic (is_atomic.rel _ _)) _ => rfl
| _, _, is_qf.imp (is_qf.imp _ _) _ => rfl
-#align first_order.language.bounded_formula.is_qf.to_prenex_imp FirstOrder.Language.BoundedFormula.IsQf.toPrenexImp
+#align first_order.language.bounded_formula.is_qf.to_prenex_imp FirstOrder.Language.BoundedFormula.IsQF.toPrenexImp
+-/
+#print FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImp /-
theorem isPrenex_toPrenexImp {φ ψ : L.BoundedFormula α n} (hφ : IsPrenex φ) (hψ : IsPrenex ψ) :
IsPrenex (φ.toPrenexImp ψ) :=
by
@@ -951,28 +1081,27 @@ theorem isPrenex_toPrenexImp {φ ψ : L.BoundedFormula α n} (hφ : IsPrenex φ)
· exact (ih1 hψ.lift_at).ex
· exact (ih2 hψ.lift_at).all
#align first_order.language.bounded_formula.is_prenex_to_prenex_imp FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImp
+-/
-/- warning: first_order.language.bounded_formula.to_prenex -> FirstOrder.Language.BoundedFormula.toPrenex is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u3}} {α : Type.{u2}} {n : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n) -> (FirstOrder.Language.BoundedFormula.{u1, u3, u2} L α n)
-Case conversion may be inaccurate. Consider using '#align first_order.language.bounded_formula.to_prenex FirstOrder.Language.BoundedFormula.toPrenexₓ'. -/
+#print FirstOrder.Language.BoundedFormula.toPrenex /-
/-- For any bounded formula `φ`, `φ.to_prenex` is a semantically-equivalent formula in prenex normal
form. -/
def toPrenex : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
| _, falsum => ⊥
| _, equal t₁ t₂ => t₁.bdEqual t₂
- | _, Rel R ts => rel R ts
+ | _, Rel R ts => Rel R ts
| _, imp f₁ f₂ => f₁.toPrenex.toPrenexImp f₂.toPrenex
| _, all f => f.toPrenex.all
#align first_order.language.bounded_formula.to_prenex FirstOrder.Language.BoundedFormula.toPrenex
+-/
+#print FirstOrder.Language.BoundedFormula.toPrenex_isPrenex /-
theorem toPrenex_isPrenex (φ : L.BoundedFormula α n) : φ.toPrenex.IsPrenex :=
- BoundedFormula.recOn φ (fun _ => isQf_bot.IsPrenex) (fun _ _ _ => (IsAtomic.equal _ _).IsPrenex)
- (fun _ _ _ _ => (IsAtomic.rel _ _).IsPrenex) (fun _ _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
+ BoundedFormula.recOn φ (fun _ => isQF_bot.IsPrenex) (fun _ _ _ => (IsAtomic.equal _ _).IsPrenex)
+ (fun _ _ _ _ => (IsAtomic.Rel _ _).IsPrenex) (fun _ _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
fun _ _ => IsPrenex.all
#align first_order.language.bounded_formula.to_prenex_is_prenex FirstOrder.Language.BoundedFormula.toPrenex_isPrenex
+-/
end BoundedFormula
@@ -980,12 +1109,7 @@ namespace Lhom
open BoundedFormula
-/- warning: first_order.language.Lhom.on_bounded_formula -> FirstOrder.Language.LHom.onBoundedFormula is a dubious translation:
-lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LHom.{u1, u2, u4, u5} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α k) -> (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α k))
-but is expected to have type
- forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.LHom.{u1, u5, u3, u4} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u5, u2} L α k) -> (FirstOrder.Language.BoundedFormula.{u3, u4, u2} L' α k))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.LHom.onBoundedFormulaₓ'. -/
+#print FirstOrder.Language.LHom.onBoundedFormula /-
/-- Maps a bounded formula's symbols along a language map. -/
@[simp]
def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k → L'.BoundedFormula α k
@@ -995,7 +1119,9 @@ def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k
| k, imp f₁ f₂ => (on_bounded_formula f₁).imp (on_bounded_formula f₂)
| k, all f => (on_bounded_formula f).all
#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.LHom.onBoundedFormula
+-/
+#print FirstOrder.Language.LHom.id_onBoundedFormula /-
@[simp]
theorem id_onBoundedFormula :
((LHom.id L).onBoundedFormula : L.BoundedFormula α n → L.BoundedFormula α n) = id :=
@@ -1009,7 +1135,14 @@ theorem id_onBoundedFormula :
· rw [on_bounded_formula, ih1, ih2, id.def, id.def, id.def]
· rw [on_bounded_formula, ih3, id.def, id.def]
#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.LHom.id_onBoundedFormula
+-/
+/- warning: first_order.language.Lhom.comp_on_bounded_formula -> FirstOrder.Language.LHom.comp_onBoundedFormula is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat} {L'' : FirstOrder.Language.{u6, u7}} (φ : FirstOrder.Language.LHom.{u4, u5, u6, u7} L' L'') (ψ : FirstOrder.Language.LHom.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u2 u3)) (succ (max u6 u7 u3))} ((FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) -> (FirstOrder.Language.BoundedFormula.{u6, u7, u3} L'' α n)) (FirstOrder.Language.LHom.onBoundedFormula.{u1, u2, u3, u6, u7} L L'' α (FirstOrder.Language.LHom.comp.{u1, u2, u4, u5, u6, u7} L L' L'' φ ψ) n) (Function.comp.{succ (max u1 u2 u3), succ (max u4 u5 u3), succ (max u6 u7 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.BoundedFormula.{u6, u7, u3} L'' α n) (FirstOrder.Language.LHom.onBoundedFormula.{u4, u5, u3, u6, u7} L' L'' α φ n) (FirstOrder.Language.LHom.onBoundedFormula.{u1, u2, u3, u4, u5} L L' α ψ n))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u5, u6}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u7}} {n : Nat} {L'' : FirstOrder.Language.{u4, u3}} (φ : FirstOrder.Language.LHom.{u2, u1, u4, u3} L' L'') (ψ : FirstOrder.Language.LHom.{u5, u6, u2, u1} L L'), Eq.{max (max (max (max (succ u5) (succ u7)) (succ u6)) (succ u3)) (succ u4)} ((FirstOrder.Language.BoundedFormula.{u5, u6, u7} L α n) -> (FirstOrder.Language.BoundedFormula.{u4, u3, u7} L'' α n)) (FirstOrder.Language.LHom.onBoundedFormula.{u5, u6, u7, u4, u3} L L'' α (FirstOrder.Language.LHom.comp.{u5, u6, u2, u1, u4, u3} L L' L'' φ ψ) n) (Function.comp.{max (max (succ u5) (succ u6)) (succ u7), max (max (succ u1) (succ u2)) (succ u7), max (max (succ u3) (succ u4)) (succ u7)} (FirstOrder.Language.BoundedFormula.{u5, u6, u7} L α n) (FirstOrder.Language.BoundedFormula.{u2, u1, u7} L' α n) (FirstOrder.Language.BoundedFormula.{u4, u3, u7} L'' α n) (FirstOrder.Language.LHom.onBoundedFormula.{u2, u1, u7, u4, u3} L' L'' α φ n) (FirstOrder.Language.LHom.onBoundedFormula.{u5, u6, u7, u2, u1} L L' α ψ n))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.LHom.comp_onBoundedFormulaₓ'. -/
@[simp]
theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
((φ.comp ψ).onBoundedFormula : L.BoundedFormula α n → L''.BoundedFormula α n) =
@@ -1026,21 +1159,33 @@ theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →
· simp only [ih3, on_bounded_formula, Function.comp_apply]
#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.LHom.comp_onBoundedFormula
+#print FirstOrder.Language.LHom.onFormula /-
/-- Maps a formula's symbols along a language map. -/
def onFormula (g : L →ᴸ L') : L.Formula α → L'.Formula α :=
g.onBoundedFormula
#align first_order.language.Lhom.on_formula FirstOrder.Language.LHom.onFormula
+-/
+#print FirstOrder.Language.LHom.onSentence /-
/-- Maps a sentence's symbols along a language map. -/
def onSentence (g : L →ᴸ L') : L.Sentence → L'.Sentence :=
g.onFormula
#align first_order.language.Lhom.on_sentence FirstOrder.Language.LHom.onSentence
+-/
+#print FirstOrder.Language.LHom.onTheory /-
/-- Maps a theory's symbols along a language map. -/
def onTheory (g : L →ᴸ L') (T : L.Theory) : L'.Theory :=
g.onSentence '' T
#align first_order.language.Lhom.on_Theory FirstOrder.Language.LHom.onTheory
+-/
+/- warning: first_order.language.Lhom.mem_on_Theory -> FirstOrder.Language.LHom.mem_onTheory is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}} {g : FirstOrder.Language.LHom.{u1, u2, u3, u4} L L'} {T : FirstOrder.Language.Theory.{u1, u2} L} {φ : FirstOrder.Language.Sentence.{u3, u4} L'}, Iff (Membership.Mem.{max u3 u4, max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L') (FirstOrder.Language.Theory.{u3, u4} L') (Set.hasMem.{max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L')) φ (FirstOrder.Language.LHom.onTheory.{u1, u2, u3, u4} L L' g T)) (Exists.{succ (max u1 u2)} (FirstOrder.Language.Sentence.{u1, u2} L) (fun (φ₀ : FirstOrder.Language.Sentence.{u1, u2} L) => And (Membership.Mem.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Theory.{u1, u2} L) (Set.hasMem.{max u1 u2} (FirstOrder.Language.Sentence.{u1, u2} L)) φ₀ T) (Eq.{succ (max u3 u4)} (FirstOrder.Language.Sentence.{u3, u4} L') (FirstOrder.Language.LHom.onSentence.{u1, u2, u3, u4} L L' g φ₀) φ)))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {g : FirstOrder.Language.LHom.{u3, u4, u2, u1} L L'} {T : FirstOrder.Language.Theory.{u3, u4} L} {φ : FirstOrder.Language.Sentence.{u2, u1} L'}, Iff (Membership.mem.{max u1 u2, max u1 u2} (FirstOrder.Language.Sentence.{u2, u1} L') (FirstOrder.Language.Theory.{u2, u1} L') (Set.instMembershipSet.{max u1 u2} (FirstOrder.Language.Sentence.{u2, u1} L')) φ (FirstOrder.Language.LHom.onTheory.{u3, u4, u2, u1} L L' g T)) (Exists.{succ (max u3 u4)} (FirstOrder.Language.Sentence.{u3, u4} L) (fun (φ₀ : FirstOrder.Language.Sentence.{u3, u4} L) => And (Membership.mem.{max u3 u4, max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L) (FirstOrder.Language.Theory.{u3, u4} L) (Set.instMembershipSet.{max u3 u4} (FirstOrder.Language.Sentence.{u3, u4} L)) φ₀ T) (Eq.{max (succ u1) (succ u2)} (FirstOrder.Language.Sentence.{u2, u1} L') (FirstOrder.Language.LHom.onSentence.{u3, u4, u2, u1} L L' g φ₀) φ)))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.mem_on_Theory FirstOrder.Language.LHom.mem_onTheoryₓ'. -/
@[simp]
theorem mem_onTheory {g : L →ᴸ L'} {T : L.Theory} {φ : L'.Sentence} :
φ ∈ g.onTheory T ↔ ∃ φ₀, φ₀ ∈ T ∧ g.onSentence φ₀ = φ :=
@@ -1051,6 +1196,12 @@ end Lhom
namespace Lequiv
+/- warning: first_order.language.Lequiv.on_bounded_formula -> FirstOrder.Language.LEquiv.onBoundedFormula is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u3) (succ u5)) (succ u4)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.LEquiv.onBoundedFormulaₓ'. -/
/-- Maps a bounded formula's symbols along a language equivalence. -/
@[simps]
def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFormula α n
@@ -1063,36 +1214,66 @@ def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFo
right_inv := by
rw [Function.rightInverse_iff_comp, ← Lhom.comp_on_bounded_formula, φ.right_inv,
Lhom.id_on_bounded_formula]
-#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.Lequiv.onBoundedFormula
+#align first_order.language.Lequiv.on_bounded_formula FirstOrder.Language.LEquiv.onBoundedFormula
+/- warning: first_order.language.Lequiv.on_bounded_formula_symm -> FirstOrder.Language.LEquiv.onBoundedFormula_symm is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} {n : Nat} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max 1 (max (succ (max u4 u5 u3)) (succ (max u1 u2 u3))) (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u4 u5 u3), succ (max u1 u2 u3)} (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n)) (Equiv.symm.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α n) (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α n) (FirstOrder.Language.LEquiv.onBoundedFormula.{u1, u2, u3, u4, u5} L L' α n φ)) (FirstOrder.Language.LEquiv.onBoundedFormula.{u4, u5, u3, u1, u2} L' L α n (FirstOrder.Language.Lequiv.symm.{u1, u2, u4, u5} L L' φ))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} {n : Nat} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (Equiv.{max (max (succ u1) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u2, u1, u5} L' α n) (FirstOrder.Language.BoundedFormula.{u3, u4, u5} L α n)) (Equiv.symm.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.BoundedFormula.{u3, u4, u5} L α n) (FirstOrder.Language.BoundedFormula.{u2, u1, u5} L' α n) (FirstOrder.Language.LEquiv.onBoundedFormula.{u3, u4, u5, u2, u1} L L' α n φ)) (FirstOrder.Language.LEquiv.onBoundedFormula.{u2, u1, u5, u3, u4} L' L α n (FirstOrder.Language.LEquiv.symm.{u3, u4, u2, u1} L L' φ))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.LEquiv.onBoundedFormula_symmₓ'. -/
theorem onBoundedFormula_symm (φ : L ≃ᴸ L') :
(φ.onBoundedFormula.symm : L'.BoundedFormula α n ≃ L.BoundedFormula α n) =
φ.symm.onBoundedFormula :=
rfl
-#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.Lequiv.onBoundedFormula_symm
+#align first_order.language.Lequiv.on_bounded_formula_symm FirstOrder.Language.LEquiv.onBoundedFormula_symm
+/- warning: first_order.language.Lequiv.on_formula -> FirstOrder.Language.LEquiv.onFormula is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L') -> (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LEquiv.{u1, u2, u4, u5} L L') -> (Equiv.{max (max (succ u1) (succ u2)) (succ u3), max (max (succ u3) (succ u5)) (succ u4)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula FirstOrder.Language.LEquiv.onFormulaₓ'. -/
/-- Maps a formula's symbols along a language equivalence. -/
def onFormula (φ : L ≃ᴸ L') : L.Formula α ≃ L'.Formula α :=
φ.onBoundedFormula
-#align first_order.language.Lequiv.on_formula FirstOrder.Language.Lequiv.onFormula
+#align first_order.language.Lequiv.on_formula FirstOrder.Language.LEquiv.onFormula
+/- warning: first_order.language.Lequiv.on_formula_apply -> FirstOrder.Language.LEquiv.onFormula_apply is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} ((fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (coeFn.{max 1 (max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))) (succ (max u4 u5 u3)) (succ (max u1 u2 u3)), max (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (fun (_x : Equiv.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) => (FirstOrder.Language.Formula.{u1, u2, u3} L α) -> (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (Equiv.hasCoeToFun.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u1, u2, u3, u4, u5} L L' α (FirstOrder.Language.Lequiv.toLhom.{u1, u2, u4, u5} L L' φ))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (forall (a : FirstOrder.Language.Formula.{u3, u4, u5} L α), (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) a) (FunLike.coe.{max (max (max (max (succ u3) (succ u4)) (succ u1)) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (Equiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u5) (succ u1)) (succ u2)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.Formula.{u3, u4, u5} L α) (fun (_x : FirstOrder.Language.Formula.{u3, u4, u5} L α) => (fun (x._@.Mathlib.Logic.Equiv.Defs._hyg.808 : FirstOrder.Language.Formula.{u3, u4, u5} L α) => FirstOrder.Language.Formula.{u2, u1, u5} L' α) _x) (Equiv.instFunLikeEquiv.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α)) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LHom.onFormula.{u3, u4, u5, u2, u1} L L' α (FirstOrder.Language.LEquiv.toLHom.{u3, u4, u2, u1} L L' φ))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_applyₓ'. -/
@[simp]
theorem onFormula_apply (φ : L ≃ᴸ L') :
(φ.onFormula : L.Formula α → L'.Formula α) = φ.toLhom.onFormula :=
rfl
-#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.Lequiv.onFormula_apply
+#align first_order.language.Lequiv.on_formula_apply FirstOrder.Language.LEquiv.onFormula_apply
+/- warning: first_order.language.Lequiv.on_formula_symm -> FirstOrder.Language.LEquiv.onFormula_symm is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}} (φ : FirstOrder.Language.Lequiv.{u1, u2, u4, u5} L L'), Eq.{max 1 (max (succ (max u4 u5 u3)) (succ (max u1 u2 u3))) (succ (max u1 u2 u3)) (succ (max u4 u5 u3))} (Equiv.{succ (max u4 u5 u3), succ (max u1 u2 u3)} (FirstOrder.Language.Formula.{u4, u5, u3} L' α) (FirstOrder.Language.Formula.{u1, u2, u3} L α)) (Equiv.symm.{succ (max u1 u2 u3), succ (max u4 u5 u3)} (FirstOrder.Language.Formula.{u1, u2, u3} L α) (FirstOrder.Language.Formula.{u4, u5, u3} L' α) (FirstOrder.Language.LEquiv.onFormula.{u1, u2, u3, u4, u5} L L' α φ)) (FirstOrder.Language.LEquiv.onFormula.{u4, u5, u3, u1, u2} L' L α (FirstOrder.Language.Lequiv.symm.{u1, u2, u4, u5} L L' φ))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u3, u4}} {L' : FirstOrder.Language.{u2, u1}} {α : Type.{u5}} (φ : FirstOrder.Language.LEquiv.{u3, u4, u2, u1} L L'), Eq.{max (max (max (max (succ u3) (succ u5)) (succ u4)) (succ u1)) (succ u2)} (Equiv.{max (max (succ u1) (succ u2)) (succ u5), max (max (succ u3) (succ u4)) (succ u5)} (FirstOrder.Language.Formula.{u2, u1, u5} L' α) (FirstOrder.Language.Formula.{u3, u4, u5} L α)) (Equiv.symm.{max (max (succ u3) (succ u4)) (succ u5), max (max (succ u1) (succ u2)) (succ u5)} (FirstOrder.Language.Formula.{u3, u4, u5} L α) (FirstOrder.Language.Formula.{u2, u1, u5} L' α) (FirstOrder.Language.LEquiv.onFormula.{u3, u4, u5, u2, u1} L L' α φ)) (FirstOrder.Language.LEquiv.onFormula.{u2, u1, u5, u3, u4} L' L α (FirstOrder.Language.LEquiv.symm.{u3, u4, u2, u1} L L' φ))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symmₓ'. -/
@[simp]
theorem onFormula_symm (φ : L ≃ᴸ L') :
(φ.onFormula.symm : L'.Formula α ≃ L.Formula α) = φ.symm.onFormula :=
rfl
-#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.Lequiv.onFormula_symm
+#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symm
+/- warning: first_order.language.Lequiv.on_sentence -> FirstOrder.Language.LEquiv.onSentence is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, (FirstOrder.Language.Lequiv.{u1, u2, u3, u4} L L') -> (Equiv.{succ (max u1 u2), succ (max u3 u4)} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Sentence.{u3, u4} L'))
+but is expected to have type
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u3, u4}}, (FirstOrder.Language.LEquiv.{u1, u2, u3, u4} L L') -> (Equiv.{max (succ u1) (succ u2), max (succ u4) (succ u3)} (FirstOrder.Language.Sentence.{u1, u2} L) (FirstOrder.Language.Sentence.{u3, u4} L'))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lequiv.on_sentence FirstOrder.Language.LEquiv.onSentenceₓ'. -/
/-- Maps a sentence's symbols along a language equivalence. -/
@[simps]
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence :=
φ.onFormula
-#align first_order.language.Lequiv.on_sentence FirstOrder.Language.Lequiv.onSentence
+#align first_order.language.Lequiv.on_sentence FirstOrder.Language.LEquiv.onSentence
end Lequiv
@@ -1121,48 +1302,66 @@ scoped[FirstOrder] prefix:110 "∃'" => FirstOrder.Language.BoundedFormula.ex
-- input \ex
namespace Formula
+#print FirstOrder.Language.Formula.relabel /-
/-- Relabels a formula's variables along a particular function. -/
def relabel (g : α → β) : L.Formula α → L.Formula β :=
@BoundedFormula.relabel _ _ _ 0 (Sum.inl ∘ g) 0
#align first_order.language.formula.relabel FirstOrder.Language.Formula.relabel
+-/
+#print FirstOrder.Language.Formula.graph /-
/-- The graph of a function as a first-order formula. -/
def graph (f : L.Functions n) : L.Formula (Fin (n + 1)) :=
equal (var 0) (func f fun i => var i.succ)
#align first_order.language.formula.graph FirstOrder.Language.Formula.graph
+-/
+#print FirstOrder.Language.Formula.not /-
/-- The negation of a formula. -/
protected def not (φ : L.Formula α) : L.Formula α :=
φ.Not
#align first_order.language.formula.not FirstOrder.Language.Formula.not
+-/
+#print FirstOrder.Language.Formula.imp /-
/-- The implication between formulas, as a formula. -/
protected def imp : L.Formula α → L.Formula α → L.Formula α :=
BoundedFormula.imp
#align first_order.language.formula.imp FirstOrder.Language.Formula.imp
+-/
+#print FirstOrder.Language.Formula.iff /-
/-- The biimplication between formulas, as a formula. -/
protected def iff (φ ψ : L.Formula α) : L.Formula α :=
φ.Iff ψ
#align first_order.language.formula.iff FirstOrder.Language.Formula.iff
+-/
+#print FirstOrder.Language.Formula.isAtomic_graph /-
theorem isAtomic_graph (f : L.Functions n) : (graph f).IsAtomic :=
BoundedFormula.IsAtomic.equal _ _
#align first_order.language.formula.is_atomic_graph FirstOrder.Language.Formula.isAtomic_graph
+-/
+#print FirstOrder.Language.Formula.equivSentence /-
/-- A bijection sending formulas to sentences with constants. -/
def equivSentence : L.Formula α ≃ L[[α]].Sentence :=
(BoundedFormula.constantsVarsEquiv.trans (BoundedFormula.relabelEquiv (Equiv.sumEmpty _ _))).symm
#align first_order.language.formula.equiv_sentence FirstOrder.Language.Formula.equivSentence
+-/
+#print FirstOrder.Language.Formula.equivSentence_not /-
theorem equivSentence_not (φ : L.Formula α) : equivSentence φ.Not = (equivSentence φ).Not :=
rfl
#align first_order.language.formula.equiv_sentence_not FirstOrder.Language.Formula.equivSentence_not
+-/
+#print FirstOrder.Language.Formula.equivSentence_inf /-
theorem equivSentence_inf (φ ψ : L.Formula α) :
equivSentence (φ ⊓ ψ) = equivSentence φ ⊓ equivSentence ψ :=
rfl
#align first_order.language.formula.equiv_sentence_inf FirstOrder.Language.Formula.equivSentence_inf
+-/
end Formula
@@ -1170,35 +1369,47 @@ namespace Relations
variable (r : L.Relations 2)
+#print FirstOrder.Language.Relations.reflexive /-
/-- The sentence indicating that a basic relation symbol is reflexive. -/
protected def reflexive : L.Sentence :=
∀'r.boundedFormula₂ (&0) &0
#align first_order.language.relations.reflexive FirstOrder.Language.Relations.reflexive
+-/
+#print FirstOrder.Language.Relations.irreflexive /-
/-- The sentence indicating that a basic relation symbol is irreflexive. -/
protected def irreflexive : L.Sentence :=
∀'∼(r.boundedFormula₂ (&0) &0)
#align first_order.language.relations.irreflexive FirstOrder.Language.Relations.irreflexive
+-/
+#print FirstOrder.Language.Relations.symmetric /-
/-- The sentence indicating that a basic relation symbol is symmetric. -/
protected def symmetric : L.Sentence :=
∀'∀'(r.boundedFormula₂ (&0) &1 ⟹ r.boundedFormula₂ (&1) &0)
#align first_order.language.relations.symmetric FirstOrder.Language.Relations.symmetric
+-/
+#print FirstOrder.Language.Relations.antisymmetric /-
/-- The sentence indicating that a basic relation symbol is antisymmetric. -/
protected def antisymmetric : L.Sentence :=
∀'∀'(r.boundedFormula₂ (&0) &1 ⟹ r.boundedFormula₂ (&1) &0 ⟹ Term.bdEqual (&0) &1)
#align first_order.language.relations.antisymmetric FirstOrder.Language.Relations.antisymmetric
+-/
+#print FirstOrder.Language.Relations.transitive /-
/-- The sentence indicating that a basic relation symbol is transitive. -/
protected def transitive : L.Sentence :=
∀'∀'∀'(r.boundedFormula₂ (&0) &1 ⟹ r.boundedFormula₂ (&1) &2 ⟹ r.boundedFormula₂ (&0) &2)
#align first_order.language.relations.transitive FirstOrder.Language.Relations.transitive
+-/
+#print FirstOrder.Language.Relations.total /-
/-- The sentence indicating that a basic relation symbol is total. -/
protected def total : L.Sentence :=
∀'∀'(r.boundedFormula₂ (&0) &1 ⊔ r.boundedFormula₂ (&1) &0)
#align first_order.language.relations.total FirstOrder.Language.Relations.total
+-/
end Relations
@@ -1206,43 +1417,60 @@ section Cardinality
variable (L)
+#print FirstOrder.Language.Sentence.cardGe /-
/-- A sentence indicating that a structure has `n` distinct elements. -/
protected def Sentence.cardGe (n) : L.Sentence :=
(((((List.finRange n).product (List.finRange n)).filterₓ fun ij : _ × _ => ij.1 ≠ ij.2).map
fun ij : _ × _ => ∼((&ij.1).bdEqual &ij.2)).foldr
(· ⊓ ·) ⊤).exs
#align first_order.language.sentence.card_ge FirstOrder.Language.Sentence.cardGe
+-/
+#print FirstOrder.Language.infiniteTheory /-
/-- A theory indicating that a structure is infinite. -/
def infiniteTheory : L.Theory :=
Set.range (Sentence.cardGe L)
#align first_order.language.infinite_theory FirstOrder.Language.infiniteTheory
+-/
+#print FirstOrder.Language.nonemptyTheory /-
/-- A theory that indicates a structure is nonempty. -/
def nonemptyTheory : L.Theory :=
{Sentence.cardGe L 1}
#align first_order.language.nonempty_theory FirstOrder.Language.nonemptyTheory
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print FirstOrder.Language.distinctConstantsTheory /-
/-- A theory indicating that each of a set of constants is distinct. -/
def distinctConstantsTheory (s : Set α) : L[[α]].Theory :=
(fun ab : α × α => ((L.con ab.1).term.equal (L.con ab.2).term).Not) '' (s ×ˢ s ∩ Set.diagonal αᶜ)
#align first_order.language.distinct_constants_theory FirstOrder.Language.distinctConstantsTheory
+-/
variable {L} {α}
open Set
+/- warning: first_order.language.monotone_distinct_constants_theory -> FirstOrder.Language.monotone_distinctConstantsTheory is a dubious translation:
+lean 3 declaration is
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}}, Monotone.{u3, max (max u1 u3) u2} (Set.{u3} α) (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (PartialOrder.toPreorder.{u3} (Set.{u3} α) (CompleteSemilatticeInf.toPartialOrder.{u3} (Set.{u3} α) (CompleteLattice.toCompleteSemilatticeInf.{u3} (Set.{u3} α) (Order.Coframe.toCompleteLattice.{u3} (Set.{u3} α) (CompleteDistribLattice.toCoframe.{u3} (Set.{u3} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u3} (Set.{u3} α) (Set.completeBooleanAlgebra.{u3} α))))))) (PartialOrder.toPreorder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteSemilatticeInf.toPartialOrder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteLattice.toCompleteSemilatticeInf.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Order.Coframe.toCompleteLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteDistribLattice.toCoframe.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteBooleanAlgebra.toCompleteDistribLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.completeBooleanAlgebra.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))))))))) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α)
+but is expected to have type
+ forall {L : FirstOrder.Language.{u1, u2}} {α : Type.{u3}}, Monotone.{u3, max (max u1 u3) u2} (Set.{u3} α) (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (PartialOrder.toPreorder.{u3} (Set.{u3} α) (CompleteSemilatticeInf.toPartialOrder.{u3} (Set.{u3} α) (CompleteLattice.toCompleteSemilatticeInf.{u3} (Set.{u3} α) (Order.Coframe.toCompleteLattice.{u3} (Set.{u3} α) (CompleteDistribLattice.toCoframe.{u3} (Set.{u3} α) (CompleteBooleanAlgebra.toCompleteDistribLattice.{u3} (Set.{u3} α) (Set.instCompleteBooleanAlgebraSet.{u3} α))))))) (PartialOrder.toPreorder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteSemilatticeInf.toPartialOrder.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteLattice.toCompleteSemilatticeInf.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Order.Coframe.toCompleteLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteDistribLattice.toCoframe.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (CompleteBooleanAlgebra.toCompleteDistribLattice.{max (max u1 u3) u2} (FirstOrder.Language.Theory.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α)) (Set.instCompleteBooleanAlgebraSet.{max (max u1 u3) u2} (FirstOrder.Language.Sentence.{max u1 u3, u2} (FirstOrder.Language.withConstants.{u1, u2, u3} L α))))))))) (FirstOrder.Language.distinctConstantsTheory.{u1, u2, u3} L α)
+Case conversion may be inaccurate. Consider using '#align first_order.language.monotone_distinct_constants_theory FirstOrder.Language.monotone_distinctConstantsTheoryₓ'. -/
theorem monotone_distinctConstantsTheory :
Monotone (L.distinctConstantsTheory : Set α → L[[α]].Theory) := fun s t st =>
image_subset _ (inter_subset_inter_left _ (prod_mono st st))
#align first_order.language.monotone_distinct_constants_theory FirstOrder.Language.monotone_distinctConstantsTheory
+#print FirstOrder.Language.directed_distinctConstantsTheory /-
theorem directed_distinctConstantsTheory :
Directed (· ⊆ ·) (L.distinctConstantsTheory : Set α → L[[α]].Theory) :=
Monotone.directed_le monotone_distinctConstantsTheory
#align first_order.language.directed_distinct_constants_theory FirstOrder.Language.directed_distinctConstantsTheory
+-/
+#print FirstOrder.Language.distinctConstantsTheory_eq_unionᵢ /-
theorem distinctConstantsTheory_eq_unionᵢ (s : Set α) :
L.distinctConstantsTheory s =
⋃ t : Finset s,
@@ -1261,6 +1489,7 @@ theorem distinctConstantsTheory_eq_unionᵢ (s : Set α) :
· rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
exact ⟨is, js⟩
#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_unionᵢ
+-/
end Cardinality
mathlib commit https://github.com/leanprover-community/mathlib/commit/039ef89bef6e58b32b62898dd48e9d1a4312bb65
@@ -311,28 +311,28 @@ scoped[FirstOrder] prefix:arg "&" => FirstOrder.Language.Term.var ∘ Sum.inr
namespace Lhom
-/- warning: first_order.language.Lhom.on_term -> FirstOrder.Language.Lhom.onTerm is a dubious translation:
+/- warning: first_order.language.Lhom.on_term -> FirstOrder.Language.LHom.onTerm is a dubious translation:
lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lhom.{u1, u2, u4, u5} L L') -> (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u4, u5, u3} L' α)
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LHom.{u1, u2, u4, u5} L L') -> (FirstOrder.Language.Term.{u1, u2, u3} L α) -> (FirstOrder.Language.Term.{u4, u5, u3} L' α)
but is expected to have type
- forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.Lhom.{u1, u5, u3, u4} L L') -> (FirstOrder.Language.Term.{u1, u5, u2} L α) -> (FirstOrder.Language.Term.{u3, u4, u2} L' α)
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_term FirstOrder.Language.Lhom.onTermₓ'. -/
+ forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.LHom.{u1, u5, u3, u4} L L') -> (FirstOrder.Language.Term.{u1, u5, u2} L α) -> (FirstOrder.Language.Term.{u3, u4, u2} L' α)
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_term FirstOrder.Language.LHom.onTermₓ'. -/
/-- Maps a term's symbols along a language map. -/
@[simp]
def onTerm (φ : L →ᴸ L') : L.term α → L'.term α
| var i => var i
| func f ts => func (φ.onFunction f) fun i => on_term (ts i)
-#align first_order.language.Lhom.on_term FirstOrder.Language.Lhom.onTerm
+#align first_order.language.Lhom.on_term FirstOrder.Language.LHom.onTerm
@[simp]
-theorem id_onTerm : ((Lhom.id L).onTerm : L.term α → L.term α) = id :=
+theorem id_onTerm : ((LHom.id L).onTerm : L.term α → L.term α) = id :=
by
ext t
induction' t with _ _ _ _ ih
· rfl
· simp_rw [on_term, ih]
rfl
-#align first_order.language.Lhom.id_on_term FirstOrder.Language.Lhom.id_onTerm
+#align first_order.language.Lhom.id_on_term FirstOrder.Language.LHom.id_onTerm
@[simp]
theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
@@ -343,7 +343,7 @@ theorem comp_onTerm {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
· rfl
· simp_rw [on_term, ih]
rfl
-#align first_order.language.Lhom.comp_on_term FirstOrder.Language.Lhom.comp_onTerm
+#align first_order.language.Lhom.comp_on_term FirstOrder.Language.LHom.comp_onTerm
end Lhom
@@ -980,12 +980,12 @@ namespace Lhom
open BoundedFormula
-/- warning: first_order.language.Lhom.on_bounded_formula -> FirstOrder.Language.Lhom.onBoundedFormula is a dubious translation:
+/- warning: first_order.language.Lhom.on_bounded_formula -> FirstOrder.Language.LHom.onBoundedFormula is a dubious translation:
lean 3 declaration is
- forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.Lhom.{u1, u2, u4, u5} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α k) -> (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α k))
+ forall {L : FirstOrder.Language.{u1, u2}} {L' : FirstOrder.Language.{u4, u5}} {α : Type.{u3}}, (FirstOrder.Language.LHom.{u1, u2, u4, u5} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u2, u3} L α k) -> (FirstOrder.Language.BoundedFormula.{u4, u5, u3} L' α k))
but is expected to have type
- forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.Lhom.{u1, u5, u3, u4} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u5, u2} L α k) -> (FirstOrder.Language.BoundedFormula.{u3, u4, u2} L' α k))
-Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.Lhom.onBoundedFormulaₓ'. -/
+ forall {L : FirstOrder.Language.{u1, u5}} {L' : FirstOrder.Language.{u3, u4}} {α : Type.{u2}}, (FirstOrder.Language.LHom.{u1, u5, u3, u4} L L') -> (forall {k : Nat}, (FirstOrder.Language.BoundedFormula.{u1, u5, u2} L α k) -> (FirstOrder.Language.BoundedFormula.{u3, u4, u2} L' α k))
+Case conversion may be inaccurate. Consider using '#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.LHom.onBoundedFormulaₓ'. -/
/-- Maps a bounded formula's symbols along a language map. -/
@[simp]
def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k → L'.BoundedFormula α k
@@ -994,11 +994,11 @@ def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k
| k, Rel R ts => (g.onRelation R).BoundedFormula (g.onTerm ∘ ts)
| k, imp f₁ f₂ => (on_bounded_formula f₁).imp (on_bounded_formula f₂)
| k, all f => (on_bounded_formula f).all
-#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.Lhom.onBoundedFormula
+#align first_order.language.Lhom.on_bounded_formula FirstOrder.Language.LHom.onBoundedFormula
@[simp]
theorem id_onBoundedFormula :
- ((Lhom.id L).onBoundedFormula : L.BoundedFormula α n → L.BoundedFormula α n) = id :=
+ ((LHom.id L).onBoundedFormula : L.BoundedFormula α n → L.BoundedFormula α n) = id :=
by
ext f
induction' f with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
@@ -1008,7 +1008,7 @@ theorem id_onBoundedFormula :
rfl
· rw [on_bounded_formula, ih1, ih2, id.def, id.def, id.def]
· rw [on_bounded_formula, ih3, id.def, id.def]
-#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.Lhom.id_onBoundedFormula
+#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.LHom.id_onBoundedFormula
@[simp]
theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →ᴸ L') :
@@ -1024,28 +1024,28 @@ theorem comp_onBoundedFormula {L'' : Language} (φ : L' →ᴸ L'') (ψ : L →
rfl
· simp only [on_bounded_formula, Function.comp_apply, ih1, ih2, eq_self_iff_true, and_self_iff]
· simp only [ih3, on_bounded_formula, Function.comp_apply]
-#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.Lhom.comp_onBoundedFormula
+#align first_order.language.Lhom.comp_on_bounded_formula FirstOrder.Language.LHom.comp_onBoundedFormula
/-- Maps a formula's symbols along a language map. -/
def onFormula (g : L →ᴸ L') : L.Formula α → L'.Formula α :=
g.onBoundedFormula
-#align first_order.language.Lhom.on_formula FirstOrder.Language.Lhom.onFormula
+#align first_order.language.Lhom.on_formula FirstOrder.Language.LHom.onFormula
/-- Maps a sentence's symbols along a language map. -/
def onSentence (g : L →ᴸ L') : L.Sentence → L'.Sentence :=
g.onFormula
-#align first_order.language.Lhom.on_sentence FirstOrder.Language.Lhom.onSentence
+#align first_order.language.Lhom.on_sentence FirstOrder.Language.LHom.onSentence
/-- Maps a theory's symbols along a language map. -/
def onTheory (g : L →ᴸ L') (T : L.Theory) : L'.Theory :=
g.onSentence '' T
-#align first_order.language.Lhom.on_Theory FirstOrder.Language.Lhom.onTheory
+#align first_order.language.Lhom.on_Theory FirstOrder.Language.LHom.onTheory
@[simp]
theorem mem_onTheory {g : L →ᴸ L'} {T : L.Theory} {φ : L'.Sentence} :
φ ∈ g.onTheory T ↔ ∃ φ₀, φ₀ ∈ T ∧ g.onSentence φ₀ = φ :=
Set.mem_image _ _ _
-#align first_order.language.Lhom.mem_on_Theory FirstOrder.Language.Lhom.mem_onTheory
+#align first_order.language.Lhom.mem_on_Theory FirstOrder.Language.LHom.mem_onTheory
end Lhom
mathlib commit https://github.com/leanprover-community/mathlib/commit/039ef89bef6e58b32b62898dd48e9d1a4312bb65
@@ -498,26 +498,26 @@ Case conversion may be inaccurate. Consider using '#align first_order.language.b
def castLe : ∀ {m n : ℕ} (h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
| m, n, h, falsum => falsum
| m, n, h, equal t₁ t₂ =>
- equal (t₁.relabel (Sum.map id (Fin.castLe h))) (t₂.relabel (Sum.map id (Fin.castLe h)))
- | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLe h)) ∘ ts)
- | m, n, h, imp f₁ f₂ => (f₁.castLe h).imp (f₂.castLe h)
- | m, n, h, all f => (f.castLe (add_le_add_right h 1)).all
+ equal (t₁.relabel (Sum.map id (Fin.castLE h))) (t₂.relabel (Sum.map id (Fin.castLE h)))
+ | m, n, h, Rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
+ | m, n, h, imp f₁ f₂ => (f₁.castLE h).imp (f₂.castLE h)
+ | m, n, h, all f => (f.castLE (add_le_add_right h 1)).all
#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLe
@[simp]
-theorem castLe_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLe h = φ :=
+theorem castLe_rfl {n} (h : n ≤ n) (φ : L.BoundedFormula α n) : φ.castLE h = φ :=
by
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
· rfl
- · simp [Fin.castLe_of_eq]
- · simp [Fin.castLe_of_eq]
- · simp [Fin.castLe_of_eq, ih1, ih2]
- · simp [Fin.castLe_of_eq, ih3]
+ · simp [Fin.castLE_of_eq]
+ · simp [Fin.castLE_of_eq]
+ · simp [Fin.castLE_of_eq, ih1, ih2]
+ · simp [Fin.castLE_of_eq, ih3]
#align first_order.language.bounded_formula.cast_le_rfl FirstOrder.Language.BoundedFormula.castLe_rfl
@[simp]
theorem castLe_castLe {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormula α k) :
- (φ.castLe km).castLe mn = φ.castLe (km.trans mn) :=
+ (φ.castLE km).castLE mn = φ.castLE (km.trans mn) :=
by
revert m n
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3 <;> intro m n km mn
@@ -720,7 +720,7 @@ theorem relabel_ex (g : α → Sum β (Fin n)) {k} (φ : L.BoundedFormula α (k
@[simp]
theorem relabel_sum_inl (φ : L.BoundedFormula α n) :
- (φ.relabel Sum.inl : L.BoundedFormula α (0 + n)) = φ.castLe (ge_of_eq (zero_add n)) :=
+ (φ.relabel Sum.inl : L.BoundedFormula α (0 + n)) = φ.castLE (ge_of_eq (zero_add n)) :=
by
simp only [relabel, relabel_aux_sum_inl]
induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
@@ -790,7 +790,7 @@ theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic
IsAtomic.rec_on h (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.lift_at FirstOrder.Language.BoundedFormula.IsAtomic.liftAt
-theorem IsAtomic.castLe {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLe h).IsAtomic :=
+theorem IsAtomic.castLe {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
IsAtomic.rec_on hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLe
@@ -823,8 +823,8 @@ theorem IsQf.liftAt {k m : ℕ} (h : IsQf φ) : (φ.liftAt k m).IsQf :=
IsQf.rec_on h isQf_bot (fun _ ih => ih.liftAt.IsQf) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
#align first_order.language.bounded_formula.is_qf.lift_at FirstOrder.Language.BoundedFormula.IsQf.liftAt
-theorem IsQf.castLe {h : l ≤ n} (hφ : IsQf φ) : (φ.castLe h).IsQf :=
- IsQf.rec_on hφ isQf_bot (fun _ ih => ih.castLe.IsQf) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
+theorem IsQf.castLe {h : l ≤ n} (hφ : IsQf φ) : (φ.castLE h).IsQf :=
+ IsQf.rec_on hφ isQf_bot (fun _ ih => ih.castLE.IsQf) fun _ _ _ _ ih1 ih2 => ih1.imp ih2
#align first_order.language.bounded_formula.is_qf.cast_le FirstOrder.Language.BoundedFormula.IsQf.castLe
theorem not_all_isQf (φ : L.BoundedFormula α (n + 1)) : ¬φ.all.IsQf := fun con =>
@@ -870,14 +870,14 @@ theorem IsPrenex.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsPrenex
fun _ _ _ h => by simp [h.ex]
#align first_order.language.bounded_formula.is_prenex.relabel FirstOrder.Language.BoundedFormula.IsPrenex.relabel
-theorem IsPrenex.castLe (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLe h).IsPrenex :=
- IsPrenex.rec_on hφ (fun _ _ ih _ _ => ih.castLe.IsPrenex) (fun _ _ _ ih _ _ => ih.all)
+theorem IsPrenex.castLe (hφ : IsPrenex φ) : ∀ {n} {h : l ≤ n}, (φ.castLE h).IsPrenex :=
+ IsPrenex.rec_on hφ (fun _ _ ih _ _ => ih.castLE.IsPrenex) (fun _ _ _ ih _ _ => ih.all)
fun _ _ _ ih _ _ => ih.ex
#align first_order.language.bounded_formula.is_prenex.cast_le FirstOrder.Language.BoundedFormula.IsPrenex.castLe
theorem IsPrenex.liftAt {k m : ℕ} (h : IsPrenex φ) : (φ.liftAt k m).IsPrenex :=
- IsPrenex.rec_on h (fun _ _ ih => ih.liftAt.IsPrenex) (fun _ _ _ ih => ih.castLe.all)
- fun _ _ _ ih => ih.castLe.ex
+ IsPrenex.rec_on h (fun _ _ ih => ih.liftAt.IsPrenex) (fun _ _ _ ih => ih.castLE.all)
+ fun _ _ _ ih => ih.castLE.ex
#align first_order.language.bounded_formula.is_prenex.lift_at FirstOrder.Language.BoundedFormula.IsPrenex.liftAt
/- warning: first_order.language.bounded_formula.to_prenex_imp_right -> FirstOrder.Language.BoundedFormula.toPrenexImpRight is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -458,10 +458,10 @@ protected def ex (φ : L.BoundedFormula α (n + 1)) : L.BoundedFormula α n :=
instance : Top (L.BoundedFormula α n) :=
⟨BoundedFormula.not ⊥⟩
-instance : HasInf (L.BoundedFormula α n) :=
+instance : Inf (L.BoundedFormula α n) :=
⟨fun f g => (f.imp g.Not).Not⟩
-instance : HasSup (L.BoundedFormula α n) :=
+instance : Sup (L.BoundedFormula α n) :=
⟨fun f g => f.Not.imp g⟩
/-- The biimplication between two bounded formulas. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -892,11 +892,11 @@ theorem id_onBoundedFormula :
ext f
induction' f with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
· rfl
- · rw [onBoundedFormula, LHom.id_onTerm, id.def, id.def, id.def, Term.bdEqual]
+ · rw [onBoundedFormula, LHom.id_onTerm, id, id, id, Term.bdEqual]
· rw [onBoundedFormula, LHom.id_onTerm]
rfl
- · rw [onBoundedFormula, ih1, ih2, id.def, id.def, id.def]
- · rw [onBoundedFormula, ih3, id.def, id.def]
+ · rw [onBoundedFormula, ih1, ih2, id, id, id]
+ · rw [onBoundedFormula, ih3, id, id]
set_option linter.uppercaseLean3 false in
#align first_order.language.Lhom.id_on_bounded_formula FirstOrder.Language.LHom.id_onBoundedFormula
@@ -667,11 +667,11 @@ def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin
/-- take the disjunction of a finite set of formulas -/
noncomputable def iSup (s : Finset β) (f : β → L.BoundedFormula α n) : L.BoundedFormula α n :=
- (s.toList.map f).foldr (. ⊔ .) ⊥
+ (s.toList.map f).foldr (· ⊔ ·) ⊥
/-- take the conjunction of a finite set of formulas -/
noncomputable def iInf (s : Finset β) (f : β → L.BoundedFormula α n) : L.BoundedFormula α n :=
- (s.toList.map f).foldr (. ⊓ .) ⊤
+ (s.toList.map f).foldr (· ⊓ ·) ⊤
variable {l : ℕ} {φ ψ : L.BoundedFormula α l} {θ : L.BoundedFormula α l.succ}
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)
@@ -60,9 +60,7 @@ namespace FirstOrder
namespace Language
variable (L : Language.{u, v}) {L' : Language}
-
variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P]
-
variable {α : Type u'} {β : Type v'} {γ : Type*}
open FirstOrder
@@ -677,7 +675,6 @@ noncomputable def iInf (s : Finset β) (f : β → L.BoundedFormula α n) : L.Bo
variable {l : ℕ} {φ ψ : L.BoundedFormula α l} {θ : L.BoundedFormula α l.succ}
-
variable {v : α → M} {xs : Fin l → M}
/-- An atomic formula is either equality or a relation symbol applied to terms.
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -90,7 +90,7 @@ def varFinset [DecidableEq α] : L.Term α → Finset α
| func _f ts => univ.biUnion fun i => (ts i).varFinset
#align first_order.language.term.var_finset FirstOrder.Language.Term.varFinset
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- The `Finset` of variables from the left side of a sum used in a given term. -/
@[simp]
def varFinsetLeft [DecidableEq α] : L.Term (Sum α β) → Finset α
@@ -99,7 +99,7 @@ def varFinsetLeft [DecidableEq α] : L.Term (Sum α β) → Finset α
| func _f ts => univ.biUnion fun i => (ts i).varFinsetLeft
#align first_order.language.term.var_finset_left FirstOrder.Language.Term.varFinsetLeft
---Porting note: universes in different order
+-- Porting note: universes in different order
@[simp]
def relabel (g : α → β) : L.Term α → L.Term β
| var i => var (g i)
@@ -137,7 +137,7 @@ def relabelEquiv (g : α ≃ β) : L.Term α ≃ L.Term β :=
⟨relabel g, relabel g.symm, fun t => by simp, fun t => by simp⟩
#align first_order.language.term.relabel_equiv FirstOrder.Language.Term.relabelEquiv
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Restricts a term to use only a set of the given variables. -/
def restrictVar [DecidableEq α] : ∀ (t : L.Term α) (_f : t.varFinset → β), L.Term β
| var a, f => var (f ⟨a, mem_singleton_self a⟩)
@@ -146,7 +146,7 @@ def restrictVar [DecidableEq α] : ∀ (t : L.Term α) (_f : t.varFinset → β)
(subset_biUnion_of_mem (fun i => varFinset (ts i)) (mem_univ i)))
#align first_order.language.term.restrict_var FirstOrder.Language.Term.restrictVar
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Restricts a term to use only a set of the given variables on the left side of a sum. -/
def restrictVarLeft [DecidableEq α] {γ : Type*} :
∀ (t : L.Term (Sum α γ)) (_f : t.varFinsetLeft → β), L.Term (Sum β γ)
@@ -177,7 +177,7 @@ def Functions.apply₂ (f : L.Functions 2) (t₁ t₂ : L.Term α) : L.Term α :
namespace Term
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Sends a term with constants to a term with extra variables. -/
@[simp]
def constantsToVars : L[[γ]].Term α → L.Term (Sum γ α)
@@ -188,7 +188,7 @@ def constantsToVars : L[[γ]].Term α → L.Term (Sum γ α)
Sum.casesOn f (fun f => func f fun i => (ts i).constantsToVars) fun c => isEmptyElim c
#align first_order.language.term.constants_to_vars FirstOrder.Language.Term.constantsToVars
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Sends a term with extra variables to a term with constants. -/
@[simp]
def varsToConstants : L.Term (Sum γ α) → L[[γ]].Term α
@@ -247,7 +247,7 @@ def liftAt {n : ℕ} (n' m : ℕ) : L.Term (Sum α (Fin n)) → L.Term (Sum α (
relabel (Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n')
#align first_order.language.term.lift_at FirstOrder.Language.Term.liftAt
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Substitutes the variables in a given term with terms. -/
@[simp]
def subst : L.Term α → (α → L.Term β) → L.Term β
@@ -263,7 +263,7 @@ namespace LHom
open Term
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Maps a term's symbols along a language map. -/
@[simp]
def onTerm (φ : L →ᴸ L') : L.Term α → L'.Term α
@@ -419,7 +419,7 @@ protected def iff (φ ψ : L.BoundedFormula α n) :=
open Finset
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- The `Finset` of variables used in a given formula. -/
@[simp]
def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset α
@@ -430,7 +430,7 @@ def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset
| _n, all f => f.freeVarFinset
#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinset
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Casts `L.BoundedFormula α m` as `L.BoundedFormula α n`, where `m ≤ n`. -/
@[simp]
def castLE : ∀ {m n : ℕ} (_h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
@@ -474,7 +474,7 @@ theorem castLE_comp_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) :
funext (castLE_castLE km mn)
#align first_order.language.bounded_formula.cast_le_comp_cast_le FirstOrder.Language.BoundedFormula.castLE_comp_castLE
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Restricts a bounded formula to only use a particular set of free variables. -/
def restrictFreeVar [DecidableEq α] :
∀ {n : ℕ} (φ : L.BoundedFormula α n) (_f : φ.freeVarFinset → β), L.BoundedFormula β n
@@ -491,21 +491,21 @@ def restrictFreeVar [DecidableEq α] :
| _n, all φ, f => (φ.restrictFreeVar f).all
#align first_order.language.bounded_formula.restrict_free_var FirstOrder.Language.BoundedFormula.restrictFreeVar
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Places universal quantifiers on all extra variables of a bounded formula. -/
def alls : ∀ {n}, L.BoundedFormula α n → L.Formula α
| 0, φ => φ
| _n + 1, φ => φ.all.alls
#align first_order.language.bounded_formula.alls FirstOrder.Language.BoundedFormula.alls
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Places existential quantifiers on all extra variables of a bounded formula. -/
def exs : ∀ {n}, L.BoundedFormula α n → L.Formula α
| 0, φ => φ
| _n + 1, φ => φ.ex.exs
#align first_order.language.bounded_formula.exs FirstOrder.Language.BoundedFormula.exs
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Maps bounded formulas along a map of terms and a map of relations. -/
def mapTermRel {g : ℕ → ℕ} (ft : ∀ n, L.Term (Sum α (Fin n)) → L'.Term (Sum β (Fin (g n))))
(fr : ∀ n, L.Relations n → L'.Relations n)
@@ -654,7 +654,7 @@ def constantsVarsEquiv : L[[γ]].BoundedFormula α n ≃ L.BoundedFormula (Sum
mapTermRelEquiv (fun _ => Term.constantsVarsEquivLeft) fun _ => Equiv.sumEmpty _ _
#align first_order.language.bounded_formula.constants_vars_equiv FirstOrder.Language.BoundedFormula.constantsVarsEquiv
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Turns the extra variables of a bounded formula into free variables. -/
@[simp]
def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin n))
@@ -794,7 +794,7 @@ theorem IsPrenex.liftAt {k m : ℕ} (h : IsPrenex φ) : (φ.liftAt k m).IsPrenex
fun _ ih => ih.castLE.ex
#align first_order.language.bounded_formula.is_prenex.lift_at FirstOrder.Language.BoundedFormula.IsPrenex.liftAt
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- An auxiliary operation to `FirstOrder.Language.BoundedFormula.toPrenex`.
If `φ` is quantifier-free and `ψ` is in prenex normal form, then `φ.toPrenexImpRight ψ`
is a prenex normal form for `φ.imp ψ`. -/
@@ -824,7 +824,7 @@ theorem isPrenex_toPrenexImpRight {φ ψ : L.BoundedFormula α n} (hφ : IsQF φ
· exact (ih2 hφ.liftAt).ex
#align first_order.language.bounded_formula.is_prenex_to_prenex_imp_right FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImpRight
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- An auxiliary operation to `FirstOrder.Language.BoundedFormula.toPrenex`.
If `φ` and `ψ` are in prenex normal form, then `φ.toPrenexImp ψ`
is a prenex normal form for `φ.imp ψ`. -/
@@ -854,7 +854,7 @@ theorem isPrenex_toPrenexImp {φ ψ : L.BoundedFormula α n} (hφ : IsPrenex φ)
· exact (ih2 hψ.liftAt).all
#align first_order.language.bounded_formula.is_prenex_to_prenex_imp FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImp
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- For any bounded formula `φ`, `φ.toPrenex` is a semantically-equivalent formula in prenex normal
form. -/
def toPrenex : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
@@ -877,7 +877,7 @@ namespace LHom
open BoundedFormula
---Porting note: universes in different order
+-- Porting note: universes in different order
/-- Maps a bounded formula's symbols along a language map. -/
@[simp]
def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k → L'.BoundedFormula α k
@@ -989,7 +989,7 @@ set_option linter.uppercaseLean3 false in
#align first_order.language.Lequiv.on_formula_symm FirstOrder.Language.LEquiv.onFormula_symm
/-- Maps a sentence's symbols along a language equivalence. -/
-@[simps!] --Porting note: add `!` to `simps`
+@[simps!] -- Porting note: add `!` to `simps`
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence :=
φ.onFormula
set_option linter.uppercaseLean3 false in
@@ -3,7 +3,6 @@ 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 Mathlib.Data.List.ProdSigma
import Mathlib.Data.Set.Prod
import Mathlib.Logic.Equiv.Fin
import Mathlib.ModelTheory.LanguageMap
@@ -73,7 +73,7 @@ open Structure Fin
/-- A term on `α` is either a variable indexed by an element of `α`
or a function symbol applied to simpler terms. -/
inductive Term (α : Type u') : Type max u u'
- | var : ∀ _a : α, Term α
+ | var : α → Term α
| func : ∀ {l : ℕ} (_f : L.Functions l) (_ts : Fin l → Term α), Term α
#align first_order.language.term FirstOrder.Language.Term
export Term (var func)
attribute [simp] ... in
-> attribute [local simp] ... in
(#7678)
Mathlib.Logic.Unique contains the line attribute [simp] eq_iff_true_of_subsingleton in ...
:
Despite what the in
part may imply, this adds the lemma to the simp set "globally", including for downstream files; it is likely that attribute [local simp] eq_iff_true_of_subsingleton in ...
was meant instead (or maybe scoped simp
, but I think "scoped" refers to the current namespace). Indeed, the relevant lemma is not marked with @[simp]
for possible slowness: https://github.com/leanprover/std4/blob/846e9e1d6bb534774d1acd2dc430e70987da3c18/Std/Logic.lean#L749. Adding it to the simp set causes the example at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Regression.20in.20simp to slow down.
This PR changes this and fixes the relevant downstream simp
s. There was also one ocurrence of attribute [simp] FullSubcategory.comp_def FullSubcategory.id_def in
in Mathlib.CategoryTheory.Monoidal.Subcategory but that was much easier to fix.
@@ -208,7 +208,7 @@ def constantsVarsEquiv : L[[γ]].Term α ≃ L.Term (Sum γ α) :=
· cases n
· cases f
· simp [constantsToVars, varsToConstants, ih]
- · simp [constantsToVars, varsToConstants, Constants.term]
+ · simp [constantsToVars, varsToConstants, Constants.term, eq_iff_true_of_subsingleton]
· cases' f with f f
· simp [constantsToVars, varsToConstants, ih]
· exact isEmptyElim f, by
mapTermRel
doesn't have any nice simp lemmas about it, so it's best not to unfold subst.
@@ -645,7 +645,6 @@ theorem relabel_sum_inl (φ : L.BoundedFormula α n) :
#align first_order.language.bounded_formula.relabel_sum_inl FirstOrder.Language.BoundedFormula.relabel_sum_inl
/-- Substitutes the variables in a given formula with terms. -/
-@[simp]
def subst {n : ℕ} (φ : L.BoundedFormula α n) (f : α → L.Term β) : L.BoundedFormula β n :=
φ.mapTermRel (fun _ t => t.subst (Sum.elim (Term.relabel Sum.inl ∘ f) (var ∘ Sum.inr)))
(fun _ => id) fun _ => id
@@ -1038,6 +1038,22 @@ protected abbrev imp : L.Formula α → L.Formula α → L.Formula α :=
BoundedFormula.imp
#align first_order.language.formula.imp FirstOrder.Language.Formula.imp
+/-- Given a map `f : α → β ⊕ γ`, `iAlls f φ` transforms a `L.Formula α`
+into a `L.Formula β` by renaming variables with the map `f` and then universally
+quantifying over all variables `Sum.inr _`. -/
+noncomputable def iAlls [Finite γ] (f : α → β ⊕ γ)
+ (φ : L.Formula α) : L.Formula β :=
+ let e := Classical.choice (Classical.choose_spec (Finite.exists_equiv_fin γ))
+ (BoundedFormula.relabel (fun a => Sum.map id e (f a)) φ).alls
+
+/-- Given a map `f : α → β ⊕ γ`, `iExs f φ` transforms a `L.Formula α`
+into a `L.Formula β` by renaming variables with the map `f` and then universally
+quantifying over all variables `Sum.inr _`. -/
+noncomputable def iExs [Finite γ] (f : α → β ⊕ γ)
+ (φ : L.Formula α) : L.Formula β :=
+ let e := Classical.choice (Classical.choose_spec (Finite.exists_equiv_fin γ))
+ (BoundedFormula.relabel (fun a => Sum.map id e (f a)) φ).exs
+
/-- The biimplication between formulas, as a formula. -/
protected nonrec abbrev iff (φ ψ : L.Formula α) : L.Formula α :=
φ.iff ψ
@@ -669,6 +669,15 @@ def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin
(Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ finSumFinEquiv.symm))).all
#align first_order.language.bounded_formula.to_formula FirstOrder.Language.BoundedFormula.toFormula
+/-- take the disjunction of a finite set of formulas -/
+noncomputable def iSup (s : Finset β) (f : β → L.BoundedFormula α n) : L.BoundedFormula α n :=
+ (s.toList.map f).foldr (. ⊔ .) ⊥
+
+/-- take the conjunction of a finite set of formulas -/
+noncomputable def iInf (s : Finset β) (f : β → L.BoundedFormula α n) : L.BoundedFormula α n :=
+ (s.toList.map f).foldr (. ⊓ .) ⊤
+
+
variable {l : ℕ} {φ ψ : L.BoundedFormula α l} {θ : L.BoundedFormula α l.succ}
variable {v : α → M} {xs : Fin l → M}
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -62,9 +62,9 @@ namespace Language
variable (L : Language.{u, v}) {L' : Language}
-variable {M : Type w} {N P : Type _} [L.Structure M] [L.Structure N] [L.Structure P]
+variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P]
-variable {α : Type u'} {β : Type v'} {γ : Type _}
+variable {α : Type u'} {β : Type v'} {γ : Type*}
open FirstOrder
@@ -149,7 +149,7 @@ def restrictVar [DecidableEq α] : ∀ (t : L.Term α) (_f : t.varFinset → β)
--Porting note: universes in different order
/-- Restricts a term to use only a set of the given variables on the left side of a sum. -/
-def restrictVarLeft [DecidableEq α] {γ : Type _} :
+def restrictVarLeft [DecidableEq α] {γ : Type*} :
∀ (t : L.Term (Sum α γ)) (_f : t.varFinsetLeft → β), L.Term (Sum β γ)
| var (Sum.inl a), f => var (Sum.inl (f ⟨a, mem_singleton_self a⟩))
| var (Sum.inr a), _f => var (Sum.inr a)
@@ -1020,17 +1020,17 @@ def graph (f : L.Functions n) : L.Formula (Fin (n + 1)) :=
#align first_order.language.formula.graph FirstOrder.Language.Formula.graph
/-- The negation of a formula. -/
-protected nonrec def not (φ : L.Formula α) : L.Formula α :=
+protected nonrec abbrev not (φ : L.Formula α) : L.Formula α :=
φ.not
#align first_order.language.formula.not FirstOrder.Language.Formula.not
/-- The implication between formulas, as a formula. -/
-protected def imp : L.Formula α → L.Formula α → L.Formula α :=
+protected abbrev imp : L.Formula α → L.Formula α → L.Formula α :=
BoundedFormula.imp
#align first_order.language.formula.imp FirstOrder.Language.Formula.imp
/-- The biimplication between formulas, as a formula. -/
-protected nonrec def iff (φ ψ : L.Formula α) : L.Formula α :=
+protected nonrec abbrev iff (φ ψ : L.Formula α) : L.Formula α :=
φ.iff ψ
#align first_order.language.formula.iff FirstOrder.Language.Formula.iff
@@ -2,17 +2,14 @@
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.syntax
-! leanprover-community/mathlib commit d565b3df44619c1498326936be16f1a935df0728
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.List.ProdSigma
import Mathlib.Data.Set.Prod
import Mathlib.Logic.Equiv.Fin
import Mathlib.ModelTheory.LanguageMap
+#align_import model_theory.syntax from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728"
+
/-!
# Basics on First-Order Syntax
This file defines first-order terms, formulas, sentences, and theories in a style inspired by the
Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -248,7 +248,7 @@ instance inhabitedOfConstant [Inhabited L.Constants] : Inhabited (L.Term α) :=
/-- Raises all of the `Fin`-indexed variables of a term greater than or equal to `m` by `n'`. -/
def liftAt {n : ℕ} (n' m : ℕ) : L.Term (Sum α (Fin n)) → L.Term (Sum α (Fin (n + n'))) :=
- relabel (Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat n' i)
+ relabel (Sum.map id fun i => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n')
#align first_order.language.term.lift_at FirstOrder.Language.Term.liftAt
--Porting note: universes in different order
@@ -1116,7 +1116,8 @@ def nonemptyTheory : L.Theory :=
/-- A theory indicating that each of a set of constants is distinct. -/
def distinctConstantsTheory (s : Set α) : L[[α]].Theory :=
- (fun ab : α × α => ((L.con ab.1).term.equal (L.con ab.2).term).not) '' (s ×ˢ s ∩ Set.diagonal αᶜ)
+ (fun ab : α × α => ((L.con ab.1).term.equal (L.con ab.2).term).not) ''
+ (s ×ˢ s ∩ (Set.diagonal α)ᶜ)
#align first_order.language.distinct_constants_theory FirstOrder.Language.distinctConstantsTheory
variable {L}
SProd
to implement overloaded notation · ×ˢ ·
(#4200)
Currently, the following notations are changed from · ×ˢ ·
because Lean 4 can't deal with ambiguous notations.
| Definition | Notation |
| :
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com>
@@ -1099,7 +1099,7 @@ variable (L)
/-- A sentence indicating that a structure has `n` distinct elements. -/
protected def Sentence.cardGe (n : ℕ) : L.Sentence :=
- (((((List.finRange n).product (List.finRange n)).filter fun ij : _ × _ => ij.1 ≠ ij.2).map
+ ((((List.finRange n ×ˢ List.finRange n).filter fun ij : _ × _ => ij.1 ≠ ij.2).map
fun ij : _ × _ => ∼((&ij.1).bdEqual &ij.2)).foldr
(· ⊓ ·) ⊤).exs
#align first_order.language.sentence.card_ge FirstOrder.Language.Sentence.cardGe
@@ -21,7 +21,7 @@ This file defines first-order terms, formulas, sentences, and theories in a styl
## Main Definitions
* A `FirstOrder.Language.Term` is defined so that `L.Term α` is the type of `L`-terms with free
variables indexed by `α`.
-* A `FirstOrder.Language.Formula` is defined so that `L.formula α` is the type of `L`-formulas with
+* A `FirstOrder.Language.Formula` is defined so that `L.Formula α` is the type of `L`-formulas with
free variables indexed by `α`.
* A `FirstOrder.Language.Sentence` is a formula with no free variables.
* A `FirstOrder.Language.Theory` is a set of sentences.
@@ -41,10 +41,10 @@ variables with given terms.
constants in the language and having extra variables indexed by the same type.
## Implementation Notes
-* Formulas use a modified version of de Bruijn variables. Specifically, a `L.boundedFormula α n`
+* Formulas use a modified version of de Bruijn variables. Specifically, a `L.BoundedFormula α n`
is a formula with some variables indexed by a type `α`, which cannot be quantified over, and some
-indexed by `Fin n`, which can. For any `φ : L.boundedFormula α (n + 1)`, we define the formula
-`∀' φ : L.boundedFormula α n` by universally quantifying over the variable indexed by
+indexed by `Fin n`, which can. For any `φ : L.BoundedFormula α (n + 1)`, we define the formula
+`∀' φ : L.BoundedFormula α n` by universally quantifying over the variable indexed by
`n : Fin (n + 1)`.
## References
@@ -792,7 +792,7 @@ theorem IsPrenex.liftAt {k m : ℕ} (h : IsPrenex φ) : (φ.liftAt k m).IsPrenex
--Porting note: universes in different order
/-- An auxiliary operation to `FirstOrder.Language.BoundedFormula.toPrenex`.
- If `φ` is quantifier-free and `ψ` is in prenex normal form, then `φ.to_prenex_imp_right ψ`
+ If `φ` is quantifier-free and `ψ` is in prenex normal form, then `φ.toPrenexImpRight ψ`
is a prenex normal form for `φ.imp ψ`. -/
def toPrenexImpRight : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n → L.BoundedFormula α n
| n, φ, BoundedFormula.ex ψ => ((φ.liftAt 1 n).toPrenexImpRight ψ).ex
@@ -822,7 +822,7 @@ theorem isPrenex_toPrenexImpRight {φ ψ : L.BoundedFormula α n} (hφ : IsQF φ
--Porting note: universes in different order
/-- An auxiliary operation to `FirstOrder.Language.BoundedFormula.toPrenex`.
- If `φ` and `ψ` are in prenex normal form, then `φ.to_prenex_imp ψ`
+ If `φ` and `ψ` are in prenex normal form, then `φ.toPrenexImp ψ`
is a prenex normal form for `φ.imp ψ`. -/
def toPrenexImp : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n → L.BoundedFormula α n
| n, BoundedFormula.ex φ, ψ => (φ.toPrenexImp (ψ.liftAt 1 n)).all
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -91,7 +91,7 @@ open Finset
@[simp]
def varFinset [DecidableEq α] : L.Term α → Finset α
| var i => {i}
- | func _f ts => univ.bunionᵢ fun i => (ts i).varFinset
+ | func _f ts => univ.biUnion fun i => (ts i).varFinset
#align first_order.language.term.var_finset FirstOrder.Language.Term.varFinset
--Porting note: universes in different order
@@ -100,7 +100,7 @@ def varFinset [DecidableEq α] : L.Term α → Finset α
def varFinsetLeft [DecidableEq α] : L.Term (Sum α β) → Finset α
| var (Sum.inl i) => {i}
| var (Sum.inr _i) => ∅
- | func _f ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
+ | func _f ts => univ.biUnion fun i => (ts i).varFinsetLeft
#align first_order.language.term.var_finset_left FirstOrder.Language.Term.varFinsetLeft
--Porting note: universes in different order
@@ -147,7 +147,7 @@ def restrictVar [DecidableEq α] : ∀ (t : L.Term α) (_f : t.varFinset → β)
| var a, f => var (f ⟨a, mem_singleton_self a⟩)
| func F ts, f =>
func F fun i => (ts i).restrictVar (f ∘ Set.inclusion
- (subset_bunionᵢ_of_mem (fun i => varFinset (ts i)) (mem_univ i)))
+ (subset_biUnion_of_mem (fun i => varFinset (ts i)) (mem_univ i)))
#align first_order.language.term.restrict_var FirstOrder.Language.Term.restrictVar
--Porting note: universes in different order
@@ -158,7 +158,7 @@ def restrictVarLeft [DecidableEq α] {γ : Type _} :
| var (Sum.inr a), _f => var (Sum.inr a)
| func F ts, f =>
func F fun i =>
- (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_bunionᵢ_of_mem
+ (ts i).restrictVarLeft (f ∘ Set.inclusion (subset_biUnion_of_mem
(fun i => varFinsetLeft (ts i)) (mem_univ i)))
#align first_order.language.term.restrict_var_left FirstOrder.Language.Term.restrictVarLeft
@@ -429,7 +429,7 @@ open Finset
def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset α
| _n, falsum => ∅
| _n, equal t₁ t₂ => t₁.varFinsetLeft ∪ t₂.varFinsetLeft
- | _n, rel _R ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
+ | _n, rel _R ts => univ.biUnion fun i => (ts i).varFinsetLeft
| _n, imp f₁ f₂ => f₁.freeVarFinset ∪ f₂.freeVarFinset
| _n, all f => f.freeVarFinset
#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinset
@@ -488,7 +488,7 @@ def restrictFreeVar [DecidableEq α] :
(t₂.restrictVarLeft (f ∘ Set.inclusion (subset_union_right _ _)))
| _n, rel R ts, f =>
rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion
- (subset_bunionᵢ_of_mem (fun i => Term.varFinsetLeft (ts i)) (mem_univ i)))
+ (subset_biUnion_of_mem (fun i => Term.varFinsetLeft (ts i)) (mem_univ i)))
| _n, imp φ₁ φ₂, f =>
(φ₁.restrictFreeVar (f ∘ Set.inclusion (subset_union_left _ _))).imp
(φ₂.restrictFreeVar (f ∘ Set.inclusion (subset_union_right _ _)))
@@ -1133,23 +1133,23 @@ theorem directed_distinctConstantsTheory :
Monotone.directed_le monotone_distinctConstantsTheory
#align first_order.language.directed_distinct_constants_theory FirstOrder.Language.directed_distinctConstantsTheory
-theorem distinctConstantsTheory_eq_unionᵢ (s : Set α) :
+theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
L.distinctConstantsTheory s =
⋃ t : Finset s,
L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s)) := by
classical
simp only [distinctConstantsTheory]
- rw [← image_unionᵢ, ← unionᵢ_inter]
+ rw [← image_iUnion, ← iUnion_inter]
refine' congr rfl (congr (congr rfl _) rfl)
ext ⟨i, j⟩
- simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_unionᵢ,
+ simp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_iUnion,
mem_image, Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]
refine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩
· simp
· simp
· rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩
exact ⟨is, js⟩
-#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_unionᵢ
+#align first_order.language.distinct_constants_theory_eq_Union FirstOrder.Language.distinctConstantsTheory_eq_iUnion
end Cardinality
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -573,9 +573,8 @@ def relabelAux (g : α → Sum β (Fin n)) (k : ℕ) : Sum α (Fin k) → Sum β
@[simp]
theorem sum_elim_comp_relabelAux {m : ℕ} {g : α → Sum β (Fin n)} {v : β → M}
- {xs : Fin (n + m) → M} :
- Sum.elim v xs ∘ relabelAux g m = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) :=
- by
+ {xs : Fin (n + m) → M} : Sum.elim v xs ∘ relabelAux g m =
+ Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) := by
ext x
cases' x with x x
· simp only [BoundedFormula.relabelAux, Function.comp_apply, Sum.map_inl, Sum.elim_inl]
@@ -318,7 +318,7 @@ variable (L) (α)
inductive BoundedFormula : ℕ → Type max u v u'
| falsum {n} : BoundedFormula n
| equal {n} (t₁ t₂ : L.Term (Sum α (Fin n))) : BoundedFormula n
- | Rel {n l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (Sum α (Fin n))) : BoundedFormula n
+ | rel {n l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (Sum α (Fin n))) : BoundedFormula n
| imp {n} (f₁ f₂ : BoundedFormula n) : BoundedFormula n
| all {n} (f : BoundedFormula (n + 1)) : BoundedFormula n
#align first_order.language.bounded_formula FirstOrder.Language.BoundedFormula
@@ -347,7 +347,7 @@ variable {L} {α} {n : ℕ}
/-- Applies a relation to terms as a bounded formula. -/
def Relations.boundedFormula {l : ℕ} (R : L.Relations n) (ts : Fin n → L.Term (Sum α (Fin l))) :
L.BoundedFormula α l :=
- BoundedFormula.Rel R ts
+ BoundedFormula.rel R ts
#align first_order.language.relations.bounded_formula FirstOrder.Language.Relations.boundedFormula
/-- Applies a unary relation to a term as a bounded formula. -/
@@ -429,19 +429,19 @@ open Finset
def freeVarFinset [DecidableEq α] : ∀ {n}, L.BoundedFormula α n → Finset α
| _n, falsum => ∅
| _n, equal t₁ t₂ => t₁.varFinsetLeft ∪ t₂.varFinsetLeft
- | _n, Rel _R ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
+ | _n, rel _R ts => univ.bunionᵢ fun i => (ts i).varFinsetLeft
| _n, imp f₁ f₂ => f₁.freeVarFinset ∪ f₂.freeVarFinset
| _n, all f => f.freeVarFinset
#align first_order.language.bounded_formula.free_var_finset FirstOrder.Language.BoundedFormula.freeVarFinset
--Porting note: universes in different order
-/-- Casts `L.bounded_formula α m` as `L.bounded_formula α n`, where `m ≤ n`. -/
+/-- Casts `L.BoundedFormula α m` as `L.BoundedFormula α n`, where `m ≤ n`. -/
@[simp]
def castLE : ∀ {m n : ℕ} (_h : m ≤ n), L.BoundedFormula α m → L.BoundedFormula α n
| _m, _n, _h, falsum => falsum
| _m, _n, h, equal t₁ t₂ =>
equal (t₁.relabel (Sum.map id (Fin.castLE h))) (t₂.relabel (Sum.map id (Fin.castLE h)))
- | _m, _n, h, Rel R ts => Rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
+ | _m, _n, h, rel R ts => rel R (Term.relabel (Sum.map id (Fin.castLE h)) ∘ ts)
| _m, _n, h, imp f₁ f₂ => (f₁.castLE h).imp (f₂.castLE h)
| _m, _n, h, all f => (f.castLE (add_le_add_right h 1)).all
#align first_order.language.bounded_formula.cast_le FirstOrder.Language.BoundedFormula.castLE
@@ -486,8 +486,8 @@ def restrictFreeVar [DecidableEq α] :
| _n, equal t₁ t₂, f =>
equal (t₁.restrictVarLeft (f ∘ Set.inclusion (subset_union_left _ _)))
(t₂.restrictVarLeft (f ∘ Set.inclusion (subset_union_right _ _)))
- | _n, Rel R ts, f =>
- Rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion
+ | _n, rel R ts, f =>
+ rel R fun i => (ts i).restrictVarLeft (f ∘ Set.inclusion
(subset_bunionᵢ_of_mem (fun i => Term.varFinsetLeft (ts i)) (mem_univ i)))
| _n, imp φ₁ φ₂, f =>
(φ₁.restrictFreeVar (f ∘ Set.inclusion (subset_union_left _ _))).imp
@@ -517,7 +517,7 @@ def mapTermRel {g : ℕ → ℕ} (ft : ∀ n, L.Term (Sum α (Fin n)) → L'.Ter
∀ {n}, L.BoundedFormula α n → L'.BoundedFormula β (g n)
| _n, falsum => falsum
| _n, equal t₁ t₂ => equal (ft _ t₁) (ft _ t₂)
- | _n, Rel R ts => Rel (fr _ R) fun i => ft _ (ts i)
+ | _n, rel R ts => rel (fr _ R) fun i => ft _ (ts i)
| _n, imp φ₁ φ₂ => (φ₁.mapTermRel ft fr h).imp (φ₂.mapTermRel ft fr h)
| n, all φ => (h n (φ.mapTermRel ft fr h)).all
#align first_order.language.bounded_formula.map_term_rel FirstOrder.Language.BoundedFormula.mapTermRel
@@ -666,7 +666,7 @@ def constantsVarsEquiv : L[[γ]].BoundedFormula α n ≃ L.BoundedFormula (Sum
def toFormula : ∀ {n : ℕ}, L.BoundedFormula α n → L.Formula (Sum α (Fin n))
| _n, falsum => falsum
| _n, equal t₁ t₂ => t₁.equal t₂
- | _n, Rel R ts => R.formula ts
+ | _n, rel R ts => R.formula ts
| _n, imp φ₁ φ₂ => φ₁.toFormula.imp φ₂.toFormula
| _n, all φ =>
(φ.toFormula.relabel
@@ -681,8 +681,7 @@ variable {v : α → M} {xs : Fin l → M}
Note that `⊥` and `⊤` are not considered atomic in this convention. -/
inductive IsAtomic : L.BoundedFormula α n → Prop
| equal (t₁ t₂ : L.Term (Sum α (Fin n))) : IsAtomic (t₁.bdEqual t₂)
- |
- Rel {l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (Sum α (Fin n))) :
+ | rel {l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (Sum α (Fin n))) :
IsAtomic (R.boundedFormula ts)
#align first_order.language.bounded_formula.is_atomic FirstOrder.Language.BoundedFormula.IsAtomic
@@ -695,15 +694,15 @@ theorem not_ex_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsAtomic :=
theorem IsAtomic.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsAtomic)
(f : α → Sum β (Fin n)) : (φ.relabel f).IsAtomic :=
- IsAtomic.recOn h (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.Rel _ _
+ IsAtomic.recOn h (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.relabel FirstOrder.Language.BoundedFormula.IsAtomic.relabel
theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic :=
- IsAtomic.recOn h (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.Rel _ _
+ IsAtomic.recOn h (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.lift_at FirstOrder.Language.BoundedFormula.IsAtomic.liftAt
theorem IsAtomic.castLE {h : l ≤ n} (hφ : IsAtomic φ) : (φ.castLE h).IsAtomic :=
- IsAtomic.recOn hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.Rel _ _
+ IsAtomic.recOn hφ (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.rel _ _
#align first_order.language.bounded_formula.is_atomic.cast_le FirstOrder.Language.BoundedFormula.IsAtomic.castLE
/-- A quantifier-free formula is a formula defined without quantifiers. These are all equivalent
@@ -806,10 +805,10 @@ theorem IsQF.toPrenexImpRight {φ : L.BoundedFormula α n} :
∀ {ψ : L.BoundedFormula α n}, IsQF ψ → φ.toPrenexImpRight ψ = φ.imp ψ
| _, IsQF.falsum => rfl
| _, IsQF.of_isAtomic (IsAtomic.equal _ _) => rfl
- | _, IsQF.of_isAtomic (IsAtomic.Rel _ _) => rfl
+ | _, IsQF.of_isAtomic (IsAtomic.rel _ _) => rfl
| _, IsQF.imp IsQF.falsum _ => rfl
| _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.equal _ _)) _ => rfl
- | _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.Rel _ _)) _ => rfl
+ | _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.rel _ _)) _ => rfl
| _, IsQF.imp (IsQF.imp _ _) _ => rfl
#align first_order.language.bounded_formula.is_qf.to_prenex_imp_right FirstOrder.Language.BoundedFormula.IsQF.toPrenexImpRight
@@ -836,10 +835,10 @@ theorem IsQF.toPrenexImp :
∀ {φ ψ : L.BoundedFormula α n}, φ.IsQF → φ.toPrenexImp ψ = φ.toPrenexImpRight ψ
| _, _, IsQF.falsum => rfl
| _, _, IsQF.of_isAtomic (IsAtomic.equal _ _) => rfl
- | _, _, IsQF.of_isAtomic (IsAtomic.Rel _ _) => rfl
+ | _, _, IsQF.of_isAtomic (IsAtomic.rel _ _) => rfl
| _, _, IsQF.imp IsQF.falsum _ => rfl
| _, _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.equal _ _)) _ => rfl
- | _, _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.Rel _ _)) _ => rfl
+ | _, _, IsQF.imp (IsQF.of_isAtomic (IsAtomic.rel _ _)) _ => rfl
| _, _, IsQF.imp (IsQF.imp _ _) _ => rfl
#align first_order.language.bounded_formula.is_qf.to_prenex_imp FirstOrder.Language.BoundedFormula.IsQF.toPrenexImp
@@ -853,19 +852,19 @@ theorem isPrenex_toPrenexImp {φ ψ : L.BoundedFormula α n} (hφ : IsPrenex φ)
#align first_order.language.bounded_formula.is_prenex_to_prenex_imp FirstOrder.Language.BoundedFormula.isPrenex_toPrenexImp
--Porting note: universes in different order
-/-- For any bounded formula `φ`, `φ.to_prenex` is a semantically-equivalent formula in prenex normal
+/-- For any bounded formula `φ`, `φ.toPrenex` is a semantically-equivalent formula in prenex normal
form. -/
def toPrenex : ∀ {n}, L.BoundedFormula α n → L.BoundedFormula α n
| _, falsum => ⊥
| _, equal t₁ t₂ => t₁.bdEqual t₂
- | _, Rel R ts => Rel R ts
+ | _, rel R ts => rel R ts
| _, imp f₁ f₂ => f₁.toPrenex.toPrenexImp f₂.toPrenex
| _, all f => f.toPrenex.all
#align first_order.language.bounded_formula.to_prenex FirstOrder.Language.BoundedFormula.toPrenex
theorem toPrenex_isPrenex (φ : L.BoundedFormula α n) : φ.toPrenex.IsPrenex :=
BoundedFormula.recOn φ isQF_bot.isPrenex (fun _ _ => (IsAtomic.equal _ _).isPrenex)
- (fun _ _ => (IsAtomic.Rel _ _).isPrenex) (fun _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
+ (fun _ _ => (IsAtomic.rel _ _).isPrenex) (fun _ _ h1 h2 => isPrenex_toPrenexImp h1 h2)
fun _ => IsPrenex.all
#align first_order.language.bounded_formula.to_prenex_is_prenex FirstOrder.Language.BoundedFormula.toPrenex_isPrenex
@@ -881,7 +880,7 @@ open BoundedFormula
def onBoundedFormula (g : L →ᴸ L') : ∀ {k : ℕ}, L.BoundedFormula α k → L'.BoundedFormula α k
| _k, falsum => falsum
| _k, equal t₁ t₂ => (g.onTerm t₁).bdEqual (g.onTerm t₂)
- | _k, Rel R ts => (g.onRelation R).boundedFormula (g.onTerm ∘ ts)
+ | _k, rel R ts => (g.onRelation R).boundedFormula (g.onTerm ∘ ts)
| _k, imp f₁ f₂ => (onBoundedFormula g f₁).imp (onBoundedFormula g f₂)
| _k, all f => (onBoundedFormula g f).all
set_option linter.uppercaseLean3 false in
The diff is not very helpful, but I made sure the comments about the notation were closer to the notation they were about by removing a newline above and adding one below.
@@ -996,22 +996,22 @@ set_option linter.uppercaseLean3 false in
end LEquiv
scoped[FirstOrder] infixl:88 " =' " => FirstOrder.Language.Term.bdEqual
-
-- input \~- or \simeq
-scoped[FirstOrder] infixr:62 " ⟹ " => FirstOrder.Language.BoundedFormula.imp
+scoped[FirstOrder] infixr:62 " ⟹ " => FirstOrder.Language.BoundedFormula.imp
-- input \==>
+
scoped[FirstOrder] prefix:110 "∀'" => FirstOrder.Language.BoundedFormula.all
scoped[FirstOrder] prefix:arg "∼" => FirstOrder.Language.BoundedFormula.not
-
-- input \~, the ASCII character ~ has too low precedence
-scoped[FirstOrder] infixl:61 " ⇔ " => FirstOrder.Language.BoundedFormula.iff
+scoped[FirstOrder] infixl:61 " ⇔ " => FirstOrder.Language.BoundedFormula.iff
-- input \<=>
-scoped[FirstOrder] prefix:110 "∃'" => FirstOrder.Language.BoundedFormula.ex
+scoped[FirstOrder] prefix:110 "∃'" => FirstOrder.Language.BoundedFormula.ex
-- input \ex
+
namespace Formula
/-- Relabels a formula's variables along a particular function. -/
The unported dependencies are