fact stringlengths 6 3.84k | type stringclasses 11
values | library stringclasses 32
values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
mem_compl : x ∈ sᶜ ↔ x ∉ s :=
Iff.rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | mem_compl | null |
mem_sdiff : x ∈ s \ t ↔ x ∈ s ∧ x ∉ t :=
Iff.rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | mem_sdiff | null |
coe_top : ((⊤ : L.DefinableSet A α) : Set (α → M)) = univ :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_top | null |
coe_bot : ((⊥ : L.DefinableSet A α) : Set (α → M)) = ∅ :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_bot | null |
coe_sup (s t : L.DefinableSet A α) :
((s ⊔ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) ∪ (t : Set (α → M)) :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_sup | null |
coe_inf (s t : L.DefinableSet A α) :
((s ⊓ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) ∩ (t : Set (α → M)) :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_inf | null |
coe_compl (s : L.DefinableSet A α) :
((sᶜ : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M))ᶜ :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_compl | null |
coe_sdiff (s t : L.DefinableSet A α) :
((s \ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) \ (t : Set (α → M)) :=
rfl
@[simp, norm_cast] | theorem | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_sdiff | null |
coe_himp (s t : L.DefinableSet A α) : ↑(s ⇨ t) = (s ⇨ t : Set (α → M)) := rfl | lemma | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | coe_himp | null |
noncomputable instBooleanAlgebra : BooleanAlgebra (L.DefinableSet A α) :=
Function.Injective.booleanAlgebra (α := L.DefinableSet A α) _ Subtype.coe_injective
coe_sup coe_inf coe_top coe_bot coe_compl coe_sdiff coe_himp | instance | ModelTheory | [
"Mathlib.Data.SetLike.Basic",
"Mathlib.ModelTheory.Semantics"
] | Mathlib/ModelTheory/Definability.lean | instBooleanAlgebra | null |
natLERec (m n : ℕ) (h : m ≤ n) : G' m ↪[L] G' n :=
Nat.leRecOn h (@fun k g => (f' k).comp g) (Embedding.refl L _)
@[simp] | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | natLERec | Given a chain of embeddings of structures indexed by `ℕ`, defines a `DirectedSystem` by
composing them. |
coe_natLERec (m n : ℕ) (h : m ≤ n) :
(natLERec f' m n h : G' m → G' n) = Nat.leRecOn h (@fun k => f' k) := by
obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le h
ext x
induction k with
| zero =>
erw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self]
| succ k ih =>
erw [Nat.leRecOn_succ ... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | coe_natLERec | null |
natLERec.directedSystem : DirectedSystem G' fun i j h => natLERec f' i j h :=
⟨fun _ _ => congr (congr rfl (Nat.leRecOn_self _)) rfl,
fun _ _ _ hij hjk => by simp [Nat.leRecOn_trans hij hjk]⟩ | instance | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | natLERec.directedSystem | null |
@[nolint unusedArguments]
protected Structure.Sigma (f : ∀ i j, i ≤ j → G i ↪[L] G j) := Σ i, G i
local notation "Σˣ" => Structure.Sigma | abbrev | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Structure.Sigma | Alias for `Σ i, G i`.
Instead of `Σ i, G i`, we use the alias `Language.Structure.Sigma` which depends on `f`.
This way, Lean can infer what `L` and `f` are in the `Setoid` instance.
Otherwise we have a "cannot find synthesization order" error.
See also the discussion at
https://leanprover.zulipchat.com/#narrow/stream... |
Structure.Sigma.mk (i : ι) (x : G i) : Σˣ f := ⟨i, x⟩ | abbrev | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Structure.Sigma.mk | Constructor for `FirstOrder.Language.Structure.Sigma` alias. |
unify {α : Type*} (x : α → Σˣ f) (i : ι) (h : i ∈ upperBounds (range (Sigma.fst ∘ x)))
(a : α) : G i :=
f (x a).1 i (h (mem_range_self a)) (x a).2
variable [DirectedSystem G fun i j h => f i j h]
@[simp] | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | unify | Raises a family of elements in the `Σ`-type to the same level along the embeddings. |
unify_sigma_mk_self {α : Type*} {i : ι} {x : α → G i} :
(unify f (fun a => .mk f i (x a)) i fun _ ⟨_, hj⟩ =>
_root_.trans (le_of_eq hj.symm) (refl _)) = x := by
ext a
rw [unify]
apply DirectedSystem.map_self | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | unify_sigma_mk_self | null |
comp_unify {α : Type*} {x : α → Σˣ f} {i j : ι} (ij : i ≤ j)
(h : i ∈ upperBounds (range (Sigma.fst ∘ x))) :
f i j ij ∘ unify f x i h = unify f x j
fun k hk => _root_.trans (mem_upperBounds.1 h k hk) ij := by
ext a
simp [unify, DirectedSystem.map_map] | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | comp_unify | null |
setoid [DirectedSystem G fun i j h => f i j h] [IsDirected ι (· ≤ ·)] : Setoid (Σˣ f) where
r := fun ⟨i, x⟩ ⟨j, y⟩ => ∃ (k : ι) (ik : i ≤ k) (jk : j ≤ k), f i k ik x = f j k jk y
iseqv :=
⟨fun ⟨i, _⟩ => ⟨i, refl i, refl i, rfl⟩, @fun ⟨_, _⟩ ⟨_, _⟩ ⟨k, ik, jk, h⟩ =>
⟨k, jk, ik, h.symm⟩,
@fun ⟨i, x⟩ ⟨... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | setoid | The directed limit glues together the structures along the embeddings. |
noncomputable sigmaStructure [IsDirected ι (· ≤ ·)] [Nonempty ι] : L.Structure (Σˣ f) where
funMap F x :=
⟨_,
funMap F
(unify f x (Classical.choose (Finite.bddAbove_range fun a => (x a).1))
(Classical.choose_spec (Finite.bddAbove_range fun a => (x a).1)))⟩
RelMap R x :=
RelMap R
... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | sigmaStructure | The structure on the `Σ`-type which becomes the structure on the direct limit after quotienting. |
DirectLimit [DirectedSystem G fun i j h => f i j h] [IsDirected ι (· ≤ ·)] :=
Quotient (DirectLimit.setoid G f)
attribute [local instance] DirectLimit.setoid DirectLimit.sigmaStructure | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | DirectLimit | The direct limit of a directed system is the structures glued together along the embeddings. |
equiv_iff {x y : Σˣ f} {i : ι} (hx : x.1 ≤ i) (hy : y.1 ≤ i) :
x ≈ y ↔ (f x.1 i hx) x.2 = (f y.1 i hy) y.2 := by
cases x
cases y
refine ⟨fun xy => ?_, fun xy => ⟨i, hx, hy, xy⟩⟩
obtain ⟨j, _, _, h⟩ := xy
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j
have h := congr_arg (f j k jk) h
apply (f i k ik).in... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | equiv_iff | null |
funMap_unify_equiv {n : ℕ} (F : L.Functions n) (x : Fin n → Σˣ f) (i j : ι)
(hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) (hj : j ∈ upperBounds (range (Sigma.fst ∘ x))) :
Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ .mk f j (funMap F (unify f x j hj)) := by
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | funMap_unify_equiv | null |
relMap_unify_equiv {n : ℕ} (R : L.Relations n) (x : Fin n → Σˣ f) (i j : ι)
(hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) (hj : j ∈ upperBounds (range (Sigma.fst ∘ x))) :
RelMap R (unify f x i hi) = RelMap R (unify f x j hj) := by
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j
rw [← (f i k ik).map_rel, comp... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | relMap_unify_equiv | null |
exists_unify_eq {α : Type*} [Finite α] {x y : α → Σˣ f} (xy : x ≈ y) :
∃ (i : ι) (hx : i ∈ upperBounds (range (Sigma.fst ∘ x)))
(hy : i ∈ upperBounds (range (Sigma.fst ∘ y))), unify f x i hx = unify f y i hy := by
obtain ⟨i, hi⟩ := Finite.bddAbove_range (Sum.elim (fun a => (x a).1) fun a => (y a).1)
rw [S... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | exists_unify_eq | null |
funMap_equiv_unify {n : ℕ} (F : L.Functions n) (x : Fin n → Σˣ f) (i : ι)
(hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) :
funMap F x ≈ .mk f _ (funMap F (unify f x i hi)) :=
funMap_unify_equiv G f F x (Classical.choose (Finite.bddAbove_range fun a => (x a).1)) i _ hi | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | funMap_equiv_unify | null |
relMap_equiv_unify {n : ℕ} (R : L.Relations n) (x : Fin n → Σˣ f) (i : ι)
(hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) :
RelMap R x = RelMap R (unify f x i hi) :=
relMap_unify_equiv G f R x (Classical.choose (Finite.bddAbove_range fun a => (x a).1)) i _ hi | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | relMap_equiv_unify | null |
noncomputable prestructure : L.Prestructure (DirectLimit.setoid G f) where
toStructure := sigmaStructure G f
fun_equiv {n} {F} x y xy := by
obtain ⟨i, hx, hy, h⟩ := exists_unify_eq G f xy
refine
Setoid.trans (funMap_equiv_unify G f F x i hx)
(Setoid.trans ?_ (Setoid.symm (funMap_equiv_unify G ... | instance | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | prestructure | The direct limit `setoid` respects the structure `sigmaStructure`, so quotienting by it
gives rise to a valid structure. |
noncomputable instStructureDirectLimit : L.Structure (DirectLimit G f) :=
Language.quotientStructure
@[simp] | instance | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | instStructureDirectLimit | The `L.Structure` on a direct limit of `L.Structure`s. |
funMap_quotient_mk'_sigma_mk' {n : ℕ} {F : L.Functions n} {i : ι} {x : Fin n → G i} :
funMap F (fun a => (⟦.mk f i (x a)⟧ : DirectLimit G f)) = ⟦.mk f i (funMap F x)⟧ := by
simp only [funMap_quotient_mk', Quotient.eq]
obtain ⟨k, ik, jk⟩ :=
directed_of (· ≤ ·) i (Classical.choose (Finite.bddAbove_range fun _... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | funMap_quotient_mk'_sigma_mk' | null |
relMap_quotient_mk'_sigma_mk' {n : ℕ} {R : L.Relations n} {i : ι} {x : Fin n → G i} :
RelMap R (fun a => (⟦.mk f i (x a)⟧ : DirectLimit G f)) = RelMap R x := by
rw [relMap_quotient_mk']
obtain ⟨k, _, _⟩ :=
directed_of (· ≤ ·) i (Classical.choose (Finite.bddAbove_range fun _ : Fin n => i))
rw [relMap_equiv... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | relMap_quotient_mk'_sigma_mk' | null |
exists_quotient_mk'_sigma_mk'_eq {α : Type*} [Finite α] (x : α → DirectLimit G f) :
∃ (i : ι) (y : α → G i), x = fun a => ⟦.mk f i (y a)⟧ := by
obtain ⟨i, hi⟩ := Finite.bddAbove_range fun a => (x a).out.1
refine ⟨i, unify f (Quotient.out ∘ x) i hi, ?_⟩
ext a
rw [Quotient.eq_mk_iff_out, unify]
generalize_p... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | exists_quotient_mk'_sigma_mk'_eq | null |
noncomputable of (i : ι) : G i ↪[L] DirectLimit G f where
toFun := fun a => ⟦.mk f i a⟧
inj' x y h := by
rw [Quotient.eq] at h
obtain ⟨j, h1, _, h3⟩ := h
exact (f i j h1).injective h3
map_fun' F x := by
rw [← funMap_quotient_mk'_sigma_mk']
rfl
map_rel' := by
intro n R x
change RelMap... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | of | The canonical map from a component to the direct limit. |
of_apply {i : ι} {x : G i} : of L ι G f i x = ⟦.mk f i x⟧ :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | of_apply | null |
of_f {i j : ι} {hij : i ≤ j} {x : G i} : of L ι G f j (f i j hij x) = of L ι G f i x := by
rw [of_apply, of_apply, Quotient.eq]
refine Setoid.symm ⟨j, hij, refl j, ?_⟩
simp only [DirectedSystem.map_self] | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | of_f | null |
exists_of (z : DirectLimit G f) : ∃ i x, of L ι G f i x = z :=
⟨z.out.1, z.out.2, by simp⟩
@[elab_as_elim] | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | exists_of | Every element of the direct limit corresponds to some element in
some component of the directed system. |
protected inductionOn {C : DirectLimit G f → Prop} (z : DirectLimit G f)
(ih : ∀ i x, C (of L ι G f i x)) : C z :=
let ⟨i, x, h⟩ := exists_of z
h ▸ ih i x | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | inductionOn | null |
iSup_range_of_eq_top : ⨆ i, (of L ι G f i).toHom.range = ⊤ :=
eq_top_iff.2 (fun x _ ↦ DirectLimit.inductionOn x
(fun i _ ↦ le_iSup (fun i ↦ Hom.range (Embedding.toHom (of L ι G f i))) i (mem_range_self _))) | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | iSup_range_of_eq_top | null |
exists_fg_substructure_in_Sigma (S : L.Substructure (DirectLimit G f)) (S_fg : S.FG) :
∃ i, ∃ T : L.Substructure (G i), T.map (of L ι G f i).toHom = S := by
let ⟨A, A_closure⟩ := S_fg
let ⟨i, y, eq_y⟩ := exists_quotient_mk'_sigma_mk'_eq G _ (fun a : A ↦ a.1)
use i
use Substructure.closure L (range y)
rw [... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | exists_fg_substructure_in_Sigma | Every finitely generated substructure of the direct limit corresponds to some
substructure in some component of the directed system. |
noncomputable lift (g : ∀ i, G i ↪[L] P) (Hg : ∀ i j hij x, g j (f i j hij x) = g i x) :
DirectLimit G f ↪[L] P where
toFun :=
Quotient.lift (fun x : Σˣ f => (g x.1) x.2) fun x y xy => by
simp only
obtain ⟨i, hx, hy⟩ := directed_of (· ≤ ·) x.1 y.1
rw [← Hg x.1 i hx, ← Hg y.1 i hy]
exac... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | lift | The universal property of the direct limit: maps from the components to another module
that respect the directed system structure (i.e. make some diagram commute) give rise
to a unique map out of the direct limit. |
lift_quotient_mk'_sigma_mk' {i} (x : G i) : lift L ι G f g Hg ⟦.mk f i x⟧ = (g i) x := by
change (lift L ι G f g Hg).toFun ⟦.mk f i x⟧ = _
simp only [lift, Quotient.lift_mk] | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | lift_quotient_mk'_sigma_mk' | null |
lift_of {i} (x : G i) : lift L ι G f g Hg (of L ι G f i x) = g i x := by simp | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | lift_of | null |
lift_unique (F : DirectLimit G f ↪[L] P) (x) :
F x =
lift L ι G f (fun i => F.comp <| of L ι G f i)
(fun i j hij x => by rw [F.comp_apply, F.comp_apply, of_f]) x :=
DirectLimit.inductionOn x fun i x => by rw [lift_of]; rfl | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | lift_unique | null |
range_lift : (lift L ι G f g Hg).toHom.range = ⨆ i, (g i).toHom.range := by
simp_rw [Hom.range_eq_map]
rw [← iSup_range_of_eq_top, Substructure.map_iSup]
simp_rw [Hom.range_eq_map, Substructure.map_map]
rfl
variable (L ι G f)
variable (G' : ι → Type w') [∀ i, L.Structure (G' i)]
variable (f' : ∀ i j, i ≤ j → G'... | lemma | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | range_lift | null |
noncomputable equiv_lift (H_commuting : ∀ i j hij x, g j (f i j hij x) = f' i j hij (g i x)) :
DirectLimit G f ≃[L] DirectLimit G' f' := by
let U i : G i ↪[L] DirectLimit G' f' := (of L _ G' f' i).comp (g i).toEmbedding
let F : DirectLimit G f ↪[L] DirectLimit G' f' := lift L _ G f U <| by
intro _ _ _ _
... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | equiv_lift | The isomorphism between limits of isomorphic systems. |
equiv_lift_of {i : ι} (x : G i) :
equiv_lift L ι G f G' f' g H_commuting (of L ι G f i x) = of L ι G' f' i (g i x) := rfl
variable {L ι G f} | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | equiv_lift_of | null |
cg {ι : Type*} [Countable ι] [Preorder ι] [IsDirected ι (· ≤ ·)] [Nonempty ι]
{G : ι → Type w} [∀ i, L.Structure (G i)] (f : ∀ i j, i ≤ j → G i ↪[L] G j)
(h : ∀ i, Structure.CG L (G i)) [DirectedSystem G fun i j h => f i j h] :
Structure.CG L (DirectLimit G f) := by
refine ⟨⟨⋃ i, DirectLimit.of L ι G f i ... | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | cg | The direct limit of countably many countably generated structures is countably generated. |
cg' {ι : Type*} [Countable ι] [Preorder ι] [IsDirected ι (· ≤ ·)] [Nonempty ι]
{G : ι → Type w} [∀ i, L.Structure (G i)] (f : ∀ i j, i ≤ j → G i ↪[L] G j)
[h : ∀ i, Structure.CG L (G i)] [DirectedSystem G fun i j h => f i j h] :
Structure.CG L (DirectLimit G f) :=
cg f h | instance | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | cg' | null |
noncomputable liftInclusion :
DirectLimit (fun i ↦ S i) (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) ↪[L] M :=
DirectLimit.lift L ι (fun i ↦ S i) (fun _ _ h ↦ Substructure.inclusion (S.monotone h))
(fun _ ↦ Substructure.subtype _) (fun _ _ _ _ ↦ rfl) | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | liftInclusion | The map from a direct limit of a system of substructures of `M` into `M`. |
liftInclusion_of {i : ι} (x : S i) :
(liftInclusion S) (of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i x)
= Substructure.subtype (S i) x := rfl | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | liftInclusion_of | null |
rangeLiftInclusion : (liftInclusion S).toHom.range = ⨆ i, S i := by
simp_rw [liftInclusion, range_lift, Substructure.range_subtype] | lemma | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | rangeLiftInclusion | null |
noncomputable Equiv_iSup :
DirectLimit (fun i ↦ S i) (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) ≃[L]
(iSup S : L.Substructure M) := by
have liftInclusion_in_sup : ∀ x, liftInclusion S x ∈ (⨆ i, S i) := by
simp only [← rangeLiftInclusion, Hom.mem_range, Embedding.coe_toHom]
intro x; use x
le... | def | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Equiv_iSup | The isomorphism between a direct limit of a system of substructures and their union. |
Equiv_isup_of_apply {i : ι} (x : S i) :
Equiv_iSup S (of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i x)
= Substructure.inclusion (le_iSup _ _) x := rfl | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Equiv_isup_of_apply | null |
Equiv_isup_symm_inclusion_apply {i : ι} (x : S i) :
(Equiv_iSup S).symm (Substructure.inclusion (le_iSup _ _) x)
= of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i x := by
apply (Equiv_iSup S).injective
simp only [Equiv.apply_symm_apply]
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Equiv_isup_symm_inclusion_apply | null |
Equiv_isup_symm_inclusion (i : ι) :
(Equiv_iSup S).symm.toEmbedding.comp (Substructure.inclusion (le_iSup _ _))
= of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i := by
ext x; exact Equiv_isup_symm_inclusion_apply _ x | theorem | ModelTheory | [
"Mathlib.Data.Finite.Sum",
"Mathlib.Data.Fintype.Order",
"Mathlib.ModelTheory.FinitelyGenerated",
"Mathlib.ModelTheory.Quotients",
"Mathlib.Order.DirectedInverseSystem"
] | Mathlib/ModelTheory/DirectLimit.lean | Equiv_isup_symm_inclusion | null |
ElementaryEmbedding where
/-- The underlying embedding -/
toFun : M → N
map_formula' :
∀ ⦃n⦄ (φ : L.Formula (Fin n)) (x : Fin n → M), φ.Realize (toFun ∘ x) ↔ φ.Realize x := by
aesop
@[inherit_doc FirstOrder.Language.ElementaryEmbedding]
scoped[FirstOrder] notation:25 A " ↪ₑ[" L "] " B => FirstOrder.Langua... | structure | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | ElementaryEmbedding | An elementary embedding of first-order structures is an embedding that commutes with the
realizations of formulas. |
instFunLike : FunLike (M ↪ₑ[L] N) M N where
coe f := f.toFun
coe_injective' f g h := by
cases f
cases g
simpa only [ElementaryEmbedding.mk.injEq]
@[simp] | instance | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | instFunLike | null |
map_boundedFormula (f : M ↪ₑ[L] N) {α : Type*} {n : ℕ} (φ : L.BoundedFormula α n)
(v : α → M) (xs : Fin n → M) : φ.Realize (f ∘ v) (f ∘ xs) ↔ φ.Realize v xs := by
classical
rw [← BoundedFormula.realize_restrictFreeVar' Set.Subset.rfl, Set.inclusion_eq_id, iff_eq_eq]
have h :=
f.map_formula' ((φ.rest... | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_boundedFormula | null |
map_formula (f : M ↪ₑ[L] N) {α : Type*} (φ : L.Formula α) (x : α → M) :
φ.Realize (f ∘ x) ↔ φ.Realize x := by
rw [Formula.Realize, Formula.Realize, ← f.map_boundedFormula, Unique.eq_default (f ∘ default)] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_formula | null |
map_sentence (f : M ↪ₑ[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ := by
rw [Sentence.Realize, Sentence.Realize, ← f.map_formula, Unique.eq_default (f ∘ default)] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_sentence | null |
theory_model_iff (f : M ↪ₑ[L] N) (T : L.Theory) : M ⊨ T ↔ N ⊨ T := by
simp only [Theory.model_iff, f.map_sentence] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | theory_model_iff | null |
elementarilyEquivalent (f : M ↪ₑ[L] N) : M ≅[L] N :=
elementarilyEquivalent_iff.2 f.map_sentence
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | elementarilyEquivalent | null |
injective (φ : M ↪ₑ[L] N) : Function.Injective φ := by
intro x y
have h :=
φ.map_formula ((var 0).equal (var 1) : L.Formula (Fin 2)) fun i => if i = 0 then x else y
rw [Formula.realize_equal, Formula.realize_equal] at h
simp only [Term.realize, Fin.one_eq_zero_iff, if_true,
Function.comp_apply] at h
e... | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | injective | null |
embeddingLike : EmbeddingLike (M ↪ₑ[L] N) M N :=
{ show FunLike (M ↪ₑ[L] N) M N from inferInstance with injective' := injective }
@[simp] | instance | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | embeddingLike | null |
map_fun (φ : M ↪ₑ[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
φ (funMap f x) = funMap f (φ ∘ x) := by
have h := φ.map_formula (Formula.graph f) (Fin.cons (funMap f x) x)
rw [Formula.realize_graph, Fin.comp_cons, Formula.realize_graph] at h
rw [eq_comm, h]
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_fun | null |
map_rel (φ : M ↪ₑ[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
RelMap r (φ ∘ x) ↔ RelMap r x :=
haveI h := φ.map_formula (r.formula var) x
h | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_rel | null |
strongHomClass : StrongHomClass L (M ↪ₑ[L] N) M N where
map_fun := map_fun
map_rel := map_rel
@[simp] | instance | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | strongHomClass | null |
map_constants (φ : M ↪ₑ[L] N) (c : L.Constants) : φ c = c :=
HomClass.map_constants φ c | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | map_constants | null |
toEmbedding (f : M ↪ₑ[L] N) : M ↪[L] N where
toFun := f
inj' := f.injective
map_fun' {_} f x := by simp
map_rel' {_} R x := by simp | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toEmbedding | An elementary embedding is also a first-order embedding. |
toHom (f : M ↪ₑ[L] N) : M →[L] N where
toFun := f
map_fun' {_} f x := by simp
map_rel' {_} R x := by simp
@[simp] | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toHom | An elementary embedding is also a first-order homomorphism. |
toEmbedding_toHom (f : M ↪ₑ[L] N) : f.toEmbedding.toHom = f.toHom :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toEmbedding_toHom | null |
coe_toHom {f : M ↪ₑ[L] N} : (f.toHom : M → N) = (f : M → N) :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | coe_toHom | null |
coe_toEmbedding (f : M ↪ₑ[L] N) : (f.toEmbedding : M → N) = (f : M → N) :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | coe_toEmbedding | null |
coe_injective : @Function.Injective (M ↪ₑ[L] N) (M → N) (↑) :=
DFunLike.coe_injective
@[ext] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | coe_injective | null |
ext ⦃f g : M ↪ₑ[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
DFunLike.ext f g h
variable (L) (M) | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | ext | null |
@[refl]
refl : M ↪ₑ[L] M where toFun := id
variable {L} {M} | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | refl | The identity elementary embedding from a structure to itself |
@[simp]
refl_apply (x : M) : refl L M x = x :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | refl_apply | null |
@[trans]
comp (hnp : N ↪ₑ[L] P) (hmn : M ↪ₑ[L] N) : M ↪ₑ[L] P where
toFun := hnp ∘ hmn
map_formula' n φ x := by
obtain ⟨_, hhnp⟩ := hnp
obtain ⟨_, hhmn⟩ := hmn
erw [hhnp, hhmn]
@[simp] | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | comp | Composition of elementary embeddings |
comp_apply (g : N ↪ₑ[L] P) (f : M ↪ₑ[L] N) (x : M) : g.comp f x = g (f x) :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | comp_apply | null |
comp_assoc (f : M ↪ₑ[L] N) (g : N ↪ₑ[L] P) (h : P ↪ₑ[L] Q) :
(h.comp g).comp f = h.comp (g.comp f) :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | comp_assoc | Composition of elementary embeddings is associative. |
elementaryDiagram : L[[M]].Theory :=
L[[M]].completeTheory M | abbrev | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | elementaryDiagram | The elementary diagram of an `L`-structure is the set of all sentences with parameters it
satisfies. |
@[simps]
ElementaryEmbedding.ofModelsElementaryDiagram (N : Type*) [L.Structure N] [L[[M]].Structure N]
[(lhomWithConstants L M).IsExpansionOn N] [N ⊨ L.elementaryDiagram M] : M ↪ₑ[L] N :=
⟨((↑) : L[[M]].Constants → N) ∘ Sum.inr, fun n φ x => by
refine
_root_.trans ?_
((realize_iff_of_model_comp... | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | ElementaryEmbedding.ofModelsElementaryDiagram | The canonical elementary embedding of an `L`-structure into any model of its elementary diagram |
isElementary_of_exists (f : M ↪[L] N)
(htv :
∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → M) (a : N),
φ.Realize default (Fin.snoc (f ∘ x) a : _ → N) →
∃ b : M, φ.Realize default (Fin.snoc (f ∘ x) (f b) : _ → N)) :
∀ {n} (φ : L.Formula (Fin n)) (x : Fin n → M), φ.Realize (f... | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | isElementary_of_exists | The **Tarski-Vaught test** for elementarity of an embedding. |
@[simps]
toElementaryEmbedding (f : M ↪[L] N)
(htv :
∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → M) (a : N),
φ.Realize default (Fin.snoc (f ∘ x) a : _ → N) →
∃ b : M, φ.Realize default (Fin.snoc (f ∘ x) (f b) : _ → N)) :
M ↪ₑ[L] N :=
⟨f, fun _ => f.isElementary_of_exist... | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toElementaryEmbedding | Bundles an embedding satisfying the Tarski-Vaught test as an elementary embedding. |
toElementaryEmbedding (f : M ≃[L] N) : M ↪ₑ[L] N where
toFun := f
@[simp] | def | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toElementaryEmbedding | A first-order equivalence is also an elementary embedding. |
toElementaryEmbedding_toEmbedding (f : M ≃[L] N) :
f.toElementaryEmbedding.toEmbedding = f.toEmbedding :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | toElementaryEmbedding_toEmbedding | null |
coe_toElementaryEmbedding (f : M ≃[L] N) :
(f.toElementaryEmbedding : M → N) = (f : M → N) :=
rfl | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | coe_toElementaryEmbedding | null |
@[simp]
realize_term_substructure {α : Type*} {S : L.Substructure M} (v : α → S) (t : L.Term α) :
t.realize ((↑) ∘ v) = (↑(t.realize v) : M) :=
HomClass.realize_term S.subtype | theorem | ModelTheory | [
"Mathlib.Data.Fintype.Basic",
"Mathlib.ModelTheory.Substructures"
] | Mathlib/ModelTheory/ElementaryMaps.lean | realize_term_substructure | null |
Substructure.IsElementary (S : L.Substructure M) : Prop :=
∀ ⦃n⦄ (φ : L.Formula (Fin n)) (x : Fin n → S), φ.Realize (((↑) : _ → M) ∘ x) ↔ φ.Realize x
variable (L M) | def | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | Substructure.IsElementary | A substructure is elementary when every formula applied to a tuple in the substructure
agrees with its value in the overall structure. |
ElementarySubstructure where
/-- The underlying substructure -/
toSubstructure : L.Substructure M
isElementary' : toSubstructure.IsElementary
variable {L M} | structure | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | ElementarySubstructure | An elementary substructure is one in which every formula applied to a tuple in the substructure
agrees with its value in the overall structure. |
instCoe : Coe (L.ElementarySubstructure M) (L.Substructure M) :=
⟨ElementarySubstructure.toSubstructure⟩ | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | instCoe | null |
instSetLike : SetLike (L.ElementarySubstructure M) M :=
⟨fun x => x.toSubstructure.carrier, fun ⟨⟨s, hs1⟩, hs2⟩ ⟨⟨t, ht1⟩, _⟩ _ => by
congr⟩ | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | instSetLike | null |
inducedStructure (S : L.ElementarySubstructure M) : L.Structure S :=
Substructure.inducedStructure
@[simp] | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | inducedStructure | null |
isElementary (S : L.ElementarySubstructure M) : (S : L.Substructure M).IsElementary :=
S.isElementary' | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | isElementary | null |
subtype (S : L.ElementarySubstructure M) : S ↪ₑ[L] M where
toFun := (↑)
map_formula' := S.isElementary
@[simp] | def | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | subtype | The natural embedding of an `L.Substructure` of `M` into `M`. |
subtype_apply {S : L.ElementarySubstructure M} {x : S} : subtype S x = x :=
rfl | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | subtype_apply | null |
subtype_injective (S : L.ElementarySubstructure M) : Function.Injective (subtype S) :=
Subtype.coe_injective
@[simp] | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | subtype_injective | null |
coe_subtype (S : L.ElementarySubstructure M) : ⇑S.subtype = Subtype.val :=
rfl | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | coe_subtype | null |
instTop : Top (L.ElementarySubstructure M) :=
⟨⟨⊤, fun _ _ _ => Substructure.realize_formula_top.symm⟩⟩ | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | instTop | The substructure `M` of the structure `M` is elementary. |
instInhabited : Inhabited (L.ElementarySubstructure M) :=
⟨⊤⟩
@[simp] | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementaryMaps"
] | Mathlib/ModelTheory/ElementarySubstructures.lean | instInhabited | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.