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 ⌀ |
|---|---|---|---|---|---|---|
update_lt_self_iff : update x i a < x ↔ a < x i := by simp [lt_iff_le_not_ge] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | update_lt_self_iff | null |
Pi.sdiff [∀ i, SDiff (π i)] : SDiff (∀ i, π i) :=
⟨fun x y i ↦ x i \ y i⟩ | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Pi.sdiff | null |
Pi.sdiff_def [∀ i, SDiff (π i)] (x y : ∀ i, π i) :
x \ y = fun i ↦ x i \ y i :=
rfl
@[simp] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Pi.sdiff_def | null |
Pi.sdiff_apply [∀ i, SDiff (π i)] (x y : ∀ i, π i) (i : ι) :
(x \ y) i = x i \ y i :=
rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Pi.sdiff_apply | null |
@[simp]
const_le_const : const β a ≤ const β b ↔ a ≤ b := by simp [Pi.le_def]
@[simp] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | const_le_const | null |
const_lt_const : const β a < const β b ↔ a < b := by simpa [Pi.lt_def] using le_of_lt | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | const_lt_const | null |
Function.Injective.preorder [Preorder β] [LE α] [LT α] (f : α → β)
(le : ∀ {x y}, f x ≤ f y ↔ x ≤ y) (lt : ∀ {x y}, f x < f y ↔ x < y) :
Preorder α where
le_refl _ := le.1 <| le_refl _
le_trans _ _ _ h₁ h₂ := le.1 <| le_trans (le.2 h₁) (le.2 h₂)
lt_iff_le_not_ge _ _ := by
rw [← le, ← le, ← lt, lt_iff_... | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Function.Injective.preorder | Pull back a `Preorder` instance along an injective function.
See note [reducible non-instances]. |
Function.Injective.partialOrder [PartialOrder β] [LE α] [LT α] (f : α → β)
(hf : Function.Injective f)
(le : ∀ {x y}, f x ≤ f y ↔ x ≤ y) (lt : ∀ {x y}, f x < f y ↔ x < y) :
PartialOrder α where
__ := Function.Injective.preorder f le lt
le_antisymm _ _ h₁ h₂ := hf <| le_antisymm (le.2 h₁) (le.2 h₂) | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Function.Injective.partialOrder | Pull back a `PartialOrder` instance along an injective function.
See note [reducible non-instances]. |
Function.Injective.linearOrder [LinearOrder β] [LE α] [LT α] [Max α] [Min α] [Ord α]
[DecidableEq α] [DecidableLE α] [DecidableLT α] (f : α → β)
(hf : Function.Injective f) (le : ∀ {x y}, f x ≤ f y ↔ x ≤ y) (lt : ∀ {x y}, f x < f y ↔ x < y)
(min : ∀ x y, f (x ⊓ y) = f x ⊓ f y) (max : ∀ x y, f (x ⊔ y) = f x ... | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Function.Injective.linearOrder | Pull back a `LinearOrder` instance along an injective function.
See note [reducible non-instances]. |
Preorder.lift [Preorder β] (f : α → β) : Preorder α :=
letI _instLE : LE α := ⟨fun a b ↦ f a ≤ f b⟩
letI _instLT : LT α := ⟨fun a b ↦ f a < f b⟩
Function.Injective.preorder f .rfl .rfl | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Preorder.lift | Transfer a `Preorder` on `β` to a `Preorder` on `α` using a function `f : α → β`.
See also `Function.Injective.preorder` when only the proof fields need to be transferred.
See note [reducible non-instances]. |
PartialOrder.lift [PartialOrder β] (f : α → β) (inj : Injective f) : PartialOrder α :=
letI _instLE : LE α := ⟨fun a b ↦ f a ≤ f b⟩
letI _instLT : LT α := ⟨fun a b ↦ f a < f b⟩
Function.Injective.partialOrder f inj .rfl .rfl | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | PartialOrder.lift | Transfer a `PartialOrder` on `β` to a `PartialOrder` on `α` using an injective
function `f : α → β`.
See also `Function.Injective.partialOrder` when only the proof fields need to be transferred.
See note [reducible non-instances]. |
compare_of_injective_eq_compareOfLessAndEq (a b : α) [LinearOrder β]
[DecidableEq α] (f : α → β) (inj : Injective f)
[Decidable (LT.lt (self := PartialOrder.lift f inj |>.toLT) a b)] :
compare (f a) (f b) =
@compareOfLessAndEq _ a b (PartialOrder.lift f inj |>.toLT) _ _ := by
have h := LinearOrder.c... | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | compare_of_injective_eq_compareOfLessAndEq | null |
LinearOrder.lift [LinearOrder β] [Max α] [Min α] (f : α → β) (inj : Injective f)
(hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
LinearOrder α :=
letI _instLE : LE α := ⟨fun a b ↦ f a ≤ f b⟩
letI _instLT : LT α := ⟨fun a b ↦ f a < f b⟩
letI _instOrdα : Ord α := ⟨f... | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | LinearOrder.lift | Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version takes `[Max α]` and `[Min α]` as arguments, then uses
them for `max` and `min` fields. See `LinearOrder.lift'` for a version that autogenerates `min` and
`max` fields, and `LinearOrder.liftWithOrd` for one th... |
LinearOrder.lift' [LinearOrder β] (f : α → β) (inj : Injective f) : LinearOrder α :=
@LinearOrder.lift α β _ ⟨fun x y ↦ if f x ≤ f y then y else x⟩
⟨fun x y ↦ if f x ≤ f y then x else y⟩ f inj
(fun _ _ ↦ (apply_ite f _ _ _).trans (max_def _ _).symm) fun _ _ ↦
(apply_ite f _ _ _).trans (min_def _ _).symm | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | LinearOrder.lift' | Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version autogenerates `min` and `max` fields. See `LinearOrder.lift`
for a version that takes `[Max α]` and `[Min α]`, then uses them as `max` and `min`. See
`LinearOrder.liftWithOrd'` for a version which does not au... |
LinearOrder.liftWithOrd [LinearOrder β] [Max α] [Min α] [Ord α] (f : α → β)
(inj : Injective f) (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y))
(hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y))
(compare_f : ∀ a b : α, compare a b = compare (f a) (f b)) : LinearOrder α :=
letI _instLE : LE α := ⟨fun a b ↦ f a ≤ f b⟩... | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | LinearOrder.liftWithOrd | Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version takes `[Max α]` and `[Min α]` as arguments, then uses
them for `max` and `min` fields. It also takes `[Ord α]` as an argument and uses them for `compare`
fields. See `LinearOrder.lift` for a version that auto... |
LinearOrder.liftWithOrd' [LinearOrder β] [Ord α] (f : α → β)
(inj : Injective f)
(compare_f : ∀ a b : α, compare a b = compare (f a) (f b)) : LinearOrder α :=
@LinearOrder.liftWithOrd α β _ ⟨fun x y ↦ if f x ≤ f y then y else x⟩
⟨fun x y ↦ if f x ≤ f y then x else y⟩ _ f inj
(fun _ _ ↦ (apply_ite f _ ... | abbrev | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | LinearOrder.liftWithOrd' | Transfer a `LinearOrder` on `β` to a `LinearOrder` on `α` using an injective
function `f : α → β`. This version auto-generates `min` and `max` fields. It also takes `[Ord α]`
as an argument and uses them for `compare` fields. See `LinearOrder.lift` for a version that
autogenerates `compare` fields, and `LinearOrder.lif... |
@[simp]
mk_le_mk [LE α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y} :
(⟨x, hx⟩ : Subtype p) ≤ ⟨y, hy⟩ ↔ x ≤ y :=
Iff.rfl
@[gcongr] alias ⟨_, GCongr.mk_le_mk⟩ := mk_le_mk
@[simp] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_le_mk | null |
mk_lt_mk [LT α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y} :
(⟨x, hx⟩ : Subtype p) < ⟨y, hy⟩ ↔ x < y :=
Iff.rfl
@[gcongr] alias ⟨_, GCongr.mk_lt_mk⟩ := mk_lt_mk
@[simp, norm_cast] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk | null |
coe_le_coe [LE α] {p : α → Prop} {x y : Subtype p} : (x : α) ≤ y ↔ x ≤ y :=
Iff.rfl
@[gcongr] alias ⟨_, GCongr.coe_le_coe⟩ := coe_le_coe
@[simp, norm_cast] | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | coe_le_coe | null |
coe_lt_coe [LT α] {p : α → Prop} {x y : Subtype p} : (x : α) < y ↔ x < y :=
Iff.rfl
@[gcongr] alias ⟨_, GCongr.coe_lt_coe⟩ := coe_lt_coe | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | coe_lt_coe | null |
preorder [Preorder α] (p : α → Prop) : Preorder (Subtype p) :=
Preorder.lift (fun (a : Subtype p) ↦ (a : α)) | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | preorder | null |
partialOrder [PartialOrder α] (p : α → Prop) : PartialOrder (Subtype p) :=
PartialOrder.lift (fun (a : Subtype p) ↦ (a : α)) Subtype.coe_injective | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | partialOrder | null |
decidableLE [Preorder α] [h : DecidableLE α] {p : α → Prop} :
DecidableLE (Subtype p) := fun a b ↦ h a b | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | decidableLE | null |
decidableLT [Preorder α] [h : DecidableLT α] {p : α → Prop} :
DecidableLT (Subtype p) := fun a b ↦ h a b | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | decidableLT | null |
instLinearOrder [LinearOrder α] (p : α → Prop) : LinearOrder (Subtype p) :=
@LinearOrder.lift (Subtype p) _ _ ⟨fun x y ↦ ⟨max x y, max_rec' _ x.2 y.2⟩⟩
⟨fun x y ↦ ⟨min x y, min_rec' _ x.2 y.2⟩⟩ (fun (a : Subtype p) ↦ (a : α))
Subtype.coe_injective (fun _ _ ↦ rfl) fun _ _ ↦
rfl | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | instLinearOrder | A subtype of a linear order is a linear order. We explicitly give the proofs of decidable
equality and decidable order in order to ensure the decidability instances are all definitionally
equal. |
instDecidableLE [Decidable (x.1 ≤ y.1)] [Decidable (x.2 ≤ y.2)] : Decidable (x ≤ y) :=
inferInstanceAs (Decidable (x.1 ≤ y.1 ∧ x.2 ≤ y.2)) | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | instDecidableLE | null |
le_def : x ≤ y ↔ x.1 ≤ y.1 ∧ x.2 ≤ y.2 := .rfl
@[simp] lemma mk_le_mk : (a₁, b₁) ≤ (a₂, b₂) ↔ a₁ ≤ a₂ ∧ b₁ ≤ b₂ := .rfl
@[gcongr] lemma GCongr.mk_le_mk (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) : (a₁, b₁) ≤ (a₂, b₂) := ⟨ha, hb⟩
@[simp] lemma swap_le_swap : x.swap ≤ y.swap ↔ x ≤ y := and_comm
@[simp] lemma swap_le_mk : x.swap ≤ (b,... | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | le_def | null |
@[simp]
swap_lt_swap : x.swap < y.swap ↔ x < y :=
and_congr swap_le_swap (not_congr swap_le_swap)
@[simp] lemma swap_lt_mk : x.swap < (b, a) ↔ x < (a, b) := by rw [← swap_lt_swap]; simp
@[simp] lemma mk_lt_swap : (b, a) < x.swap ↔ (a, b) < x := by rw [← swap_lt_swap]; simp | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | swap_lt_swap | null |
mk_le_mk_iff_left : (a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂ :=
and_iff_left le_rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_le_mk_iff_left | null |
mk_le_mk_iff_right : (a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂ :=
and_iff_right le_rfl
@[gcongr] alias ⟨_, GCongr.mk_le_mk_left⟩ := mk_le_mk_iff_left
@[gcongr] alias ⟨_, GCongr.mk_le_mk_right⟩ := mk_le_mk_iff_right | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_le_mk_iff_right | null |
mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_left mk_le_mk_iff_left | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk_iff_left | null |
mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂ :=
lt_iff_lt_of_le_iff_le' mk_le_mk_iff_right mk_le_mk_iff_right | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk_iff_right | null |
lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2 := by
refine ⟨fun h ↦ ?_, ?_⟩
· by_cases h₁ : y.1 ≤ x.1
· exact Or.inr ⟨h.1.1, LE.le.lt_of_not_ge h.1.2 fun h₂ ↦ h.2 ⟨h₁, h₂⟩⟩
· exact Or.inl ⟨LE.le.lt_of_not_ge h.1.1 h₁, h.1.2⟩
· rintro (⟨h₁, h₂⟩ | ⟨h₁, h₂⟩)
· exact ⟨⟨h₁.le, h₂⟩, fun h ↦... | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | lt_iff | null |
mk_lt_mk : (a₁, b₁) < (a₂, b₂) ↔ a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂ :=
lt_iff | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk | null |
protected lt_of_lt_of_le (h₁ : x.1 < y.1) (h₂ : x.2 ≤ y.2) : x < y := by simp [lt_iff, *] | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | lt_of_lt_of_le | null |
protected lt_of_le_of_lt (h₁ : x.1 ≤ y.1) (h₂ : x.2 < y.2) : x < y := by simp [lt_iff, *] | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | lt_of_le_of_lt | null |
mk_lt_mk_of_lt_of_le (h₁ : a₁ < a₂) (h₂ : b₁ ≤ b₂) : (a₁, b₁) < (a₂, b₂) := by
simp [lt_iff, *] | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk_of_lt_of_le | null |
mk_lt_mk_of_le_of_lt (h₁ : a₁ ≤ a₂) (h₂ : b₁ < b₂) : (a₁, b₁) < (a₂, b₂) := by
simp [lt_iff, *] | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | mk_lt_mk_of_le_of_lt | null |
instPartialOrder (α β : Type*) [PartialOrder α] [PartialOrder β] :
PartialOrder (α × β) where
__ := inferInstanceAs (Preorder (α × β))
le_antisymm := fun _ _ ⟨hac, hbd⟩ ⟨hca, hdb⟩ ↦ Prod.ext (hac.antisymm hca) (hbd.antisymm hdb) | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | instPartialOrder | The pointwise partial order on a product.
(The lexicographic ordering is defined in `Order.Lexicographic`, and the instances are
available via the type synonym `α ×ₗ β = α × β`.) |
DenselyOrdered (α : Type*) [LT α] : Prop where
/-- An order is dense if there is an element between any pair of distinct elements. -/
dense : ∀ a₁ a₂ : α, a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂ | class | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | DenselyOrdered | An order is dense if there is an element between any pair of distinct comparable elements. |
exists_between [LT α] [DenselyOrdered α] : ∀ {a₁ a₂ : α}, a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂ :=
DenselyOrdered.dense _ _ | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | exists_between | null |
OrderDual.denselyOrdered (α : Type*) [LT α] [h : DenselyOrdered α] :
DenselyOrdered αᵒᵈ :=
⟨fun _ _ ha ↦ (@exists_between α _ h _ _ ha).imp fun _ ↦ And.symm⟩
@[simp] | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | OrderDual.denselyOrdered | null |
denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α :=
⟨by convert @OrderDual.denselyOrdered αᵒᵈ _, @OrderDual.denselyOrdered α _⟩ | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | denselyOrdered_orderDual | null |
Subsingleton.instDenselyOrdered {X : Type*} [Subsingleton X] [LT X] :
DenselyOrdered X :=
⟨fun _ _ h ↦ ⟨_, h.trans_eq (Subsingleton.elim _ _), h⟩⟩ | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Subsingleton.instDenselyOrdered | Any ordered subsingleton is densely ordered. Not an instance to avoid a heavy subsingleton
typeclass search. |
le_of_forall_gt_imp_ge_of_dense (h : ∀ a, a₂ < a → a₁ ≤ a) : a₁ ≤ a₂ :=
le_of_not_gt fun ha ↦
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_lt_of_le ‹a < a₁› (h _ ‹a₂ < a›) | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | le_of_forall_gt_imp_ge_of_dense | null |
forall_gt_imp_ge_iff_le_of_dense : (∀ a, a₂ < a → a₁ ≤ a) ↔ a₁ ≤ a₂ :=
⟨le_of_forall_gt_imp_ge_of_dense, fun ha _a ha₂ ↦ ha.trans ha₂.le⟩ | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | forall_gt_imp_ge_iff_le_of_dense | null |
eq_of_le_of_forall_lt_imp_le_of_dense (h₁ : a₂ ≤ a₁) (h₂ : ∀ a, a₂ < a → a₁ ≤ a) : a₁ = a₂ :=
le_antisymm (le_of_forall_gt_imp_ge_of_dense h₂) h₁ | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | eq_of_le_of_forall_lt_imp_le_of_dense | null |
le_of_forall_lt_imp_le_of_dense (h : ∀ a < a₁, a ≤ a₂) : a₁ ≤ a₂ :=
le_of_not_gt fun ha ↦
let ⟨a, ha₁, ha₂⟩ := exists_between ha
lt_irrefl a <| lt_of_le_of_lt (h _ ‹a < a₁›) ‹a₂ < a› | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | le_of_forall_lt_imp_le_of_dense | null |
forall_lt_imp_le_iff_le_of_dense : (∀ a < a₁, a ≤ a₂) ↔ a₁ ≤ a₂ :=
⟨le_of_forall_lt_imp_le_of_dense, fun ha _a ha₁ ↦ ha₁.le.trans ha⟩ | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | forall_lt_imp_le_iff_le_of_dense | null |
eq_of_le_of_forall_gt_imp_ge_of_dense (h₁ : a₂ ≤ a₁) (h₂ : ∀ a < a₁, a ≤ a₂) : a₁ = a₂ :=
(le_of_forall_lt_imp_le_of_dense h₂).antisymm h₁ | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | eq_of_le_of_forall_gt_imp_ge_of_dense | null |
dense_or_discrete [LinearOrder α] (a₁ a₂ : α) :
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ a, a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁ :=
or_iff_not_imp_left.2 fun h ↦
⟨fun a ha₁ ↦ le_of_not_gt fun ha₂ ↦ h ⟨a, ha₁, ha₂⟩,
fun a ha₂ ↦ le_of_not_gt fun ha₁ ↦ h ⟨a, ha₁, ha₂⟩⟩ | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | dense_or_discrete | null |
eq_or_eq_or_eq_of_forall_not_lt_lt [LinearOrder α]
(h : ∀ ⦃x y z : α⦄, x < y → y < z → False) (x y z : α) : x = y ∨ y = z ∨ x = z := by
by_contra hne
simp only [not_or, ← Ne.eq_def] at hne
rcases hne.1.lt_or_gt with h₁ | h₁ <;>
rcases hne.2.1.lt_or_gt with h₂ | h₂ <;>
rcases hne.2.2.lt_or_gt with h₃ | h₃
... | lemma | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | eq_or_eq_or_eq_of_forall_not_lt_lt | If a linear order has no elements `x < y < z`, then it has at most two elements. |
instLinearOrder : LinearOrder PUnit where
le := fun _ _ ↦ True
lt := fun _ _ ↦ False
max := fun _ _ ↦ unit
min := fun _ _ ↦ unit
toDecidableEq := inferInstance
toDecidableLE := fun _ _ ↦ Decidable.isTrue trivial
toDecidableLT := fun _ _ ↦ Decidable.isFalse id
le_refl := by intros; trivial
le_tra... | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | instLinearOrder | null |
max_eq : max a b = unit :=
rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | max_eq | null |
min_eq : min a b = unit :=
rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | min_eq | null |
protected le : a ≤ b :=
trivial | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | le | null |
not_lt : ¬a < b :=
not_false | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | not_lt | null |
Prop.le : LE Prop :=
⟨(· → ·)⟩
@[simp] | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Prop.le | Propositions form a complete Boolean algebra, where the `≤` relation is given by implication. |
le_Prop_eq : ((· ≤ ·) : Prop → Prop → Prop) = (· → ·) :=
rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | le_Prop_eq | null |
subrelation_iff_le {r s : α → α → Prop} : Subrelation r s ↔ r ≤ s :=
Iff.rfl | theorem | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | subrelation_iff_le | null |
Prop.partialOrder : PartialOrder Prop where
__ := Prop.le
le_refl _ := id
le_trans _ _ _ f g := g ∘ f
le_antisymm _ _ Hab Hba := propext ⟨Hab, Hba⟩ | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | Prop.partialOrder | null |
AsLinearOrder (α : Type*) :=
α | def | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | AsLinearOrder | Type synonym to create an instance of `LinearOrder` from a `PartialOrder` and `IsTotal α (≤)` |
noncomputable AsLinearOrder.linearOrder [PartialOrder α] [IsTotal α (· ≤ ·)] :
LinearOrder (AsLinearOrder α) where
__ := inferInstanceAs (PartialOrder α)
le_total := @total_of α (· ≤ ·) _
toDecidableLE := Classical.decRel _ | instance | Order | [
"Mathlib.Data.Subtype",
"Mathlib.Order.Defs.LinearOrder",
"Mathlib.Order.Notation",
"Mathlib.Tactic.GRewrite",
"Mathlib.Tactic.Spread",
"Mathlib.Tactic.Convert",
"Mathlib.Tactic.Inhabit",
"Mathlib.Tactic.SimpRw"
] | Mathlib/Order/Basic.lean | AsLinearOrder.linearOrder | null |
@[simp] infIrred_Ici (a : α) : InfIrred (Ici a) := by
refine ⟨fun h ↦ Ici_ne_top h.eq_top, fun s t hst ↦ ?_⟩
have := mem_Ici_iff.2 (le_refl a)
rw [← hst] at this
exact this.imp (fun ha ↦ le_antisymm (le_Ici.2 ha) <| hst.ge.trans inf_le_left) fun ha ↦
le_antisymm (le_Ici.2 ha) <| hst.ge.trans inf_le_right
... | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | infIrred_Ici | null |
@[simp] supIrred_Iic (a : α) : SupIrred (Iic a) := by
refine ⟨fun h ↦ Iic_ne_bot h.eq_bot, fun s t hst ↦ ?_⟩
have := mem_Iic_iff.2 (le_refl a)
rw [← hst] at this
exact this.imp (fun ha ↦ (le_sup_left.trans_eq hst).antisymm <| Iic_le.2 ha) fun ha ↦
(le_sup_right.trans_eq hst).antisymm <| Iic_le.2 ha
variable... | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | supIrred_Iic | null |
supIrredLowerSet : α ↪o {s : LowerSet α // SupIrred s} where
toFun a := ⟨Iic a, supIrred_Iic _⟩
inj' _ := by simp
map_rel_iff' := by simp | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | supIrredLowerSet | The **Birkhoff Embedding** of a finite partial order as sup-irreducible elements in its
lattice of lower sets. |
infIrredUpperSet : α ↪o {s : UpperSet α // InfIrred s} where
toFun a := ⟨Ici a, infIrred_Ici _⟩
inj' _ := by simp
map_rel_iff' := by simp
@[simp] lemma supIrredLowerSet_apply (a : α) : supIrredLowerSet a = ⟨Iic a, supIrred_Iic _⟩ := rfl
@[simp] lemma infIrredUpperSet_apply (a : α) : infIrredUpperSet a = ⟨Ici a, i... | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | infIrredUpperSet | The **Birkhoff Embedding** of a finite partial order as inf-irreducible elements in its
lattice of lower sets. |
supIrredLowerSet_surjective : Surjective (supIrredLowerSet (α := α)) := by
aesop (add simp Surjective) | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | supIrredLowerSet_surjective | null |
infIrredUpperSet_surjective : Surjective (infIrredUpperSet (α := α)) := by
aesop (add simp Surjective) | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | infIrredUpperSet_surjective | null |
noncomputable supIrredLowerSet : α ≃o {s : LowerSet α // SupIrred s} :=
RelIso.ofSurjective _ OrderEmbedding.supIrredLowerSet_surjective | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | supIrredLowerSet | **Birkhoff Representation for partial orders.** Any partial order is isomorphic
to the partial order of sup-irreducible elements in its lattice of lower sets. |
noncomputable infIrredUpperSet : α ≃o {s : UpperSet α // InfIrred s} :=
RelIso.ofSurjective _ OrderEmbedding.infIrredUpperSet_surjective
@[simp] lemma supIrredLowerSet_apply (a : α) : supIrredLowerSet a = ⟨Iic a, supIrred_Iic _⟩ := rfl
@[simp] lemma infIrredUpperSet_apply (a : α) : infIrredUpperSet a = ⟨Ici a, infIrr... | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | infIrredUpperSet | **Birkhoff Representation for partial orders.** Any partial order is isomorphic
to the partial order of inf-irreducible elements in its lattice of upper sets. |
@[simp] supIrredLowerSet_symm_apply (s : {s : LowerSet α // SupIrred s}) [Fintype s] :
supIrredLowerSet.symm s = (s.1 : Set α).toFinset.sup id := by
classical
obtain ⟨s, hs⟩ := s
obtain ⟨a, rfl⟩ := supIrred_iff_of_finite.1 hs
cases nonempty_fintype α
have : LocallyFiniteOrder α := Fintype.toLocallyFiniteO... | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | supIrredLowerSet_symm_apply | null |
@[simp] infIrredUpperSet_symm_apply (s : {s : UpperSet α // InfIrred s}) [Fintype s] :
infIrredUpperSet.symm s = (s.1 : Set α).toFinset.inf id := by
classical
obtain ⟨s, hs⟩ := s
obtain ⟨a, rfl⟩ := infIrred_iff_of_finite.1 hs
cases nonempty_fintype α
have : LocallyFiniteOrder α := Fintype.toLocallyFiniteO... | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | infIrredUpperSet_symm_apply | null |
noncomputable OrderIso.lowerSetSupIrred [OrderBot α] : α ≃o LowerSet {a : α // SupIrred a} :=
Equiv.toOrderIso
{ toFun := fun a ↦ ⟨{b | ↑b ≤ a}, fun _ _ hcb hba ↦ hba.trans' hcb⟩
invFun := fun s ↦ (s : Set {a : α // SupIrred a}).toFinset.sup (↑)
left_inv := fun a ↦ by
refine le_antisymm (Finse... | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | OrderIso.lowerSetSupIrred | **Birkhoff Representation for finite distributive lattices**. Any nonempty finite distributive
lattice is isomorphic to the lattice of lower sets of its sup-irreducible elements. |
noncomputable birkhoffSet : α ↪o Set {a : α // SupIrred a} := by
by_cases h : IsEmpty α
· exact OrderEmbedding.ofIsEmpty
push_neg at h
have := Fintype.toOrderBot α
exact OrderIso.lowerSetSupIrred.toOrderEmbedding.trans ⟨⟨_, SetLike.coe_injective⟩, Iff.rfl⟩ | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | birkhoffSet | **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. |
noncomputable birkhoffFinset : α ↪o Finset {a : α // SupIrred a} := by
exact birkhoffSet.trans Fintype.finsetOrderIsoSet.symm.toOrderEmbedding
@[simp] lemma coe_birkhoffFinset (a : α) : birkhoffFinset a = birkhoffSet a := by
classical
simp [birkhoffFinset, (OrderIso.coe_toOrderEmbedding)]
@[simp] lemma birkhoffSe... | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | birkhoffFinset | **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. |
noncomputable birkhoffSet : LatticeHom α (Set {a : α // SupIrred a}) where
toFun := OrderEmbedding.birkhoffSet
map_sup' := OrderEmbedding.birkhoffSet_sup
map_inf' := OrderEmbedding.birkhoffSet_inf
open Classical in | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | birkhoffSet | **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. |
noncomputable birkhoffFinset : LatticeHom α (Finset {a : α // SupIrred a}) where
toFun := OrderEmbedding.birkhoffFinset
map_sup' := OrderEmbedding.birkhoffFinset_sup
map_inf' := OrderEmbedding.birkhoffFinset_inf | def | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | birkhoffFinset | **Birkhoff's Representation Theorem**. Any finite distributive lattice can be embedded in a
powerset lattice. |
birkhoffFinset_injective : Injective (birkhoffFinset (α := α)) :=
OrderEmbedding.birkhoffFinset.injective | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | birkhoffFinset_injective | null |
exists_birkhoff_representation.{u} (α : Type u) [Finite α] [DistribLattice α] :
∃ (β : Type u) (_ : DecidableEq β) (_ : Fintype β) (f : LatticeHom α (Finset β)),
Injective f := by
classical
cases nonempty_fintype α
exact ⟨{a : α // SupIrred a}, _, inferInstance, _, LatticeHom.birkhoffFinset_injective⟩ | lemma | Order | [
"Mathlib.Data.Fintype.Order",
"Mathlib.Order.Interval.Finset.Basic",
"Mathlib.Order.Irreducible",
"Mathlib.Order.UpperLower.Closure"
] | Mathlib/Order/Birkhoff.lean | exists_birkhoff_representation. | null |
BooleanGenerators (S : Set α) : Prop where
/-- The elements in a collection of Boolean generators are all atoms. -/
isAtom : ∀ I ∈ S, IsAtom I
/-- The elements in a collection of Boolean generators satisfy an atomicity condition:
any compact element below the supremum of a finite subset `s` of generators
is e... | structure | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | BooleanGenerators | An alternative constructor for Boolean algebras.
A set of *Boolean generators* in a compactly generated complete lattice is a subset `S` such that
* the elements of `S` are all atoms, and
* the set `S` satisfies an atomicity condition:
any compact element below the supremum of a finite subset `s` of generators
is... |
mono (hS : BooleanGenerators S) {T : Set α} (hTS : T ⊆ S) : BooleanGenerators T where
isAtom I hI := hS.isAtom I (hTS hI)
finitelyAtomistic := fun s a hs ↦ hS.finitelyAtomistic s a (le_trans hs hTS)
variable [IsCompactlyGenerated α] | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | mono | null |
atomistic (hS : BooleanGenerators S) (a : α) (ha : a ≤ sSup S) : ∃ T ⊆ S, a = sSup T := by
obtain ⟨C, hC, rfl⟩ := IsCompactlyGenerated.exists_sSup_eq a
have aux : ∀ b : α, IsCompactElement b → b ≤ sSup S → ∃ T ⊆ S, b = sSup T := by
intro b hb hbS
obtain ⟨s, hs₁, hs₂⟩ := hb S hbS
obtain ⟨t, ht, rfl⟩ := h... | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | atomistic | null |
isAtomistic_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
IsAtomistic α := by
refine CompleteLattice.isAtomistic_iff.2 fun a ↦ ?_
obtain ⟨s, hs, hs'⟩ := hS.atomistic a (h ▸ le_top)
exact ⟨s, hs', fun I hI ↦ hS.isAtom I (hs hI)⟩ | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | isAtomistic_of_sSup_eq_top | null |
mem_of_isAtom_of_le_sSup_atoms (hS : BooleanGenerators S) (a : α) (ha : IsAtom a)
(haS : a ≤ sSup S) : a ∈ S := by
obtain ⟨T, hT, rfl⟩ := hS.atomistic a haS
obtain rfl | ⟨a, haT⟩ := T.eq_empty_or_nonempty
· simp only [sSup_empty] at ha
exact (ha.1 rfl).elim
suffices sSup T = a from this ▸ hT haT
have ... | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | mem_of_isAtom_of_le_sSup_atoms | null |
sSup_inter (hS : BooleanGenerators S) {T₁ T₂ : Set α} (hT₁ : T₁ ⊆ S) (hT₂ : T₂ ⊆ S) :
sSup (T₁ ∩ T₂) = (sSup T₁) ⊓ (sSup T₂) := by
apply le_antisymm
· apply le_inf
· apply sSup_le_sSup Set.inter_subset_left
· apply sSup_le_sSup Set.inter_subset_right
obtain ⟨X, hX, hX'⟩ := hS.atomistic (sSup T₁ ⊓ sSup... | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | sSup_inter | null |
distribLattice_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
DistribLattice α where
le_sup_inf a b c := by
obtain ⟨Ta, hTa, rfl⟩ := hS.atomistic a (h ▸ le_top)
obtain ⟨Tb, hTb, rfl⟩ := hS.atomistic b (h ▸ le_top)
obtain ⟨Tc, hTc, rfl⟩ := hS.atomistic c (h ▸ le_top)
apply le_of_eq
... | def | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | distribLattice_of_sSup_eq_top | A lattice generated by Boolean generators is a distributive lattice. |
complementedLattice_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
ComplementedLattice α := by
let _i := hS.distribLattice_of_sSup_eq_top h
have _i₁ := isAtomistic_of_sSup_eq_top hS h
apply complementedLattice_of_isAtomistic | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | complementedLattice_of_sSup_eq_top | null |
noncomputable
booleanAlgebra_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) : BooleanAlgebra α :=
let _i := hS.distribLattice_of_sSup_eq_top h
have := hS.complementedLattice_of_sSup_eq_top h
DistribLattice.booleanAlgebraOfComplemented α | def | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | booleanAlgebra_of_sSup_eq_top | A compactly generated complete lattice generated by Boolean generators is a Boolean algebra. |
sSup_le_sSup_iff_of_atoms (hS : BooleanGenerators S) (X Y : Set α) (hX : X ⊆ S) (hY : Y ⊆ S) :
sSup X ≤ sSup Y ↔ X ⊆ Y := by
refine ⟨?_, sSup_le_sSup⟩
intro h a ha
apply (hS.mono hY).mem_of_isAtom_of_le_sSup_atoms _ _ ((le_sSup ha).trans h)
exact (hS.mono hX).isAtom a ha | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | sSup_le_sSup_iff_of_atoms | null |
eq_atoms_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
S = {a : α | IsAtom a} := by
apply le_antisymm
· exact hS.isAtom
intro a ha
obtain ⟨T, hT, rfl⟩ := hS.atomistic a (le_top.trans h.ge)
exact hS.mem_of_isAtom_of_le_sSup_atoms _ ha (sSup_le_sSup hT) | lemma | Order | [
"Mathlib.Order.CompactlyGenerated.Basic"
] | Mathlib/Order/BooleanGenerators.lean | eq_atoms_of_sSup_eq_top | null |
Booleanisation (α : Type*) := α ⊕ α | def | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | Booleanisation | Boolean algebra containing a given generalised Boolean algebra `α` as a sublattice.
This should be thought of as made of a copy of `α` (representing elements of `α`) living under
another copy of `α` (representing complements of elements of `α`). |
instDecidableEq [DecidableEq α] : DecidableEq (Booleanisation α) :=
inferInstanceAs <| DecidableEq (α ⊕ α) | instance | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | instDecidableEq | null |
@[match_pattern] lift : α → Booleanisation α := Sum.inl | def | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | lift | The natural inclusion `a ↦ a` from a generalized Boolean algebra to its generated Boolean
algebra. |
@[match_pattern] comp : α → Booleanisation α := Sum.inr | def | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | comp | The inclusion `a ↦ aᶜ from a generalized Boolean algebra to its generated Boolean algebra. |
instCompl : HasCompl (Booleanisation α) where
compl
| lift a => comp a
| comp a => lift a
@[simp] lemma compl_lift (a : α) : (lift a)ᶜ = comp a := rfl
@[simp] lemma compl_comp (a : α) : (comp a)ᶜ = lift a := rfl
variable [GeneralizedBooleanAlgebra α] {a b : α} | instance | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | instCompl | The complement operator on `Booleanisation α` sends `a` to `aᶜ` and `aᶜ` to `a`, for `a : α`. |
protected LE : Booleanisation α → Booleanisation α → Prop
| protected lift {a b} : a ≤ b → Booleanisation.LE (lift a) (lift b)
| protected comp {a b} : a ≤ b → Booleanisation.LE (comp b) (comp a)
| protected sep {a b} : Disjoint a b → Booleanisation.LE (lift a) (comp b) | inductive | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | LE | The order on `Booleanisation α` is as follows: For `a b : α`,
* `a ≤ b` iff `a ≤ b` in `α`
* `a ≤ bᶜ` iff `a` and `b` are disjoint in `α`
* `aᶜ ≤ bᶜ` iff `b ≤ a` in `α`
* `¬ aᶜ ≤ b` |
protected LT : Booleanisation α → Booleanisation α → Prop
| protected lift {a b} : a < b → Booleanisation.LT (lift a) (lift b)
| protected comp {a b} : a < b → Booleanisation.LT (comp b) (comp a)
| protected sep {a b} : Disjoint a b → Booleanisation.LT (lift a) (comp b)
@[inherit_doc Booleanisation.LE] | inductive | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | LT | The order on `Booleanisation α` is as follows: For `a b : α`,
* `a < b` iff `a < b` in `α`
* `a < bᶜ` iff `a` and `b` are disjoint in `α`
* `aᶜ < bᶜ` iff `b < a` in `α`
* `¬ aᶜ < b` |
instLE : LE (Booleanisation α) where
le := Booleanisation.LE
@[inherit_doc Booleanisation.LT] | instance | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | instLE | null |
instLT : LT (Booleanisation α) where
lt := Booleanisation.LT | instance | Order | [
"Mathlib.Order.BooleanAlgebra.Basic",
"Mathlib.Order.Hom.Lattice"
] | Mathlib/Order/Booleanisation.lean | instLT | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.