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
exists_eq_iff_rel [IsTrans β s] (f : r ≺i s) {a : α} {b : β} : s b (f a) ↔ ∃ a', f a' = b ∧ r a' a := @InitialSeg.exists_eq_iff_rel α β r s f a b
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
exists_eq_iff_rel
null
noncomputable _root_.InitialSeg.toPrincipalSeg [IsWellOrder β s] (f : r ≼i s) (hf : ¬ Surjective f) : r ≺i s := ⟨f, _, Classical.choose_spec (f.eq_or_principal.resolve_left hf)⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
_root_.InitialSeg.toPrincipalSeg
A principal segment is the same as a non-surjective initial segment.
_root_.InitialSeg.toPrincipalSeg_apply [IsWellOrder β s] (f : r ≼i s) (hf : ¬ Surjective f) (x : α) : f.toPrincipalSeg hf x = f x := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
_root_.InitialSeg.toPrincipalSeg_apply
null
irrefl {r : α → α → Prop} [IsWellOrder α r] (f : r ≺i r) : False := by have h := f.lt_top f.top rw [show f f.top = f.top from InitialSeg.eq f (InitialSeg.refl r) f.top] at h exact _root_.irrefl _ h
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
irrefl
null
transInitial (f : r ≺i s) (g : s ≼i t) : r ≺i t := ⟨@RelEmbedding.trans _ _ _ r s t f g, g f.top, fun a => by simp [g.exists_eq_iff_rel, ← PrincipalSeg.mem_range_iff_rel, exists_swap, ← exists_and_left]⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transInitial
Composition of a principal segment embedding with an initial segment embedding, as a principal segment embedding
transInitial_apply (f : r ≺i s) (g : s ≼i t) (a : α) : f.transInitial g a = g (f a) := rfl @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transInitial_apply
null
transInitial_top (f : r ≺i s) (g : s ≼i t) : (f.transInitial g).top = g f.top := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transInitial_top
null
@[trans] protected trans [IsTrans γ t] (f : r ≺i s) (g : s ≺i t) : r ≺i t := transInitial f g @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
trans
Composition of two principal segment embeddings as a principal segment embedding
trans_apply [IsTrans γ t] (f : r ≺i s) (g : s ≺i t) (a : α) : f.trans g a = g (f a) := rfl @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
trans_apply
null
trans_top [IsTrans γ t] (f : r ≺i s) (g : s ≺i t) : (f.trans g).top = g f.top := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
trans_top
null
relIsoTrans (f : r ≃r s) (g : s ≺i t) : r ≺i t := ⟨@RelEmbedding.trans _ _ _ r s t f g, g.top, fun c => by simp [g.mem_range_iff_rel]⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
relIsoTrans
Composition of an order isomorphism with a principal segment embedding, as a principal segment embedding
relIsoTrans_apply (f : r ≃r s) (g : s ≺i t) (a : α) : relIsoTrans f g a = g (f a) := rfl @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
relIsoTrans_apply
null
relIsoTrans_top (f : r ≃r s) (g : s ≺i t) : (relIsoTrans f g).top = g.top := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
relIsoTrans_top
null
transRelIso (f : r ≺i s) (g : s ≃r t) : r ≺i t := transInitial f g.toInitialSeg @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transRelIso
Composition of a principal segment embedding with a relation isomorphism, as a principal segment embedding
transRelIso_apply (f : r ≺i s) (g : s ≃r t) (a : α) : transRelIso f g a = g (f a) := rfl @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transRelIso_apply
null
transRelIso_top (f : r ≺i s) (g : s ≃r t) : (transRelIso f g).top = g f.top := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transRelIso_top
null
@[simps!] ofElement {α : Type*} (r : α → α → Prop) (a : α) : Subrel r (r · a) ≺i r := ⟨Subrel.relEmbedding _ _, a, fun _ => ⟨fun ⟨⟨_, h⟩, rfl⟩ => h, fun h => ⟨⟨_, h⟩, rfl⟩⟩⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
ofElement
Given a well order `s`, there is a most one principal segment embedding of `r` into `s`. -/ instance [IsWellOrder β s] : Subsingleton (r ≺i s) where allEq f g := ext ((f : r ≼i s).eq g) protected theorem eq [IsWellOrder β s] (f g : r ≺i s) (a) : f a = g a := by rw [Subsingleton.elim f g] theorem top_eq [IsWellOrd...
ofElement_apply {α : Type*} (r : α → α → Prop) (a : α) (b) : ofElement r a b = b.1 := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
ofElement_apply
null
@[simps! symm_apply] noncomputable subrelIso (f : r ≺i s) : Subrel s (s · f.top) ≃r r := RelIso.symm ⟨(Equiv.ofInjective f f.injective).trans (Equiv.setCongr (funext fun _ ↦ propext f.mem_range_iff_rel)), f.map_rel_iff⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
subrelIso
For any principal segment `r ≺i s`, there is a `Subrel` of `s` order isomorphic to `r`.
apply_subrelIso (f : r ≺i s) (b : {b // s b f.top}) : f (f.subrelIso b) = b := Equiv.apply_ofInjective_symm f.injective _ @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
apply_subrelIso
null
subrelIso_apply (f : r ≺i s) (a : α) : f.subrelIso ⟨f a, f.lt_top a⟩ = a := Equiv.ofInjective_symm_apply f.injective _
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
subrelIso_apply
null
codRestrict (p : Set β) (f : r ≺i s) (H : ∀ a, f a ∈ p) (H₂ : f.top ∈ p) : r ≺i Subrel s (· ∈ p) := ⟨RelEmbedding.codRestrict p f H, ⟨f.top, H₂⟩, fun ⟨_, _⟩ => by simp [← f.mem_range_iff_rel]⟩ @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
codRestrict
Restrict the codomain of a principal segment embedding.
codRestrict_apply (p) (f : r ≺i s) (H H₂ a) : codRestrict p f H H₂ a = ⟨f a, H a⟩ := rfl @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
codRestrict_apply
null
codRestrict_top (p) (f : r ≺i s) (H H₂) : (codRestrict p f H H₂).top = ⟨f.top, H₂⟩ := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
codRestrict_top
null
ofIsEmpty (r : α → α → Prop) [IsEmpty α] {b : β} (H : ∀ b', ¬s b' b) : r ≺i s := { RelEmbedding.ofIsEmpty r s with top := b mem_range_iff_rel' := by simp [H] } @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
ofIsEmpty
Principal segment from an empty type into a type with a minimal element.
ofIsEmpty_top (r : α → α → Prop) [IsEmpty α] {b : β} (H : ∀ b', ¬s b' b) : (ofIsEmpty r H).top = b := rfl
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
ofIsEmpty_top
null
pemptyToPunit : @EmptyRelation PEmpty ≺i @EmptyRelation PUnit := (@ofIsEmpty _ _ EmptyRelation _ _ PUnit.unit) fun _ => not_false
abbrev
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
pemptyToPunit
Principal segment from the empty relation on `PEmpty` to the empty relation on `PUnit`.
protected acc [IsTrans β s] (f : r ≺i s) (a : α) : Acc r a ↔ Acc s (f a) := (f : r ≼i s).acc a
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
acc
null
wellFounded_iff_principalSeg {β : Type u} {s : β → β → Prop} [IsTrans β s] : WellFounded s ↔ ∀ (α : Type u) (r : α → α → Prop) (_ : r ≺i s), WellFounded r := ⟨fun wf _ _ f => RelHomClass.wellFounded f.toRelEmbedding wf, fun h => wellFounded_iff_wellFounded_subrel.mpr fun b => h _ _ (PrincipalSeg.ofElement s b...
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
wellFounded_iff_principalSeg
null
noncomputable principalSumRelIso [IsWellOrder β s] (f : r ≼i s) : (r ≺i s) ⊕ (r ≃r s) := if h : Surjective f then Sum.inr (RelIso.ofSurjective f h) else Sum.inl (f.toPrincipalSeg h)
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
principalSumRelIso
Every initial segment embedding into a well order can be turned into an isomorphism if surjective, or into a principal segment embedding if not.
noncomputable transPrincipal [IsWellOrder β s] [IsTrans γ t] (f : r ≼i s) (g : s ≺i t) : r ≺i t := match f.principalSumRelIso with | Sum.inl f' => f'.trans g | Sum.inr f' => PrincipalSeg.relIsoTrans f' g @[simp]
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transPrincipal
Composition of an initial segment embedding and a principal segment embedding as a principal segment embedding
transPrincipal_apply [IsWellOrder β s] [IsTrans γ t] (f : r ≼i s) (g : s ≺i t) (a : α) : f.transPrincipal g a = g (f a) := by rw [InitialSeg.transPrincipal] obtain f' | f' := f.principalSumRelIso · rw [PrincipalSeg.trans_apply, f.eq_principalSeg] · rw [PrincipalSeg.relIsoTrans_apply, f.eq_relIso]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
transPrincipal_apply
null
exists_sum_relIso {β : Type u} {s : β → β → Prop} [IsWellOrder β s] (f : r ≼i s) : ∃ (γ : Type u) (t : γ → γ → Prop), IsWellOrder γ t ∧ Nonempty (Sum.Lex r t ≃r s) := by classical obtain f | f := f.principalSumRelIso · exact ⟨_, _, inferInstance, ⟨(RelIso.sumLexCongr f.subrelIso.symm (.refl _)).trans <|...
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
exists_sum_relIso
An initial segment can be extended to an isomorphism by joining a second well order to the domain.
private noncomputable collapseF [IsWellOrder β s] (f : r ↪r s) : Π a, { b // ¬s (f a) b } := (RelEmbedding.isWellFounded f).fix _ fun a IH => have H : f a ∈ { b | ∀ a h, s (IH a h).1 b } := fun b h => trans_trichotomous_left (IH b h).2 (f.map_rel_iff.2 h) ⟨_, IsWellFounded.wf.not_lt_min _ ⟨_, H⟩ H⟩
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
collapseF
The function in `collapse`.
private collapseF_lt [IsWellOrder β s] (f : r ↪r s) {a : α} : ∀ {a'}, r a' a → s (collapseF f a') (collapseF f a) := by change _ ∈ { b | ∀ a', r a' a → s (collapseF f a') b } rw [collapseF, IsWellFounded.fix_eq] dsimp only exact WellFounded.min_mem _ _ _
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
collapseF_lt
null
private collapseF_not_lt [IsWellOrder β s] (f : r ↪r s) (a : α) {b} (h : ∀ a', r a' a → s (collapseF f a') b) : ¬s b (collapseF f a) := by rw [collapseF, IsWellFounded.fix_eq] dsimp only exact WellFounded.not_lt_min _ _ _ h
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
collapseF_not_lt
null
noncomputable RelEmbedding.collapse [IsWellOrder β s] (f : r ↪r s) : r ≼i s := have H := RelEmbedding.isWellOrder f ⟨RelEmbedding.ofMonotone _ fun a b => collapseF_lt f, fun a b h ↦ by obtain ⟨m, hm, hm'⟩ := H.wf.has_min { a | ¬s _ b } ⟨_, asymm h⟩ use m obtain lt | rfl | gt := trichotomous_of s b (coll...
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
RelEmbedding.collapse
Construct an initial segment embedding `r ≼i s` by "filling in the gaps". That is, each subsequent element in `α` is mapped to the least element in `β` that hasn't been used yet. This construction is guaranteed to work as long as there exists some relation embedding `r ↪r s`.
noncomputable InitialSeg.total (r s) [IsWellOrder α r] [IsWellOrder β s] : (r ≼i s) ⊕ (s ≼i r) := match (leAdd r s).principalSumRelIso, (RelEmbedding.sumLexInr r s).collapse.principalSumRelIso with | Sum.inl f, Sum.inr g => Sum.inl <| f.transRelIso g.symm | Sum.inr f, Sum.inl g => Sum.inr <| g.transRelIso...
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
InitialSeg.total
For any two well orders, one is an initial segment of the other.
@[simps!] _root_.OrderIso.toInitialSeg [Preorder α] [Preorder β] (f : α ≃o β) : α ≤i β := f.toRelIsoLT.toInitialSeg variable [PartialOrder β] {a a' : α} {b : β}
def
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
_root_.OrderIso.toInitialSeg
An order isomorphism is an initial segment
mem_range_of_le [LT α] (f : α ≤i β) (h : b ≤ f a) : b ∈ Set.range f := by obtain rfl | hb := h.eq_or_lt exacts [⟨a, rfl⟩, f.mem_range_of_rel hb]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
mem_range_of_le
null
isLowerSet_range [LT α] (f : α ≤i β) : IsLowerSet (Set.range f) := by rintro _ b h ⟨a, rfl⟩ exact mem_range_of_le f h @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
isLowerSet_range
null
le_iff_le [PartialOrder α] (f : α ≤i β) : f a ≤ f a' ↔ a ≤ a' := f.toOrderEmbedding.le_iff_le @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
le_iff_le
null
lt_iff_lt [PartialOrder α] (f : α ≤i β) : f a < f a' ↔ a < a' := f.toOrderEmbedding.lt_iff_lt
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
lt_iff_lt
null
monotone [PartialOrder α] (f : α ≤i β) : Monotone f := f.toOrderEmbedding.monotone
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
monotone
null
strictMono [PartialOrder α] (f : α ≤i β) : StrictMono f := f.toOrderEmbedding.strictMono @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
strictMono
null
isMin_apply_iff [PartialOrder α] (f : α ≤i β) : IsMin (f a) ↔ IsMin a := by refine ⟨StrictMono.isMin_of_apply f.strictMono, fun h b hb ↦ ?_⟩ obtain ⟨x, rfl⟩ := f.mem_range_of_le hb rw [f.le_iff_le] at hb ⊢ exact h hb alias ⟨_, map_isMin⟩ := isMin_apply_iff @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
isMin_apply_iff
null
map_bot [PartialOrder α] [OrderBot α] [OrderBot β] (f : α ≤i β) : f ⊥ = ⊥ := (map_isMin f isMin_bot).eq_bot
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
map_bot
null
image_Iio [PartialOrder α] (f : α ≤i β) (a : α) : f '' Set.Iio a = Set.Iio (f a) := f.toOrderEmbedding.image_Iio f.isLowerSet_range a
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
image_Iio
null
le_apply_iff [PartialOrder α] (f : α ≤i β) : b ≤ f a ↔ ∃ c ≤ a, f c = b := by constructor · intro h obtain ⟨c, hc⟩ := f.mem_range_of_le h refine ⟨c, ?_, hc⟩ rwa [← hc, f.le_iff_le] at h · rintro ⟨c, hc, rfl⟩ exact f.monotone hc
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
le_apply_iff
null
lt_apply_iff [PartialOrder α] (f : α ≤i β) : b < f a ↔ ∃ a' < a, f a' = b := by constructor · intro h obtain ⟨c, hc⟩ := f.mem_range_of_rel h refine ⟨c, ?_, hc⟩ rwa [← hc, f.lt_iff_lt] at h · rintro ⟨c, hc, rfl⟩ exact f.strictMono hc
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
lt_apply_iff
null
mem_range_of_le [LT α] (f : α <i β) (h : b ≤ f a) : b ∈ Set.range f := (f : α ≤i β).mem_range_of_le h
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
mem_range_of_le
null
isLowerSet_range [LT α] (f : α <i β) : IsLowerSet (Set.range f) := (f : α ≤i β).isLowerSet_range @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
isLowerSet_range
null
le_iff_le [PartialOrder α] (f : α <i β) : f a ≤ f a' ↔ a ≤ a' := (f : α ≤i β).le_iff_le @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
le_iff_le
null
lt_iff_lt [PartialOrder α] (f : α <i β) : f a < f a' ↔ a < a' := (f : α ≤i β).lt_iff_lt
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
lt_iff_lt
null
monotone [PartialOrder α] (f : α <i β) : Monotone f := (f : α ≤i β).monotone
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
monotone
null
strictMono [PartialOrder α] (f : α <i β) : StrictMono f := (f : α ≤i β).strictMono @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
strictMono
null
isMin_apply_iff [PartialOrder α] (f : α <i β) : IsMin (f a) ↔ IsMin a := (f : α ≤i β).isMin_apply_iff alias ⟨_, map_isMin⟩ := isMin_apply_iff @[simp]
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
isMin_apply_iff
null
map_bot [PartialOrder α] [OrderBot α] [OrderBot β] (f : α <i β) : f ⊥ = ⊥ := (f : α ≤i β).map_bot
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
map_bot
null
image_Iio [PartialOrder α] (f : α <i β) (a : α) : f '' Set.Iio a = Set.Iio (f a) := (f : α ≤i β).image_Iio a
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
image_Iio
null
le_apply_iff [PartialOrder α] (f : α <i β) : b ≤ f a ↔ ∃ c ≤ a, f c = b := (f : α ≤i β).le_apply_iff
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
le_apply_iff
null
lt_apply_iff [PartialOrder α] (f : α <i β) : b < f a ↔ ∃ a' < a, f a' = b := (f : α ≤i β).lt_apply_iff
theorem
Order
[ "Mathlib.Data.Sum.Order", "Mathlib.Order.Hom.Lex", "Mathlib.Order.RelIso.Set", "Mathlib.Order.UpperLower.Basic", "Mathlib.Order.WellFounded" ]
Mathlib/Order/InitialSeg.lean
lt_apply_iff
null
SupIrred (a : α) : Prop := ¬IsMin a ∧ ∀ ⦃b c⦄, b ⊔ c = a → b = a ∨ c = a
def
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupIrred
A sup-irreducible element is a non-bottom element which isn't the supremum of anything smaller.
SupPrime (a : α) : Prop := ¬IsMin a ∧ ∀ ⦃b c⦄, a ≤ b ⊔ c → a ≤ b ∨ a ≤ c
def
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime
A sup-prime element is a non-bottom element which isn't less than the supremum of anything smaller.
SupIrred.not_isMin (ha : SupIrred a) : ¬IsMin a := ha.1
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupIrred.not_isMin
null
SupPrime.not_isMin (ha : SupPrime a) : ¬IsMin a := ha.1
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime.not_isMin
null
IsMin.not_supIrred (ha : IsMin a) : ¬SupIrred a := fun h => h.1 ha
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
IsMin.not_supIrred
null
IsMin.not_supPrime (ha : IsMin a) : ¬SupPrime a := fun h => h.1 ha @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
IsMin.not_supPrime
null
not_supIrred : ¬SupIrred a ↔ IsMin a ∨ ∃ b c, b ⊔ c = a ∧ b < a ∧ c < a := by rw [SupIrred, not_and_or] push_neg rw [exists₂_congr] simp +contextual [@eq_comm _ _ a] @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_supIrred
null
not_supPrime : ¬SupPrime a ↔ IsMin a ∨ ∃ b c, a ≤ b ⊔ c ∧ ¬a ≤ b ∧ ¬a ≤ c := by rw [SupPrime, not_and_or]; push_neg; rfl
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_supPrime
null
protected SupPrime.supIrred : SupPrime a → SupIrred a := And.imp_right fun h b c ha => by simpa [← ha] using h ha.ge
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime.supIrred
null
SupPrime.le_sup (ha : SupPrime a) : a ≤ b ⊔ c ↔ a ≤ b ∨ a ≤ c := ⟨fun h => ha.2 h, fun h => h.elim le_sup_of_le_left le_sup_of_le_right⟩ variable [OrderBot α] {s : Finset ι} {f : ι → α} @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime.le_sup
null
not_supIrred_bot : ¬SupIrred (⊥ : α) := isMin_bot.not_supIrred @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_supIrred_bot
null
not_supPrime_bot : ¬SupPrime (⊥ : α) := isMin_bot.not_supPrime
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_supPrime_bot
null
SupIrred.ne_bot (ha : SupIrred a) : a ≠ ⊥ := by rintro rfl; exact not_supIrred_bot ha
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupIrred.ne_bot
null
SupPrime.ne_bot (ha : SupPrime a) : a ≠ ⊥ := by rintro rfl; exact not_supPrime_bot ha
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime.ne_bot
null
SupIrred.finset_sup_eq (ha : SupIrred a) (h : s.sup f = a) : ∃ i ∈ s, f i = a := by classical induction s using Finset.induction with | empty => simpa [ha.ne_bot] using h.symm | insert i s _ ih => simp only [exists_mem_insert] at ih ⊢ rw [sup_insert] at h exact (ha.2 h).imp_right ih
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupIrred.finset_sup_eq
null
SupPrime.le_finset_sup (ha : SupPrime a) : a ≤ s.sup f ↔ ∃ i ∈ s, a ≤ f i := by classical induction s using Finset.induction with | empty => simp [ha.ne_bot] | insert i s _ ih => simp only [exists_mem_insert, sup_insert, ha.le_sup, ih] variable [WellFoundedLT α]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
SupPrime.le_finset_sup
null
exists_supIrred_decomposition (a : α) : ∃ s : Finset α, s.sup id = a ∧ ∀ ⦃b⦄, b ∈ s → SupIrred b := by classical apply WellFoundedLT.induction a _ clear a rintro a ih by_cases ha : SupIrred a · exact ⟨{a}, by simp [ha]⟩ rw [not_supIrred] at ha obtain ha | ⟨b, c, rfl, hb, hc⟩ := ha · exact ⟨∅, by s...
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
exists_supIrred_decomposition
In a well-founded lattice, any element is the supremum of finitely many sup-irreducible elements. This is the order-theoretic analogue of prime factorisation.
InfIrred (a : α) : Prop := ¬IsMax a ∧ ∀ ⦃b c⦄, b ⊓ c = a → b = a ∨ c = a
def
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfIrred
An inf-irreducible element is a non-top element which isn't the infimum of anything bigger.
InfPrime (a : α) : Prop := ¬IsMax a ∧ ∀ ⦃b c⦄, b ⊓ c ≤ a → b ≤ a ∨ c ≤ a @[simp]
def
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfPrime
An inf-prime element is a non-top element which isn't bigger than the infimum of anything bigger.
IsMax.not_infIrred (ha : IsMax a) : ¬InfIrred a := fun h => h.1 ha @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
IsMax.not_infIrred
null
IsMax.not_infPrime (ha : IsMax a) : ¬InfPrime a := fun h => h.1 ha @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
IsMax.not_infPrime
null
not_infIrred : ¬InfIrred a ↔ IsMax a ∨ ∃ b c, b ⊓ c = a ∧ a < b ∧ a < c := @not_supIrred αᵒᵈ _ _ @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_infIrred
null
not_infPrime : ¬InfPrime a ↔ IsMax a ∨ ∃ b c, b ⊓ c ≤ a ∧ ¬b ≤ a ∧ ¬c ≤ a := @not_supPrime αᵒᵈ _ _
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_infPrime
null
protected InfPrime.infIrred : InfPrime a → InfIrred a := And.imp_right fun h b c ha => by simpa [← ha] using h ha.le
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfPrime.infIrred
null
InfPrime.inf_le (ha : InfPrime a) : b ⊓ c ≤ a ↔ b ≤ a ∨ c ≤ a := ⟨fun h => ha.2 h, fun h => h.elim inf_le_of_left_le inf_le_of_right_le⟩ variable [OrderTop α] {s : Finset ι} {f : ι → α}
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfPrime.inf_le
null
not_infIrred_top : ¬InfIrred (⊤ : α) := isMax_top.not_infIrred
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_infIrred_top
null
not_infPrime_top : ¬InfPrime (⊤ : α) := isMax_top.not_infPrime
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
not_infPrime_top
null
InfIrred.ne_top (ha : InfIrred a) : a ≠ ⊤ := by rintro rfl; exact not_infIrred_top ha
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfIrred.ne_top
null
InfPrime.ne_top (ha : InfPrime a) : a ≠ ⊤ := by rintro rfl; exact not_infPrime_top ha
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfPrime.ne_top
null
InfIrred.finset_inf_eq : InfIrred a → s.inf f = a → ∃ i ∈ s, f i = a := @SupIrred.finset_sup_eq _ αᵒᵈ _ _ _ _ _
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfIrred.finset_inf_eq
null
InfPrime.finset_inf_le (ha : InfPrime a) : s.inf f ≤ a ↔ ∃ i ∈ s, f i ≤ a := @SupPrime.le_finset_sup _ αᵒᵈ _ _ _ _ _ ha variable [WellFoundedGT α]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
InfPrime.finset_inf_le
null
exists_infIrred_decomposition (a : α) : ∃ s : Finset α, s.inf id = a ∧ ∀ ⦃b⦄, b ∈ s → InfIrred b := exists_supIrred_decomposition (α := αᵒᵈ) _
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
exists_infIrred_decomposition
In a cowell-founded lattice, any element is the infimum of finitely many inf-irreducible elements. This is the order-theoretic analogue of prime factorisation.
@[simp] infIrred_toDual {a : α} : InfIrred (toDual a) ↔ SupIrred a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
infIrred_toDual
null
infPrime_toDual {a : α} : InfPrime (toDual a) ↔ SupPrime a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
infPrime_toDual
null
supIrred_ofDual {a : αᵒᵈ} : SupIrred (ofDual a) ↔ InfIrred a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
supIrred_ofDual
null
supPrime_ofDual {a : αᵒᵈ} : SupPrime (ofDual a) ↔ InfPrime a := Iff.rfl alias ⟨_, SupIrred.dual⟩ := infIrred_toDual alias ⟨_, SupPrime.dual⟩ := infPrime_toDual alias ⟨_, InfIrred.ofDual⟩ := supIrred_ofDual alias ⟨_, InfPrime.ofDual⟩ := supPrime_ofDual
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
supPrime_ofDual
null
@[simp] supIrred_toDual {a : α} : SupIrred (toDual a) ↔ InfIrred a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
supIrred_toDual
null
supPrime_toDual {a : α} : SupPrime (toDual a) ↔ InfPrime a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
supPrime_toDual
null
infIrred_ofDual {a : αᵒᵈ} : InfIrred (ofDual a) ↔ SupIrred a := Iff.rfl @[simp]
theorem
Order
[ "Mathlib.Data.Finset.Lattice.Fold" ]
Mathlib/Order/Irreducible.lean
infIrred_ofDual
null