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
@[simps] protected refl : L ≃ᴸ L := ⟨LHom.id L, LHom.id L, LHom.comp_id _, LHom.comp_id _⟩
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
refl
The identity equivalence from a first-order language to itself.
@[simps] protected symm : L' ≃ᴸ L := ⟨e.invLHom, e.toLHom, e.right_inv, e.left_inv⟩
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
symm
The inverse of an equivalence of first-order languages.
@[simps, trans] protected trans (e : L ≃ᴸ L') (e' : L' ≃ᴸ L'') : L ≃ᴸ L'' := ⟨e'.toLHom.comp e.toLHom, e.invLHom.comp e'.invLHom, by rw [LHom.comp_assoc, ← LHom.comp_assoc e'.invLHom, e'.left_inv, LHom.id_comp, e.left_inv], by rw [LHom.comp_assoc, ← LHom.comp_assoc e.toLHom, e.right_inv, LHom.id_comp, e'.righ...
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
trans
The composition of equivalences of first-order languages.
@[simp] constantsOnFunc : ℕ → Type u' | 0 => α | (_ + 1) => PEmpty
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOnFunc
The type of functions for a language consisting only of constant symbols.
@[simps] constantsOn : Language.{u', 0} := ⟨constantsOnFunc α, fun _ => Empty⟩ variable {α}
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOn
A language with constants indexed by a type.
constantsOn_constants : (constantsOn α).Constants = α := rfl
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOn_constants
null
isAlgebraic_constantsOn : IsAlgebraic (constantsOn α) := by unfold constantsOn infer_instance
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
isAlgebraic_constantsOn
null
isEmpty_functions_constantsOn_succ {n : ℕ} : IsEmpty ((constantsOn α).Functions (n + 1)) := inferInstanceAs (IsEmpty PEmpty)
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
isEmpty_functions_constantsOn_succ
null
isRelational_constantsOn [_ie : IsEmpty α] : IsRelational (constantsOn α) := fun n => Nat.casesOn n _ie inferInstance
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
isRelational_constantsOn
null
card_constantsOn : (constantsOn α).card = #α := by simp [card_eq_card_functions_add_card_relations, sum_nat_eq_add_sum_succ]
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
card_constantsOn
null
constantsOn.structure (f : α → M) : (constantsOn α).Structure M where funMap := fun {n} c _ => match n, c with | 0, c => f c variable {β : Type v'}
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOn.structure
Gives a `constantsOn α` structure to a type by assigning each constant a value.
LHom.constantsOnMap (f : α → β) : constantsOn α →ᴸ constantsOn β where onFunction := fun {n} c => match n, c with | 0, c => f c
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
LHom.constantsOnMap
A map between index types induces a map between constant languages.
constantsOnMap_isExpansionOn {f : α → β} {fα : α → M} {fβ : β → M} (h : fβ ∘ f = fα) : @LHom.IsExpansionOn _ _ (LHom.constantsOnMap f) M (constantsOn.structure fα) (constantsOn.structure fβ) := by letI := constantsOn.structure fα letI := constantsOn.structure fβ exact ⟨fun {n} => Nat.casesOn n (fun ...
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOnMap_isExpansionOn
null
withConstants : Language.{max u w', v} := L.sum (constantsOn α) @[inherit_doc FirstOrder.Language.withConstants] scoped[FirstOrder] notation:95 L "[[" α "]]" => Language.withConstants L α @[simp]
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants
Extends a language with a constant for each element of a parameter set in `M`.
card_withConstants : L[[α]].card = Cardinal.lift.{w'} L.card + Cardinal.lift.{max u v} #α := by rw [withConstants, card_sum, card_constantsOn]
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
card_withConstants
null
@[simps!] lhomWithConstants : L →ᴸ L[[α]] := LHom.sumInl
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
lhomWithConstants
The language map adding constants.
lhomWithConstants_injective : (L.lhomWithConstants α).Injective := LHom.sumInl_injective variable {α}
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
lhomWithConstants_injective
null
protected con (a : α) : L[[α]].Constants := Sum.inr a variable {L} (α)
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
con
The constant symbol indexed by a particular element.
LHom.addConstants {L' : Language} (φ : L →ᴸ L') : L[[α]] →ᴸ L'[[α]] := φ.sumMap (LHom.id _)
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
LHom.addConstants
Adds constants to a language map.
paramsStructure (A : Set α) : (constantsOn A).Structure α := constantsOn.structure (↑) variable (L)
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
paramsStructure
null
@[simps] LEquiv.addEmptyConstants [ie : IsEmpty α] : L ≃ᴸ L[[α]] where toLHom := lhomWithConstants L α invLHom := LHom.sumElim (LHom.id L) (LHom.ofIsEmpty (constantsOn α) L) left_inv := by rw [lhomWithConstants, LHom.sumElim_comp_inl] right_inv := by simp only [LHom.comp_sumElim, lhomWithConstants, LHom.com...
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
LEquiv.addEmptyConstants
The language map removing an empty constant set.
withConstants_funMap_sumInl [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M] {n} {f : L.Functions n} {x : Fin n → M} : @funMap (L[[α]]) M _ n (Sum.inl f) x = funMap f x := (lhomWithConstants L α).map_onFunction f x @[simp]
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants_funMap_sumInl
null
withConstants_relMap_sumInl [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M] {n} {R : L.Relations n} {x : Fin n → M} : @RelMap (L[[α]]) M _ n (Sum.inl R) x = RelMap R x := (lhomWithConstants L α).map_onRelation R x
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants_relMap_sumInl
null
lhomWithConstantsMap (f : α → β) : L[[α]] →ᴸ L[[β]] := LHom.sumMap (LHom.id L) (LHom.constantsOnMap f) @[simp]
def
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
lhomWithConstantsMap
The language map extending the constant set.
LHom.map_constants_comp_sumInl {f : α → β} : (L.lhomWithConstantsMap f).comp LHom.sumInl = L.lhomWithConstants β := by ext <;> rfl
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
LHom.map_constants_comp_sumInl
null
constantsOnSelfStructure : (constantsOn M).Structure M := constantsOn.structure id
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOnSelfStructure
null
withConstantsSelfStructure : L[[M]].Structure M := Language.sumStructure _ _ M
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstantsSelfStructure
null
withConstants_self_expansion : (lhomWithConstants L M).IsExpansionOn M := ⟨fun _ _ => rfl, fun _ _ => rfl⟩ variable (α : Type*) [(constantsOn α).Structure M]
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants_self_expansion
null
withConstantsStructure : L[[α]].Structure M := Language.sumStructure _ _ _
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstantsStructure
null
withConstants_expansion : (L.lhomWithConstants α).IsExpansionOn M := ⟨fun _ _ => rfl, fun _ _ => rfl⟩
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants_expansion
null
addEmptyConstants_is_expansion_on' : (LEquiv.addEmptyConstants L (∅ : Set M)).toLHom.IsExpansionOn M := L.withConstants_expansion _
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
addEmptyConstants_is_expansion_on'
null
addEmptyConstants_symm_isExpansionOn : (LEquiv.addEmptyConstants L (∅ : Set M)).symm.toLHom.IsExpansionOn M := LHom.sumElim_isExpansionOn _ _ _
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
addEmptyConstants_symm_isExpansionOn
null
addConstants_expansion {L' : Language} [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] : (φ.addConstants α).IsExpansionOn M := LHom.sumMap_isExpansionOn _ _ M @[simp]
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
addConstants_expansion
null
withConstants_funMap_sumInr {a : α} {x : Fin 0 → M} : @funMap (L[[α]]) M _ 0 (Sum.inr a : L[[α]].Functions 0) x = L.con a := by rw [Unique.eq_default x] exact (LHom.sumInr : constantsOn α →ᴸ L.sum _).map_onFunction _ _ variable {α} (A : Set M) @[simp]
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
withConstants_funMap_sumInr
null
coe_con {a : A} : (L.con a : M) = a := rfl variable {A} {B : Set M} (h : A ⊆ B)
theorem
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
coe_con
null
constantsOnMap_inclusion_isExpansionOn : (LHom.constantsOnMap (Set.inclusion h)).IsExpansionOn M := constantsOnMap_isExpansionOn rfl
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
constantsOnMap_inclusion_isExpansionOn
null
map_constants_inclusion_isExpansionOn : (L.lhomWithConstantsMap (Set.inclusion h)).IsExpansionOn M := LHom.sumMap_isExpansionOn _ _ _
instance
ModelTheory
[ "Mathlib.ModelTheory.Basic" ]
Mathlib/ModelTheory/LanguageMap.lean
map_constants_inclusion_isExpansionOn
null
orderRel : ℕ → Type | le : orderRel 2 deriving DecidableEq
inductive
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderRel
The type of relations for the language of orders, consisting of a single binary relation `le`.
protected order : Language := ⟨fun _ => Empty, orderRel⟩ deriving IsRelational
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
order
The relational language consisting of a single relation representing `≤`.
@[simp] forall_relations {P : ∀ (n) (_ : Language.order.Relations n), Prop} : (∀ {n} (R), P n R) ↔ P 2 .le := ⟨fun h => h _, fun h n R => match n, R with | 2, .le => h⟩
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
forall_relations
null
instSubsingleton : Subsingleton (Language.order.Relations n) := ⟨by rintro ⟨⟩ ⟨⟩; rfl⟩
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
instSubsingleton
null
@[simp] card_eq_one : Language.order.card = 1 := by simp [card]
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
card_eq_one
null
IsOrdered (L : Language.{u, v}) where /-- The relation symbol representing `≤`. -/ leSymb : L.Relations 2 export IsOrdered (leSymb)
class
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
IsOrdered
A language is ordered if it has a symbol representing `≤`.
order.relation_eq_leSymb : (R : Language.order.Relations 2) → R = leSymb | .le => rfl
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
order.relation_eq_leSymb
null
Term.le (t₁ t₂ : L.Term (α ⊕ (Fin n))) : L.BoundedFormula α n := leSymb.boundedFormula₂ t₁ t₂
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
Term.le
Joins two terms `t₁, t₂` in a formula representing `t₁ ≤ t₂`.
Term.lt (t₁ t₂ : L.Term (α ⊕ (Fin n))) : L.BoundedFormula α n := t₁.le t₂ ⊓ ∼(t₂.le t₁) variable (L)
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
Term.lt
Joins two terms `t₁, t₂` in a formula representing `t₁ < t₂`.
@[simps] orderLHom : Language.order →ᴸ L where onRelation | _, .le => leSymb @[simp]
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderLHom
The language homomorphism sending the unique symbol `≤` of `Language.order` to `≤` in an ordered language.
orderLHom_leSymb : (orderLHom L).onRelation leSymb = (leSymb : L.Relations 2) := rfl @[simp]
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderLHom_leSymb
null
orderLHom_order : orderLHom Language.order = LHom.id Language.order := LHom.funext (Subsingleton.elim _ _) (Subsingleton.elim _ _)
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderLHom_order
null
preorderTheory : L.Theory := {leSymb.reflexive, leSymb.transitive}
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
preorderTheory
The theory of preorders.
partialOrderTheory : L.Theory := insert leSymb.antisymmetric L.preorderTheory
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
partialOrderTheory
The theory of partial orders.
linearOrderTheory : L.Theory := insert leSymb.total L.partialOrderTheory
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
linearOrderTheory
The theory of linear orders.
noTopOrderSentence : L.Sentence := ∀' ∃' ∼((&1).le &0)
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
noTopOrderSentence
A sentence indicating that an order has no top element: $\forall x, \exists y, \neg y \le x$.
noBotOrderSentence : L.Sentence := ∀' ∃' ∼((&0).le &1)
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
noBotOrderSentence
A sentence indicating that an order has no bottom element: $\forall x, \exists y, \neg x \le y$.
denselyOrderedSentence : L.Sentence := ∀' ∀' ((&0).lt &1 ⟹ ∃' ((&0).lt &2 ⊓ (&2).lt &1))
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
denselyOrderedSentence
A sentence indicating that an order is dense: $\forall x, \forall y, x < y \to \exists z, x < z \wedge z < y$.
dlo : L.Theory := L.linearOrderTheory ∪ {L.noTopOrderSentence, L.noBotOrderSentence, L.denselyOrderedSentence} variable [L.Structure M]
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
dlo
The theory of dense linear orders without endpoints.
sum.instIsOrdered : IsOrdered (L.sum Language.order) := ⟨Sum.inr IsOrdered.leSymb⟩ variable (L M)
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
sum.instIsOrdered
null
orderStructure [LE M] : Language.order.Structure M where RelMap | .le => (fun x => x 0 ≤ x 1)
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderStructure
Any linearly-ordered type is naturally a structure in the language `Language.order`. This is not an instance, because sometimes the `Language.order.Structure` is defined first.
OrderedStructure [L.IsOrdered] [LE M] [L.Structure M] : Prop where relMap_leSymb : ∀ (x : Fin 2 → M), RelMap (leSymb : L.Relations 2) x ↔ (x 0 ≤ x 1) export OrderedStructure (relMap_leSymb) attribute [simp] relMap_leSymb variable {L M}
class
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
OrderedStructure
A structure is ordered if its language has a `≤` symbol whose interpretation is `≤`.
@[simp] Term.realize_le {t₁ t₂ : L.Term (α ⊕ (Fin n))} {v : α → M} {xs : Fin n → M} : (t₁.le t₂).Realize v xs ↔ t₁.realize (Sum.elim v xs) ≤ t₂.realize (Sum.elim v xs) := by simp [Term.le]
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
Term.realize_le
null
realize_noTopOrder_iff : M ⊨ L.noTopOrderSentence ↔ NoTopOrder M := by simp only [noTopOrderSentence, Sentence.Realize, Formula.Realize, BoundedFormula.realize_all, BoundedFormula.realize_ex, BoundedFormula.realize_not, Term.realize_le] refine ⟨fun h => ⟨fun a => h a⟩, ?_⟩ intro h a exact exists_not_le a
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_noTopOrder_iff
null
realize_noBotOrder_iff : M ⊨ L.noBotOrderSentence ↔ NoBotOrder M := by simp only [noBotOrderSentence, Sentence.Realize, Formula.Realize, BoundedFormula.realize_all, BoundedFormula.realize_ex, BoundedFormula.realize_not, Term.realize_le] refine ⟨fun h => ⟨fun a => h a⟩, ?_⟩ intro h a exact exists_not_ge a va...
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_noBotOrder_iff
null
realize_noTopOrder [h : NoTopOrder M] : M ⊨ L.noTopOrderSentence := realize_noTopOrder_iff.2 h @[simp]
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_noTopOrder
null
realize_noBotOrder [h : NoBotOrder M] : M ⊨ L.noBotOrderSentence := realize_noBotOrder_iff.2 h
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_noBotOrder
null
noTopOrder_of_dlo [M ⊨ L.dlo] : NoTopOrder M := realize_noTopOrder_iff.1 (L.dlo.realize_sentence_of_mem (by simp only [dlo, Set.union_insert, Set.union_singleton, Set.mem_insert_iff, true_or]))
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
noTopOrder_of_dlo
null
noBotOrder_of_dlo [M ⊨ L.dlo] : NoBotOrder M := realize_noBotOrder_iff.1 (L.dlo.realize_sentence_of_mem (by simp only [dlo, Set.union_insert, Set.union_singleton, Set.mem_insert_iff, true_or, or_true]))
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
noBotOrder_of_dlo
null
@[simp] orderedStructure_iff [LE M] [Language.order.Structure M] [Language.order.OrderedStructure M] : L.OrderedStructure M ↔ LHom.IsExpansionOn (orderLHom L) M := ⟨fun _ => inferInstance, fun _ => inferInstance⟩
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
orderedStructure_iff
null
model_preorder : M ⊨ L.preorderTheory := by simp only [preorderTheory, Theory.model_insert_iff, Relations.realize_reflexive, relMap_leSymb, Theory.model_singleton_iff, Relations.realize_transitive] exact ⟨le_refl, fun _ _ _ => le_trans⟩ @[simp]
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
model_preorder
null
Term.realize_lt {t₁ t₂ : L.Term (α ⊕ (Fin n))} {v : α → M} {xs : Fin n → M} : (t₁.lt t₂).Realize v xs ↔ t₁.realize (Sum.elim v xs) < t₂.realize (Sum.elim v xs) := by simp [Term.lt, lt_iff_le_not_ge]
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
Term.realize_lt
null
realize_denselyOrdered_iff : M ⊨ L.denselyOrderedSentence ↔ DenselyOrdered M := by simp only [denselyOrderedSentence, Sentence.Realize, Formula.Realize, BoundedFormula.realize_imp, BoundedFormula.realize_all, Term.realize_lt, BoundedFormula.realize_ex, BoundedFormula.realize_inf] refine ⟨fun h => ⟨fun a...
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_denselyOrdered_iff
null
realize_denselyOrdered [h : DenselyOrdered M] : M ⊨ L.denselyOrderedSentence := realize_denselyOrdered_iff.2 h variable (L) (M)
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
realize_denselyOrdered
null
denselyOrdered_of_dlo [M ⊨ L.dlo] : DenselyOrdered M := realize_denselyOrdered_iff.1 (L.dlo.realize_sentence_of_mem (by simp only [dlo, Set.union_insert, Set.union_singleton, Set.mem_insert_iff, true_or, or_true]))
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
denselyOrdered_of_dlo
null
model_partialOrder [PartialOrder M] [L.OrderedStructure M] : M ⊨ L.partialOrderTheory := by simp only [partialOrderTheory, Theory.model_insert_iff, Relations.realize_antisymmetric, relMap_leSymb, Fin.isValue, Matrix.cons_val_zero, Matrix.cons_val_one, model_preorder, and_true] exact fun _ _ => le_antisy...
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
model_partialOrder
null
model_linearOrder : M ⊨ L.linearOrderTheory := by simp only [linearOrderTheory, Theory.model_insert_iff, Relations.realize_total, relMap_leSymb, Fin.isValue, Matrix.cons_val_zero, Matrix.cons_val_one, model_partialOrder, and_true] exact le_total
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
model_linearOrder
null
model_dlo [DenselyOrdered M] [NoTopOrder M] [NoBotOrder M] : M ⊨ L.dlo := by simp [dlo, model_linearOrder, Theory.model_insert_iff]
instance
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
model_dlo
null
leOfStructure : LE M where le a b := Structure.RelMap (leSymb : L.Relations 2) ![a,b]
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
leOfStructure
Any structure in an ordered language can be ordered correspondingly.
preorderOfModels [h : M ⊨ L.preorderTheory] : Preorder M where __ := L.leOfStructure M le_refl := Relations.realize_reflexive.1 ((Theory.model_iff _).1 h _ (by simp only [preorderTheory, Set.mem_insert_iff, Set.mem_singleton_iff, true_or])) le_trans := Relations.realize_transitive.1 ((Theory.model_iff _).1 h ...
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
preorderOfModels
The order structure on an ordered language is decidable. -/ -- This should not be a global instance, -- because it will match with any `LE` typeclass search @[local instance] def decidableLEOfStructure [h : DecidableRel (fun (a b : M) => Structure.RelMap (leSymb : L.Relations 2) ![a, b])] : letI := L.leOfStruct...
partialOrderOfModels [h : M ⊨ L.partialOrderTheory] : PartialOrder M where __ := L.preorderOfModels M le_antisymm := Relations.realize_antisymmetric.1 ((Theory.model_iff _).1 h _ (by simp only [partialOrderTheory, Set.mem_insert_iff, true_or]))
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
partialOrderOfModels
Any model of a theory of partial orders is a partial order.
linearOrderOfModels [h : M ⊨ L.linearOrderTheory] [DecidableRel (fun (a b : M) => Structure.RelMap (leSymb : L.Relations 2) ![a, b])] : LinearOrder M where __ := L.partialOrderOfModels M le_total := Relations.realize_total.1 ((Theory.model_iff _).1 h _ (by simp only [linearOrderTheory, Set.mem_insert_if...
def
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
linearOrderOfModels
Any model of a theory of linear orders is a linear order.
monotone [Preorder M] [L.OrderedStructure M] [Preorder N] [L.OrderedStructure N] (f : F) : Monotone f := fun a b => by have h := HomClass.map_rel f leSymb ![a, b] simp only [relMap_leSymb, Fin.isValue, Matrix.cons_val_zero, Matrix.cons_val_one, Function.comp_apply] at h exact h
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
monotone
null
strictMono [EmbeddingLike F M N] [PartialOrder M] [L.OrderedStructure M] [PartialOrder N] [L.OrderedStructure N] (f : F) : StrictMono f := (HomClass.monotone f).strictMono_of_injective (EmbeddingLike.injective f)
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
strictMono
null
StrongHomClass.toOrderIsoClass (L : Language) [L.IsOrdered] (M : Type*) [L.Structure M] [LE M] [L.OrderedStructure M] (N : Type*) [L.Structure N] [LE N] [L.OrderedStructure N] (F : Type*) [EquivLike F M N] [L.StrongHomClass F M N] : OrderIsoClass F M N where map_le_map_iff f a b := by have h := St...
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
StrongHomClass.toOrderIsoClass
This is not an instance because it would form a loop with `FirstOrder.Language.order.instStrongHomClassOfOrderIsoClass`. As both types are `Prop`s, it would only cause a slowdown.
dlo_isExtensionPair (M : Type w) [Language.order.Structure M] [M ⊨ Language.order.linearOrderTheory] (N : Type w') [Language.order.Structure N] [N ⊨ Language.order.dlo] [Nonempty N] : Language.order.IsExtensionPair M N := by classical rw [isExtensionPair_iff_exists_embedding_closure_singleton_sup] int...
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
dlo_isExtensionPair
null
dlo_age [Language.order.Structure M] [Mdlo : M ⊨ Language.order.dlo] [Nonempty M] : Language.order.age M = {M : CategoryTheory.Bundled.{w'} Language.order.Structure | Finite M ∧ M ⊨ Language.order.linearOrderTheory} := by classical rw [age] ext N refine ⟨fun ⟨hF, h⟩ => ⟨hF.finite, Theory.IsUniversal.m...
lemma
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
dlo_age
null
isFraisseLimit_of_countable_nonempty_dlo (M : Type w) [Language.order.Structure M] [Countable M] [Nonempty M] [M ⊨ Language.order.dlo] : IsFraisseLimit {M : CategoryTheory.Bundled.{w} Language.order.Structure | Finite M ∧ M ⊨ Language.order.linearOrderTheory} M := ⟨(isUltrahomogeneous_iff_IsExtensionPai...
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
isFraisseLimit_of_countable_nonempty_dlo
Any countable nonempty model of the theory of dense linear orders is a Fraïssé limit of the class of finite models of the theory of linear orders.
isFraisse_finite_linear_order : IsFraisse {M : CategoryTheory.Bundled.{0} Language.order.Structure | Finite M ∧ M ⊨ Language.order.linearOrderTheory} := by letI : Language.order.Structure ℚ := orderStructure _ exact (isFraisseLimit_of_countable_nonempty_dlo ℚ).isFraisse open Cardinal
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
isFraisse_finite_linear_order
The class of finite models of the theory of linear orders is Fraïssé.
aleph0_categorical_dlo : (ℵ₀).Categorical Language.order.dlo := fun M₁ M₂ h₁ h₂ => by obtain ⟨_⟩ := denumerable_iff.2 h₁ obtain ⟨_⟩ := denumerable_iff.2 h₂ exact (isFraisseLimit_of_countable_nonempty_dlo M₁).nonempty_equiv (isFraisseLimit_of_countable_nonempty_dlo M₂)
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
aleph0_categorical_dlo
The theory of dense linear orders is `ℵ₀`-categorical.
dlo_isComplete : Language.order.dlo.IsComplete := aleph0_categorical_dlo.{0}.isComplete ℵ₀ _ le_rfl (by simp [one_le_aleph0]) ⟨by letI : Language.order.Structure ℚ := orderStructure ℚ exact Theory.ModelType.of _ ℚ⟩ fun _ => inferInstance
theorem
ModelTheory
[ "Mathlib.Algebra.CharZero.Infinite", "Mathlib.Data.Rat.Encodable", "Mathlib.Data.Finset.Sort", "Mathlib.ModelTheory.Complexity", "Mathlib.ModelTheory.Fraisse", "Mathlib.Order.CountableDenseLinearOrder" ]
Mathlib/ModelTheory/Order.lean
dlo_isComplete
The theory of dense linear orders is `ℵ₀`-complete.
PartialEquiv where /-- The substructure which is the domain of the equivalence. -/ dom : L.Substructure M /-- The substructure which is the codomain of the equivalence. -/ cod : L.Substructure N /-- The equivalence between the two subdomains. -/ toEquiv : dom ≃[L] cod @[inherit_doc] scoped[FirstOrder] notat...
structure
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
PartialEquiv
A partial `L`-equivalence, implemented as an equivalence between substructures.
noncomputable instInhabited_self : Inhabited (M ≃ₚ[L] M) := ⟨⊤, ⊤, Equiv.refl L (⊤ : L.Substructure M)⟩
instance
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
instInhabited_self
null
symm (f : M ≃ₚ[L] N) : N ≃ₚ[L] M where dom := f.cod cod := f.dom toEquiv := f.toEquiv.symm @[simp]
def
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
symm
Maps to the symmetric partial equivalence.
symm_symm (f : M ≃ₚ[L] N) : f.symm.symm = f := rfl
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.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.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
symm_bijective
null
symm_apply (f : M ≃ₚ[L] N) (x : f.cod) : f.symm.toEquiv x = f.toEquiv.symm x := rfl
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
symm_apply
null
le_def (f g : M ≃ₚ[L] N) : f ≤ g ↔ ∃ h : f.dom ≤ g.dom, (subtype _).comp (g.toEquiv.toEmbedding.comp (Substructure.inclusion h)) = (subtype _).comp f.toEquiv.toEmbedding := Iff.rfl @[gcongr] theorem dom_le_dom {f g : M ≃ₚ[L] N} : f ≤ g → f.dom ≤ g.dom := fun ⟨le, _⟩ ↦ le @[gcongr] theorem cod_le_cod {f g : ...
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
le_def
null
subtype_toEquiv_inclusion {f g : M ≃ₚ[L] N} (h : f ≤ g) : (subtype _).comp (g.toEquiv.toEmbedding.comp (Substructure.inclusion (dom_le_dom h))) = (subtype _).comp f.toEquiv.toEmbedding := by let ⟨_, eq⟩ := h; exact eq
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
subtype_toEquiv_inclusion
null
toEquiv_inclusion {f g : M ≃ₚ[L] N} (h : f ≤ g) : g.toEquiv.toEmbedding.comp (Substructure.inclusion (dom_le_dom h)) = (Substructure.inclusion (cod_le_cod h)).comp f.toEquiv.toEmbedding := by rw [← (subtype _).comp_inj, subtype_toEquiv_inclusion h] ext simp
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
toEquiv_inclusion
null
toEquiv_inclusion_apply {f g : M ≃ₚ[L] N} (h : f ≤ g) (x : f.dom) : g.toEquiv (Substructure.inclusion (dom_le_dom h) x) = Substructure.inclusion (cod_le_cod h) (f.toEquiv x) := by apply (subtype _).injective change (subtype _).comp (g.toEquiv.toEmbedding.comp (inclusion _)) x = _ rw [subtype_toEquiv_inc...
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
toEquiv_inclusion_apply
null
le_iff {f g : M ≃ₚ[L] N} : f ≤ g ↔ ∃ dom_le_dom : f.dom ≤ g.dom, ∃ cod_le_cod : f.cod ≤ g.cod, ∀ x, inclusion cod_le_cod (f.toEquiv x) = g.toEquiv (inclusion dom_le_dom x) := by constructor · exact fun h ↦ ⟨dom_le_dom h, cod_le_cod h, by intro x; apply (subtype _).inj'; rwa [toEquiv_inclusion_appl...
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
le_iff
null
le_trans (f g h : M ≃ₚ[L] N) : f ≤ g → g ≤ h → f ≤ h := by rintro ⟨le_fg, eq_fg⟩ ⟨le_gh, eq_gh⟩ refine ⟨le_fg.trans le_gh, ?_⟩ rw [← eq_fg, ← Embedding.comp_assoc (g := g.toEquiv.toEmbedding), ← eq_gh] ext simp
theorem
ModelTheory
[ "Mathlib.ModelTheory.DirectLimit", "Mathlib.Order.Ideal" ]
Mathlib/ModelTheory/PartialEquiv.lean
le_trans
null