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 ⌀ |
|---|---|---|---|---|---|---|
coeFn_ofInjective [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
(ofInjective hf : M → N) = f :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | coeFn_ofInjective | null |
ofInjective_toHom [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
(ofInjective hf).toHom = f := by
ext; simp
variable (L) (M) | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | ofInjective_toHom | null |
@[refl]
refl : M ↪[L] M where toEmbedding := Function.Embedding.refl M
variable {L} {M} | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl | The identity embedding from a structure to itself. |
@[simp]
refl_apply (x : M) : refl L M x = x :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_apply | null |
@[trans]
comp (hnp : N ↪[L] P) (hmn : M ↪[L] N) : M ↪[L] P where
toFun := hnp ∘ hmn
inj' := hnp.injective.comp hmn.injective
map_fun' := by intros; simp only [Function.comp_apply, map_fun]; trivial
map_rel' := by intros; rw [Function.comp_assoc, map_rel, map_rel]
@[simp] | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp | Composition of first-order embeddings. |
comp_apply (g : N ↪[L] P) (f : M ↪[L] N) (x : M) : g.comp f x = g (f x) :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.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.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_assoc | Composition of first-order embeddings is associative. |
comp_injective (h : N ↪[L] P) :
Function.Injective (h.comp : (M ↪[L] N) → (M ↪[L] P)) := by
intro f g hfg
ext x; exact h.injective (DFunLike.congr_fun hfg x)
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_injective | null |
comp_inj (h : N ↪[L] P) (f g : M ↪[L] N) : h.comp f = h.comp g ↔ f = g :=
⟨fun eq ↦ h.comp_injective eq, congr_arg h.comp⟩ | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_inj | null |
toHom_comp_injective (h : N ↪[L] P) :
Function.Injective (h.toHom.comp : (M →[L] N) → (M →[L] P)) := by
intro f g hfg
ext x; exact h.injective (DFunLike.congr_fun hfg x)
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toHom_comp_injective | null |
toHom_comp_inj (h : N ↪[L] P) (f g : M →[L] N) : h.toHom.comp f = h.toHom.comp g ↔ f = g :=
⟨fun eq ↦ h.toHom_comp_injective eq, congr_arg h.toHom.comp⟩
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toHom_comp_inj | null |
comp_toHom (hnp : N ↪[L] P) (hmn : M ↪[L] N) :
(hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_toHom | null |
comp_refl (f : M ↪[L] N) : f.comp (refl L M) = f := DFunLike.coe_injective rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_refl | null |
refl_comp (f : M ↪[L] N) : (refl L N).comp f = f := DFunLike.coe_injective rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_comp | null |
refl_toHom : (refl L M).toHom = Hom.id L M :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_toHom | null |
@[simps] StrongHomClass.toEmbedding {F M N} [L.Structure M] [L.Structure N] [FunLike F M N]
[EmbeddingLike F M N] [StrongHomClass L F M N] : F → M ↪[L] N := fun φ =>
⟨⟨φ, EmbeddingLike.injective φ⟩, StrongHomClass.map_fun φ, StrongHomClass.map_rel φ⟩ | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | StrongHomClass.toEmbedding | Any element of an injective `StrongHomClass` can be realized as a first_order embedding. |
@[symm]
symm (f : M ≃[L] N) : N ≃[L] M :=
{ f.toEquiv.symm with
map_fun' := fun n f' {x} => by
simp only [Equiv.toFun_as_coe]
rw [Equiv.symm_apply_eq]
refine Eq.trans ?_ (f.map_fun' f' (f.toEquiv.symm ∘ x)).symm
rw [← Function.comp_assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp]
map_rel' := fun n r {x} => by
simp only [Equiv.toFun_as_coe]
refine (f.map_rel' r (f.toEquiv.symm ∘ x)).symm.trans ?_
rw [← Function.comp_assoc, Equiv.toFun_as_coe, Equiv.self_comp_symm, Function.id_comp] }
@[simp] | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm | The inverse of a first-order equivalence is a first-order equivalence. |
symm_symm (f : M ≃[L] N) :
f.symm.symm = f :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_symm | null |
symm_bijective : Function.Bijective (symm : (M ≃[L] N) → _) :=
Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_bijective | null |
apply_symm_apply (f : M ≃[L] N) (a : N) : f (f.symm a) = a :=
f.toEquiv.apply_symm_apply a
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | apply_symm_apply | null |
symm_apply_apply (f : M ≃[L] N) (a : M) : f.symm (f a) = a :=
f.toEquiv.symm_apply_apply a
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_apply_apply | null |
map_fun (φ : M ≃[L] N) {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
φ (funMap f x) = funMap f (φ ∘ x) :=
HomClass.map_fun φ f x
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | map_fun | null |
map_constants (φ : M ≃[L] N) (c : L.Constants) : φ c = c :=
HomClass.map_constants φ c
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | map_constants | null |
map_rel (φ : M ≃[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
RelMap r (φ ∘ x) ↔ RelMap r x :=
StrongHomClass.map_rel φ r x | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | map_rel | null |
toEmbedding : (M ≃[L] N) → M ↪[L] N :=
StrongHomClass.toEmbedding | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toEmbedding | A first-order equivalence is also a first-order embedding. |
toHom : (M ≃[L] N) → M →[L] N :=
HomClass.toHom
@[simp] | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toHom | A first-order equivalence is also a first-order homomorphism. |
toEmbedding_toHom (f : M ≃[L] N) : f.toEmbedding.toHom = f.toHom :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toEmbedding_toHom | null |
coe_toHom {f : M ≃[L] N} : (f.toHom : M → N) = (f : M → N) :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | coe_toHom | null |
coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M → N) :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | coe_toEmbedding | null |
injective_toEmbedding : Function.Injective (toEmbedding : (M ≃[L] N) → M ↪[L] N) := by
intro _ _ h; apply DFunLike.coe_injective; exact congr_arg (DFunLike.coe ∘ Embedding.toHom) h | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | injective_toEmbedding | null |
coe_injective : @Function.Injective (M ≃[L] N) (M → N) (↑) :=
DFunLike.coe_injective
@[ext] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | coe_injective | null |
ext ⦃f g : M ≃[L] N⦄ (h : ∀ x, f x = g x) : f = g :=
coe_injective (funext h) | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | ext | null |
bijective (f : M ≃[L] N) : Function.Bijective f :=
EquivLike.bijective f | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | bijective | null |
injective (f : M ≃[L] N) : Function.Injective f :=
EquivLike.injective f | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | injective | null |
surjective (f : M ≃[L] N) : Function.Surjective f :=
EquivLike.surjective f
variable (L) (M) | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | surjective | null |
@[refl]
refl : M ≃[L] M where toEquiv := _root_.Equiv.refl M
variable {L} {M} | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl | The identity equivalence from a structure to itself. |
@[simp]
refl_apply (x : M) : refl L M x = x := by simp [refl]; rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_apply | null |
@[trans]
comp (hnp : N ≃[L] P) (hmn : M ≃[L] N) : M ≃[L] P :=
{ hmn.toEquiv.trans hnp.toEquiv with
toFun := hnp ∘ hmn
map_fun' := by intros; simp only [Function.comp_apply, map_fun]; trivial
map_rel' := by intros; rw [Function.comp_assoc, map_rel, map_rel] }
@[simp] | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp | Composition of first-order equivalences. |
comp_apply (g : N ≃[L] P) (f : M ≃[L] N) (x : M) : g.comp f x = g (f x) :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_apply | null |
comp_refl (g : M ≃[L] N) : g.comp (refl L M) = g :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_refl | null |
refl_comp (g : M ≃[L] N) : (refl L N).comp g = g :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_comp | null |
refl_toEmbedding : (refl L M).toEmbedding = Embedding.refl L M :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_toEmbedding | null |
refl_toHom : (refl L M).toHom = Hom.id L M :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | refl_toHom | 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.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_assoc | Composition of first-order homomorphisms is associative. |
injective_comp (h : N ≃[L] P) :
Function.Injective (h.comp : (M ≃[L] N) → (M ≃[L] P)) := by
intro f g hfg
ext x; exact h.injective (congr_fun (congr_arg DFunLike.coe hfg) x)
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | injective_comp | null |
comp_toHom (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
(hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_toHom | null |
comp_toEmbedding (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
(hnp.comp hmn).toEmbedding = hnp.toEmbedding.comp hmn.toEmbedding :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_toEmbedding | null |
self_comp_symm (f : M ≃[L] N) : f.comp f.symm = refl L N := by
ext; rw [comp_apply, apply_symm_apply, refl_apply]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | self_comp_symm | null |
symm_comp_self (f : M ≃[L] N) : f.symm.comp f = refl L M := by
ext; rw [comp_apply, symm_apply_apply, refl_apply]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_comp_self | null |
symm_comp_self_toEmbedding (f : M ≃[L] N) :
f.symm.toEmbedding.comp f.toEmbedding = Embedding.refl L M := by
rw [← comp_toEmbedding, symm_comp_self, refl_toEmbedding]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_comp_self_toEmbedding | null |
self_comp_symm_toEmbedding (f : M ≃[L] N) :
f.toEmbedding.comp f.symm.toEmbedding = Embedding.refl L N := by
rw [← comp_toEmbedding, self_comp_symm, refl_toEmbedding]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | self_comp_symm_toEmbedding | null |
symm_comp_self_toHom (f : M ≃[L] N) :
f.symm.toHom.comp f.toHom = Hom.id L M := by
rw [← comp_toHom, symm_comp_self, refl_toHom]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | symm_comp_self_toHom | null |
self_comp_symm_toHom (f : M ≃[L] N) :
f.toHom.comp f.symm.toHom = Hom.id L N := by
rw [← comp_toHom, self_comp_symm, refl_toHom]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | self_comp_symm_toHom | null |
comp_symm (f : M ≃[L] N) (g : N ≃[L] P) : (g.comp f).symm = f.symm.comp g.symm :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_symm | null |
comp_right_injective (h : M ≃[L] N) :
Function.Injective (fun f ↦ f.comp h : (N ≃[L] P) → (M ≃[L] P)) := by
intro f g hfg
convert (congr_arg (fun r : (M ≃[L] P) ↦ r.comp h.symm) hfg) <;>
rw [comp_assoc, self_comp_symm, comp_refl]
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_right_injective | null |
comp_right_inj (h : M ≃[L] N) (f g : N ≃[L] P) : f.comp h = g.comp h ↔ f = g :=
⟨fun eq ↦ h.comp_right_injective eq, congr_arg (fun (r : N ≃[L] P) ↦ r.comp h)⟩ | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | comp_right_inj | null |
@[simps] StrongHomClass.toEquiv {F M N} [L.Structure M] [L.Structure N] [EquivLike F M N]
[StrongHomClass L F M N] : F → M ≃[L] N := fun φ =>
⟨⟨φ, EquivLike.inv φ, EquivLike.left_inv φ, EquivLike.right_inv φ⟩, StrongHomClass.map_fun φ,
StrongHomClass.map_rel φ⟩ | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | StrongHomClass.toEquiv | Any element of a bijective `StrongHomClass` can be realized as a first_order isomorphism. |
sumStructure : (L₁.sum L₂).Structure S where
funMap := Sum.elim funMap funMap
RelMap := Sum.elim RelMap RelMap
variable {L₁ L₂ S}
@[simp] | instance | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | sumStructure | null |
funMap_sumInl {n : ℕ} (f : L₁.Functions n) :
@funMap (L₁.sum L₂) S _ n (Sum.inl f) = funMap f :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | funMap_sumInl | null |
funMap_sumInr {n : ℕ} (f : L₂.Functions n) :
@funMap (L₁.sum L₂) S _ n (Sum.inr f) = funMap f :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | funMap_sumInr | null |
relMap_sumInl {n : ℕ} (R : L₁.Relations n) :
@RelMap (L₁.sum L₂) S _ n (Sum.inl R) = RelMap R :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | relMap_sumInl | null |
relMap_sumInr {n : ℕ} (R : L₂.Relations n) :
@RelMap (L₁.sum L₂) S _ n (Sum.inr R) = RelMap R :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | relMap_sumInr | null |
emptyStructure : Language.empty.Structure M where | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | emptyStructure | Any type can be made uniquely into a structure over the empty language. |
@[simp]
empty.nonempty_embedding_iff :
Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} #M ≤ Cardinal.lift.{w} #N :=
_root_.trans ⟨Nonempty.map fun f => f.toEmbedding, Nonempty.map StrongHomClass.toEmbedding⟩
Cardinal.lift_mk_le'.symm
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | empty.nonempty_embedding_iff | null |
empty.nonempty_equiv_iff :
Nonempty (M ≃[Language.empty] N) ↔ Cardinal.lift.{w'} #M = Cardinal.lift.{w} #N :=
_root_.trans ⟨Nonempty.map fun f => f.toEquiv, Nonempty.map fun f => { toEquiv := f }⟩
Cardinal.lift_mk_eq'.symm | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | empty.nonempty_equiv_iff | null |
@[simps]
_root_.Function.emptyHom (f : M → N) : M →[Language.empty] N where toFun := f | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | _root_.Function.emptyHom | Makes a `Language.empty.Hom` out of any function.
This is only needed because there is no instance of `FunLike (M → N) M N`, and thus no instance of
`Language.empty.HomClass M N`. |
@[simps!]
inducedStructure (e : M ≃ N) : L.Structure N :=
⟨fun f x => e (funMap f (e.symm ∘ x)), fun r x => RelMap r (e.symm ∘ x)⟩ | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | inducedStructure | A structure induced by a bijection. |
inducedStructureEquiv (e : M ≃ N) : @Language.Equiv L M N _ (inducedStructure e) := by
letI : L.Structure N := inducedStructure e
exact
{ e with
map_fun' := @fun n f x => by simp [← Function.comp_assoc e.symm e x]
map_rel' := @fun n r x => by simp [← Function.comp_assoc e.symm e x] }
@[simp] | def | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | inducedStructureEquiv | A bijection as a first-order isomorphism with the induced structure on the codomain. |
toEquiv_inducedStructureEquiv (e : M ≃ N) :
@Language.Equiv.toEquiv L M N _ (inducedStructure e) (inducedStructureEquiv e) = e :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toEquiv_inducedStructureEquiv | null |
toFun_inducedStructureEquiv (e : M ≃ N) :
DFunLike.coe (@inducedStructureEquiv L M N _ e) = e :=
rfl
@[simp] | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toFun_inducedStructureEquiv | null |
toFun_inducedStructureEquiv_Symm (e : M ≃ N) :
(by
letI : L.Structure N := inducedStructure e
exact DFunLike.coe (@inducedStructureEquiv L M N _ e).symm) = (e.symm : N → M) :=
rfl | theorem | ModelTheory | [
"Mathlib.SetTheory.Cardinal.Basic"
] | Mathlib/ModelTheory/Basic.lean | toFun_inducedStructureEquiv_Symm | null |
protected CategoryTheory.Bundled.structure {L : FirstOrder.Language.{u, v}}
(M : CategoryTheory.Bundled.{w} L.Structure) : L.Structure M :=
M.str
open FirstOrder Cardinal | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | CategoryTheory.Bundled.structure | null |
@[simps]
bundledInduced : CategoryTheory.Bundled.{w'} L.Structure :=
⟨N, g.inducedStructure⟩ | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | bundledInduced | A type bundled with the structure induced by an equivalence. |
@[simp]
bundledInducedEquiv : M ≃[L] g.bundledInduced L :=
g.inducedStructureEquiv | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | bundledInducedEquiv | An equivalence of types as a first-order equivalence to the bundled structure on the codomain. |
equivSetoid : Setoid (CategoryTheory.Bundled L.Structure) where
r M N := Nonempty (M ≃[L] N)
iseqv :=
⟨fun M => ⟨Equiv.refl L M⟩, fun {_ _} => Nonempty.map Equiv.symm, fun {_ _} _ =>
Nonempty.map2 fun MN NP => NP.comp MN⟩
variable (T : L.Theory) | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | equivSetoid | The equivalence relation on bundled `L.Structure`s indicating that they are isomorphic. |
ModelType where
/-- The underlying type for the models -/
Carrier : Type w
[struc : L.Structure Carrier]
[is_model : T.Model Carrier]
[nonempty' : Nonempty Carrier]
attribute [instance 2000] ModelType.struc ModelType.is_model ModelType.nonempty' | structure | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | ModelType | The type of nonempty models of a first-order theory. |
instCoeSort : CoeSort T.ModelType (Type w) :=
⟨ModelType.Carrier⟩ | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | instCoeSort | null |
of (M : Type w) [L.Structure M] [M ⊨ T] [Nonempty M] : T.ModelType :=
⟨M⟩
@[simp] | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | of | The object in the category of R-algebras associated to a type equipped with the appropriate
typeclasses. |
coe_of (M : Type w) [L.Structure M] [M ⊨ T] [Nonempty M] : (of T M : Type w) = M :=
rfl | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | coe_of | null |
instNonempty (M : T.ModelType) : Nonempty M :=
inferInstance | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | instNonempty | null |
instInhabited : Inhabited (ModelType.{u, v, w} (∅ : L.Theory)) :=
⟨ModelType.of _ PUnit⟩ | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | instInhabited | null |
equivInduced {M : ModelType.{u, v, w} T} {N : Type w'} (e : M ≃ N) :
ModelType.{u, v, w'} T where
Carrier := N
struc := e.inducedStructure
is_model := @StrongHomClass.theory_model L M N _ e.inducedStructure T
_ _ _ e.inducedStructureEquiv _
nonempty' := e.symm.nonempty | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | equivInduced | Maps a bundled model along a bijection. |
of_small (M : Type w) [Nonempty M] [L.Structure M] [M ⊨ T] [h : Small.{w'} M] :
Small.{w'} (ModelType.of T M) :=
h | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | of_small | null |
noncomputable shrink (M : ModelType.{u, v, w} T) [Small.{w'} M] : ModelType.{u, v, w'} T :=
equivInduced (equivShrink M) | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | shrink | Shrinks a small model to a particular universe. |
ulift (M : ModelType.{u, v, w} T) : ModelType.{u, v, max w w'} T :=
equivInduced (Equiv.ulift.{w', w}.symm : M ≃ _) | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | ulift | Lifts a model to a particular universe. |
@[simps]
reduct {L' : Language} (φ : L →ᴸ L') (M : (φ.onTheory T).ModelType) : T.ModelType where
Carrier := M
struc := φ.reduct M
nonempty' := M.nonempty'
is_model := (@LHom.onTheory_model L L' M (φ.reduct M) _ φ _ T).1 M.is_model | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | reduct | The reduct of any model of `φ.onTheory T` is a model of `T`. |
@[simps]
noncomputable defaultExpansion {L' : Language} {φ : L →ᴸ L'} (h : φ.Injective)
[∀ (n) (f : L'.Functions n), Decidable (f ∈ Set.range fun f : L.Functions n => φ.onFunction f)]
[∀ (n) (r : L'.Relations n), Decidable (r ∈ Set.range fun r : L.Relations n => φ.onRelation r)]
(M : T.ModelType) [Inhabited M] : (φ.onTheory T).ModelType where
Carrier := M
struc := φ.defaultExpansion M
nonempty' := M.nonempty'
is_model :=
(@LHom.onTheory_model L L' M _ (φ.defaultExpansion M) φ (h.isExpansionOn_default M) T).2
M.is_model | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | defaultExpansion | When `φ` is injective, `defaultExpansion` expands a model of `T` to a model of `φ.onTheory T`
arbitrarily. |
leftStructure {L' : Language} {T : (L.sum L').Theory} (M : T.ModelType) : L.Structure M :=
(LHom.sumInl : L →ᴸ L.sum L').reduct M | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | leftStructure | null |
rightStructure {L' : Language} {T : (L.sum L').Theory} (M : T.ModelType) :
L'.Structure M :=
(LHom.sumInr : L' →ᴸ L.sum L').reduct M | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | rightStructure | null |
@[simps]
subtheoryModel (M : T.ModelType) {T' : L.Theory} (h : T' ⊆ T) : T'.ModelType where
Carrier := M
is_model := ⟨fun _φ hφ => realize_sentence_of_mem T (h hφ)⟩ | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | subtheoryModel | A model of a theory is also a model of any subtheory. |
subtheoryModel_models (M : T.ModelType) {T' : L.Theory} (h : T' ⊆ T) :
M.subtheoryModel h ⊨ T :=
M.is_model | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | subtheoryModel_models | null |
Model.bundled {M : Type w} [LM : L.Structure M] [ne : Nonempty M] (h : M ⊨ T) : T.ModelType :=
@ModelType.of L T M LM h ne
@[simp] | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | Model.bundled | Bundles `M ⊨ T` as a `T.ModelType`. |
coe_of {M : Type w} [L.Structure M] [Nonempty M] (h : M ⊨ T) : (h.bundled : Type w) = M :=
rfl | theorem | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | coe_of | null |
ElementarilyEquivalent.toModel {M : T.ModelType} {N : Type*} [LN : L.Structure N]
(h : M ≅[L] N) : T.ModelType where
Carrier := N
struc := LN
nonempty' := h.nonempty
is_model := h.theory_model | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | ElementarilyEquivalent.toModel | A structure that is elementarily equivalent to a model, bundled as a model. |
ElementarySubstructure.toModel {M : T.ModelType} (S : L.ElementarySubstructure M) :
T.ModelType :=
S.elementarilyEquivalent.symm.toModel T | def | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | ElementarySubstructure.toModel | An elementary substructure of a bundled model as a bundled model. |
ElementarySubstructure.toModel.instSmall {M : T.ModelType}
(S : L.ElementarySubstructure M) [h : Small.{w, x} S] : Small.{w, x} (S.toModel T) :=
h | instance | ModelTheory | [
"Mathlib.ModelTheory.ElementarySubstructures",
"Mathlib.CategoryTheory.ConcreteCategory.Bundled"
] | Mathlib/ModelTheory/Bundled.lean | ElementarySubstructure.toModel.instSmall | null |
IsAtomic : L.BoundedFormula α n → Prop
| equal (t₁ t₂ : L.Term (α ⊕ (Fin n))) : IsAtomic (t₁.bdEqual t₂)
| rel {l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (α ⊕ (Fin n))) :
IsAtomic (R.boundedFormula ts) | inductive | ModelTheory | [
"Mathlib.ModelTheory.Equivalence"
] | Mathlib/ModelTheory/Complexity.lean | IsAtomic | An atomic formula is either equality or a relation symbol applied to terms.
Note that `⊥` and `⊤` are not considered atomic in this convention. |
not_all_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.all.IsAtomic := fun con => by
cases con | theorem | ModelTheory | [
"Mathlib.ModelTheory.Equivalence"
] | Mathlib/ModelTheory/Complexity.lean | not_all_isAtomic | null |
not_ex_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsAtomic := fun con => by cases con | theorem | ModelTheory | [
"Mathlib.ModelTheory.Equivalence"
] | Mathlib/ModelTheory/Complexity.lean | not_ex_isAtomic | null |
IsAtomic.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsAtomic)
(f : α → β ⊕ (Fin n)) : (φ.relabel f).IsAtomic :=
IsAtomic.recOn h (fun _ _ => IsAtomic.equal _ _) fun _ _ => IsAtomic.rel _ _ | theorem | ModelTheory | [
"Mathlib.ModelTheory.Equivalence"
] | Mathlib/ModelTheory/Complexity.lean | IsAtomic.relabel | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.