The areas / V04. Order and lattices
Mathlib.Order.Basic
262 declarations. Mathlib docs · Source
Basic definitions about ≤ and <
This file proves basic results about orders, provides extensive dot notation, defines useful order classes and allows to transfer order instances.
Transferring orders
Order.Preimage,Preorder.lift: Transfers a (pre)order onβto an order onαusing a functionf : α → β.PartialOrder.lift,LinearOrder.lift: Transfers a partial (resp., linear) order onβto a partial (resp., linear) order onαusing an injective functionf.
Extra class
DenselyOrdered: An order with no gap, i.e. for any two elementsa < bthere existscsuch thata < c < b.
Notes
≤ and < are highly favored over ≥ and > in mathlib. The reason is that we can formulate all
lemmas using ≤/<, and rw has trouble unifying ≤ and ≥. Hence choosing one direction spares
us useless duplication.
Dot notation is particularly useful on ≤ (LE.le) and < (LT.lt). To that end, we
provide many aliases to dot notation-less lemmas. For example, le_trans is aliased with
LE.le.trans and can be used to construct hab.trans hbc : a ≤ c when hab : a ≤ b,
hbc : b ≤ c, lt_of_le_of_lt is aliased as LE.le.trans_lt and can be used to construct
hab.trans hbc : a < c when hab : a ≤ b, hbc : b < c.
TODO
- expand module docs
Tags
preorder, order, partial order, poset, linear order, chain
Bare relations
Preorders
Partial order
min/max recursors
Implications
Extensionality lemmas
Compl
Order instances on the function space
Pullbacks of order instances
Lifts of order instances
Unlike the constructions above, these construct new data fields. They should be avoided if the types already define any order or decidability instances.
Subtype of an order
Pointwise order on α × β
The lexicographic order is defined in Order.Prod.Lex.Basic, and the instances are available via
the type synonym α ×ₗ β = α × β.
Additional order classes
theorem LE.ext E1 #
∀ {α : Type u} {x y : LE α}, LE.le = LE.le → x = y
theorem LE.ext_iff E0 #
∀ {α : Type u} {x y : LE α}, x = y ↔ LE.le = LE.le
theorem LE.le.ge E1 #
∀ {α : Type u_2} [inst : LE α] {a b : α}, a ≤ b → b ≥ a
theorem GE.ge.le E1 #
∀ {α : Type u_2} [inst : LE α] {a b : α}, a ≥ b → b ≤ a
theorem LE.le.trans_eq E0 #
∀ {α : Type u_1} {a b c : α} [inst : LE α], a ≤ b → b = c → a ≤ c
Alias of le_of_le_of_eq.
theorem LE.le.trans_eq' E1 #
∀ {α : Type u_1} {a b c : α} [inst : LE α], b ≤ a → b = c → c ≤ a
Alias of le_of_le_of_eq''.
theorem Eq.trans_ge E1 #
∀ {α : Type u_1} {a b c : α} [inst : LE α], a = b → c ≤ b → c ≤ a
Alias of le_of_eq_of_le''.
theorem Eq.trans_le E1 #
∀ {α : Type u_1} {a b c : α} [inst : LE α], a = b → b ≤ c → a ≤ c
Alias of le_of_eq_of_le.
theorem LT.lt.gt E1 #
∀ {α : Type u_2} [inst : LT α] {a b : α}, a < b → b > a
theorem GT.gt.lt E1 #
∀ {α : Type u_2} [inst : LT α] {a b : α}, a > b → b < a
theorem LT.lt.trans_eq E0 #
∀ {α : Type u_1} {a b c : α} [inst : LT α], a < b → b = c → a < c
Alias of lt_of_lt_of_eq.
theorem LT.lt.trans_eq' E1 #
∀ {α : Type u_1} {a b c : α} [inst : LT α], b < a → b = c → c < a
Alias of lt_of_lt_of_eq''.
theorem Eq.trans_gt E1 #
∀ {α : Type u_1} {a b c : α} [inst : LT α], a = b → c < b → c < a
Alias of lt_of_eq_of_lt''.
theorem Eq.trans_lt E1 #
∀ {α : Type u_1} {a b c : α} [inst : LT α], a = b → b < c → a < c
Alias of lt_of_eq_of_lt.
def Order.Preimage E1 #
{α : Type u_2} → {β : Type u_3} → (α → β) → (β → β → Prop) → α → α → Prop
Given a relation R on β and a function f : α → β, the preimage relation on α is defined
by x ≤ y ↔ f x ≤ f y. It is the unique relation on α making f a RelEmbedding (assuming f
is injective).
def «term_⁻¹'o_» E1 #
Lean.TrailingParserDescr
Given a relation R on β and a function f : α → β, the preimage relation on α is defined
by x ≤ y ↔ f x ≤ f y. It is the unique relation on α making f a RelEmbedding (assuming f
is injective).
instance Order.Preimage.decidable E0 #
{α : Type u_2} → {β : Type u_3} → (f : α → β) → (s : β → β → Prop) → [H : DecidableRel s] → DecidableRel (f ⁻¹'o s)
The preimage of a decidable order is decidable.
theorem not_lt_iff_not_le_or_ge E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, ¬a < b ↔ ¬a ≤ b ∨ b ≤ a
theorem not_lt_iff_le_imp_ge E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, ¬a < b ↔ a ≤ b → b ≤ a
theorem lt_self_iff_false E0 #
∀ {α : Type u_2} [inst : Preorder α] (x : α), x < x ↔ False
theorem ge_trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b ≤ c → a ≤ c
Alias of le_trans.
theorem le_trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b ≤ a → c ≤ b → c ≤ a
Alias of ge_trans.
theorem gt_trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a < b → b < c → a < c
Alias of lt_trans.
theorem lt_trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b < a → c < b → c < a
Alias of gt_trans.
theorem LE.le.trans E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b ≤ c → a ≤ c
Alias of le_trans.
theorem LE.le.trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b ≤ a → c ≤ b → c ≤ a
Alias of ge_trans.
theorem LT.lt.trans' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b < a → c < b → c < a
Alias of gt_trans.
theorem LT.lt.trans E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a < b → b < c → a < c
Alias of lt_trans.
theorem LE.le.trans_lt' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b ≤ a → c < b → c < a
Alias of lt_of_le_of_lt'.
theorem LE.le.trans_lt E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b < c → a < c
Alias of lt_of_le_of_lt.
theorem LT.lt.trans_le' E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b < a → c ≤ b → c < a
Alias of lt_of_lt_of_le'.
theorem LT.lt.trans_le E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a < b → b ≤ c → a < c
Alias of lt_of_lt_of_le.
theorem LE.le.lt_of_not_ge E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a ≤ b → ¬b ≤ a → a < b
Alias of lt_of_le_not_ge.
theorem LT.lt.le E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → a ≤ b
Alias of le_of_lt.
theorem LT.lt.asymm E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b < a
Alias of lt_asymm.
theorem LT.lt.not_gt E1 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b < a
Alias of lt_asymm.
theorem LT.lt.ne' E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, b < a → a ≠ b
Alias of ne_of_gt.
theorem LT.lt.ne E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → a ≠ b
Alias of ne_of_lt.
theorem Eq.ge E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b → b ≤ a
Alias of ge_of_eq.
theorem Eq.le E2 #
∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b → a ≤ b
Alias of le_of_eq.
theorem LT.lt.false E1 #
∀ {α : Type u_2} [inst : Preorder α] {a : α}, a < a → False
theorem Eq.not_gt E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, a = b → ¬b < a
theorem Eq.not_lt E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, a = b → ¬a < b
theorem ne_of_not_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, ¬a ≤ b → a ≠ b
theorem ne_of_not_ge E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, ¬b ≤ a → a ≠ b
theorem le_of_subsingleton E0 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α} [Subsingleton α], a ≤ b
theorem not_lt_of_subsingleton E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α} [Subsingleton α], ¬a < b
theorem le_of_forall_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, (∀ c ≤ a, c ≤ b) → a ≤ b
theorem le_of_forall_ge E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, (∀ (c : α), a ≤ c → b ≤ c) → b ≤ a
theorem forall_le_iff_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, (∀ ⦃c : α⦄, c ≤ a → c ≤ b) ↔ a ≤ b
theorem forall_ge_iff_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b : α}, (∀ ⦃c : α⦄, a ≤ c → b ≤ c) ↔ b ≤ a
theorem le_imp_le_of_le_of_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c d : α}, c ≤ a → b ≤ d → a ≤ b → c ≤ d
monotonicity of ≤ with respect to →
theorem lt_imp_lt_of_le_of_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c d : α}, c ≤ a → b ≤ d → a < b → c < d
monotonicity of < with respect to →
theorem ge_imp_ge_of_le_of_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c d : α}, a ≤ c → d ≤ b → a ≥ b → c ≥ d
monotonicity of ≥ with respect to →
theorem gt_imp_gt_of_le_of_le E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c d : α}, a ≤ c → d ≤ b → a > b → c > d
monotonicity of > with respect to →
theorem ge_imp_gt_of_lt' E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c : α}, b < a → c ≥ a → c > b
theorem ge_imp_gt_of_lt E1 #
∀ {α : Type u_2} [inst : Preorder α] {a b c : α}, a < b → a ≥ c → b > c
def Mathlib.Tactic.GCongr.exactLeOfLt E1 #
Mathlib.Tactic.GCongr.ForwardExt
See if the term is a < b and the goal is a ≤ b.
theorem Ne.lt_of_le E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → a ≤ b → a < b
theorem Ne.lt_of_le' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → b ≤ a → b < a
theorem LE.le.antisymm' E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → a ≤ b → a = b
Alias of ge_antisymm.
theorem LE.le.antisymm E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → b ≤ a → a = b
Alias of le_antisymm.
theorem LE.le.lt_of_ne E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → a ≠ b → a < b
Alias of lt_of_le_of_ne.
theorem LE.le.lt_of_ne' E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → a ≠ b → b < a
Alias of lt_of_le_of_ne'.
theorem LE.le.lt_iff_ne E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≤ b → (a < b ↔ a ≠ b)
theorem LE.le.lt_iff_ne' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b ≤ a → (b < a ↔ a ≠ b)
theorem LE.le.not_lt_iff_eq' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b ≤ a → (¬b < a ↔ a = b)
theorem LE.le.not_lt_iff_eq E0 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≤ b → (¬a < b ↔ a = b)
theorem LE.le.ge_iff_eq' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b ≤ a → (a ≤ b ↔ a = b)
theorem LE.le.ge_iff_eq E0 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≤ b → (b ≤ a ↔ a = b)
theorem le_imp_eq_iff_le_imp_ge E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≤ b → a = b ↔ a ≤ b → b ≤ a
theorem le_imp_eq_iff_le_imp_ge' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b ≤ a → a = b ↔ b ≤ a → a ≤ b
theorem Decidable.le_iff_eq_or_lt' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α} [DecidableLE α], b ≤ a ↔ a = b ∨ b < a
theorem Decidable.le_iff_eq_or_lt E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α} [DecidableLE α], a ≤ b ↔ a = b ∨ a < b
theorem le_iff_eq_or_lt E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≤ b ↔ a = b ∨ a < b
theorem le_iff_eq_or_lt' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b ≤ a ↔ a = b ∨ b < a
theorem lt_iff_le_and_ne E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a < b ↔ a ≤ b ∧ a ≠ b
theorem lt_iff_le_and_ne' E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, b < a ↔ b ≤ a ∧ a ≠ b
theorem LE.le.lt_or_eq_dec E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], a ≤ b → a < b ∨ a = b
Alias of Decidable.lt_or_eq_of_le.
theorem LE.le.lt_or_eq_dec' E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], b ≤ a → b < a ∨ a = b
Alias of Decidable.lt_or_eq_of_le'.
theorem LE.le.lt_or_eq' E1 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → b < a ∨ a = b
Alias of lt_or_eq_of_le'.
theorem LE.le.lt_or_eq E0 #
∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → a < b ∨ a = b
Alias of lt_or_eq_of_le.
theorem Ne.le_iff_lt E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → (a ≤ b ↔ a < b)
theorem Ne.ge_iff_gt E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → (b ≤ a ↔ b < a)
theorem Ne.not_ge_or_not_le E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → ¬b ≤ a ∨ ¬a ≤ b
theorem Ne.not_le_or_not_ge E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, a ≠ b → ¬a ≤ b ∨ ¬b ≤ a
theorem Decidable.ne_iff_lt_iff_le E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α} [DecidableEq α], (a ≠ b ↔ a < b) ↔ a ≤ b
theorem Decidable.ne_iff_gt_iff_ge E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α} [DecidableEq α], (a ≠ b ↔ b < a) ↔ b ≤ a
theorem ne_iff_gt_iff_ge E0 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, (a ≠ b ↔ b < a) ↔ b ≤ a
theorem ne_iff_lt_iff_le E0 #
∀ {α : Type u_2} [inst : PartialOrder α] {a b : α}, (a ≠ b ↔ a < b) ↔ a ≤ b
theorem commutative_of_le E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] {f : β → β → α},
(∀ (a b : β), f a b ≤ f b a) → ∀ (a b : β), f a b = f b a
To prove commutativity of a binary operation ○, we only to check a ○ b ≤ b ○ a for all a,
b.
theorem associative_of_commutative_of_le E1 #
∀ {α : Type u_2} [inst : PartialOrder α] {f : α → α → α},
Std.Commutative f → (∀ (a b c : α), f (f a b) c ≤ f a (f b c)) → Std.Associative f
To prove associativity of a commutative binary operation ○, we only to check
(a ○ b) ○ c ≤ a ○ (b ○ c) for all a, b, c.
theorem LE.le.lt_or_ge E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, b ≤ a → ∀ (c : α), c < a ∨ b ≤ c
theorem LE.le.gt_or_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a ≤ b → ∀ (c : α), a < c ∨ c ≤ b
theorem LE.le.le_or_gt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, b ≤ a → ∀ (c : α), c ≤ a ∨ b < c
theorem LE.le.ge_or_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a ≤ b → ∀ (c : α), a ≤ c ∨ c < b
theorem LE.le.ge_or_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a ≤ b → ∀ (c : α), a ≤ c ∨ c ≤ b
theorem LE.le.le_or_ge E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, b ≤ a → ∀ (c : α), c ≤ a ∨ b ≤ c
theorem LT.lt.gt_or_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a < b → ∀ (c : α), a < c ∨ c < b
theorem LT.lt.lt_or_gt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, b < a → ∀ (c : α), c < a ∨ b < c
theorem Ne.gt_or_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a ≠ b → b < a ∨ a < b
theorem Ne.lt_or_gt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a ≠ b → a < b ∨ b < a
theorem lt_or_lt_iff_ne E0 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, a < b ∨ b < a ↔ a ≠ b
A version of ne_iff_lt_or_gt with LHS and RHS reversed.
theorem lt_or_gt_iff_ne' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, b < a ∨ a < b ↔ a ≠ b
theorem not_lt_iff_eq_or_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, ¬a < b ↔ a = b ∨ b < a
theorem not_lt_iff_eq_or_lt' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, ¬b < a ↔ a = b ∨ a < b
theorem exists_ge_of_linear E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), ∃ c, a ≤ c ∧ b ≤ c
theorem exists_le_of_linear E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), ∃ c ≤ a, c ≤ b
theorem exists_forall_le_and E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {p q : α → Prop},
(∃ i, ∀ (j : α), i ≥ j → p j) → (∃ i, ∀ (j : α), i ≥ j → q j) → ∃ i, ∀ (j : α), i ≥ j → p j ∧ q j
theorem exists_forall_ge_and E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {p q : α → Prop},
(∃ i, ∀ j ≥ i, p j) → (∃ i, ∀ j ≥ i, q j) → ∃ i, ∀ j ≥ i, p j ∧ q j
theorem le_of_forall_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ c < a, c < b) → a ≤ b
theorem le_of_forall_gt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ (c : α), a < c → b < c) → b ≤ a
theorem forall_lt_iff_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ ⦃c : α⦄, c < a → c < b) ↔ a ≤ b
theorem forall_gt_iff_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ ⦃c : α⦄, a < c → b < c) ↔ b ≤ a
theorem le_of_forall_lt_imp_ne E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ c < a, c ≠ b) → a ≤ b
theorem le_of_forall_gt_imp_ne E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ (c : α), a < c → c ≠ b) → b ≤ a
theorem lt_of_forall_le_imp_ne E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ c ≤ a, c ≠ b) → a < b
theorem lt_of_forall_ge_imp_ne E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ (c : α), a ≤ c → c ≠ b) → b < a
theorem forall_lt_imp_ne_iff_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ c < a, c ≠ b) ↔ a ≤ b
theorem forall_gt_imp_ne_iff_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ (c : α), a < c → c ≠ b) ↔ b ≤ a
theorem forall_ge_imp_ne_iff_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ (c : α), a ≤ c → c ≠ b) ↔ b < a
theorem forall_le_imp_ne_iff_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α}, (∀ c ≤ a, c ≠ b) ↔ a < b
theorem min_rec E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α} {p : α → Prop}, (a ≤ b → p a) → (b ≤ a → p b) → p (min a b)
theorem max_rec E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α} {p : α → Prop}, (b ≤ a → p a) → (a ≤ b → p b) → p (max a b)
theorem max_rec' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α} (p : α → Prop), p a → p b → p (max a b)
theorem min_rec' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] {a b : α} (p : α → Prop), p a → p b → p (min a b)
theorem min_def_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), min a b = if a < b then a else b
theorem max_def_lt' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), max a b = if b < a then a else b
theorem max_def_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), max a b = if a < b then b else a
theorem min_def_lt' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a b : α), min a b = if b < a then b else a
theorem lt_imp_lt_of_le_imp_le E1 #
∀ {α : Type u_2} {β : Type u_5} [inst : LinearOrder α] [inst_1 : Preorder β] {a b : α} {c d : β},
(a ≤ b → c ≤ d) → d < c → b < a
theorem le_imp_le_iff_lt_imp_lt E1 #
∀ {α : Type u_2} {β : Type u_5} [inst : LinearOrder α] [inst_1 : LinearOrder β] {a b : α} {c d : β},
a ≤ b → c ≤ d ↔ d < c → b < a
theorem lt_iff_lt_of_le_iff_le' E1 #
∀ {α : Type u_2} {β : Type u_5} [inst : Preorder α] [inst_1 : Preorder β] {a b : α} {c d : β},
(a ≤ b ↔ c ≤ d) → (b ≤ a ↔ d ≤ c) → (b < a ↔ d < c)
theorem lt_iff_lt_of_le_iff_le E1 #
∀ {α : Type u_2} {β : Type u_5} [inst : LinearOrder α] [inst_1 : LinearOrder β] {a b : α} {c d : β},
(a ≤ b ↔ c ≤ d) → (b < a ↔ d < c)
theorem le_iff_le_iff_lt_iff_lt E1 #
∀ {α : Type u_2} {β : Type u_5} [inst : LinearOrder α] [inst_1 : LinearOrder β] {a b : α} {c d : β},
(a ≤ b ↔ c ≤ d) ↔ (b < a ↔ d < c)
theorem rel_imp_eq_of_rel_imp_le E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder β] (r : α → α → Prop) [Std.Symm r] {f : α → β},
(∀ (a b : α), r a b → f a ≤ f b) → ∀ {a b : α}, r a b → f a = f b
A symmetric relation implies two values are equal, when it implies they're less-equal.
theorem map_le_of_lt_imp_le_of_le E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] [inst_1 : Preorder β] {x y : α} {f : α → β},
(x < y → f x ≤ f y) → x ≤ y → f x ≤ f y
theorem map_le_of_gt_imp_le_of_ge E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] [inst_1 : Preorder β] {x y : α} {f : α → β},
(y < x → f x ≤ f y) → y ≤ x → f x ≤ f y
theorem Preorder.toLE_injective E1 #
∀ {α : Type u_2}, Function.Injective (@Preorder.toLE α)
theorem Preorder.toLE_injective_iff E0 #
∀ {α : Type u_2} {a₁ a₂ : Preorder α}, a₁ = a₂ ↔ a₁.toLE = a₂.toLE
theorem PartialOrder.toPreorder_injective_iff E0 #
∀ {α : Type u_2} {a₁ a₂ : PartialOrder α}, a₁ = a₂ ↔ a₁.toPreorder = a₂.toPreorder
theorem PartialOrder.toPreorder_injective E1 #
∀ {α : Type u_2}, Function.Injective (@PartialOrder.toPreorder α)
theorem LinearOrder.toPartialOrder_injective_iff E0 #
∀ {α : Type u_2} {a₁ a₂ : LinearOrder α}, a₁ = a₂ ↔ a₁.toPartialOrder = a₂.toPartialOrder
theorem LinearOrder.toPartialOrder_injective E1 #
∀ {α : Type u_2}, Function.Injective (@LinearOrder.toPartialOrder α)
theorem Preorder.ext E1 #
∀ {α : Type u_2} {A B : Preorder α}, (∀ (x y : α), x ≤ y ↔ x ≤ y) → A = B
theorem PartialOrder.ext E1 #
∀ {α : Type u_2} {A B : PartialOrder α}, (∀ (x y : α), x ≤ y ↔ x ≤ y) → A = B
theorem PartialOrder.ext_lt E1 #
∀ {α : Type u_2} {A B : PartialOrder α}, (∀ (x y : α), x < y ↔ x < y) → A = B
theorem LinearOrder.ext E1 #
∀ {α : Type u_2} {A B : LinearOrder α}, (∀ (x y : α), x ≤ y ↔ x ≤ y) → A = B
theorem LinearOrder.ext_lt E1 #
∀ {α : Type u_2} {A B : LinearOrder α}, (∀ (x y : α), x < y ↔ x < y) → A = B
instance Prop.instCompl E0 #
Compl Prop
instance Pi.instCompl E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → Compl (π i)] → Compl ((i : ι) → π i)
instance Pi.instHNot E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → HNot (π i)] → HNot ((i : ι) → π i)
theorem Pi.hnot_def E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → HNot (π i)] (x : (i : ι) → π i), ¬x = fun i ↦ ¬x i
theorem Pi.compl_def E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Compl (π i)] (x : (i : ι) → π i), xᶜ = fun i ↦ (x i)ᶜ
theorem Pi.hnot_apply E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → HNot (π i)] (x : (i : ι) → π i) (i : ι), (¬x) i = ¬x i
theorem Pi.compl_apply E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Compl (π i)] (x : (i : ι) → π i) (i : ι), xᶜ i = (x i)ᶜ
instance Std.Irrefl.compl E0 #
∀ {α : Type u_2} (r : α → α → Prop) [Std.Irrefl r], Std.Refl rᶜ
instance Std.Refl.compl E0 #
∀ {α : Type u_2} (r : α → α → Prop) [Std.Refl r], Std.Irrefl rᶜ
theorem compl_lt E1 #
∀ {α : Type u_2} [inst : LinearOrder α], (fun x1 x2 ↦ x1 < x2)ᶜ = fun x1 x2 ↦ x1 ≥ x2
theorem compl_le E1 #
∀ {α : Type u_2} [inst : LinearOrder α], (fun x1 x2 ↦ x1 ≤ x2)ᶜ = fun x1 x2 ↦ x1 > x2
theorem compl_gt E1 #
∀ {α : Type u_2} [inst : LinearOrder α], (fun x1 x2 ↦ x1 > x2)ᶜ = fun x1 x2 ↦ x1 ≤ x2
theorem compl_ge E1 #
∀ {α : Type u_2} [inst : LinearOrder α], (fun x1 x2 ↦ x1 ≥ x2)ᶜ = fun x1 x2 ↦ x1 < x2
instance Ne.instIsEquiv_compl E0 #
∀ {α : Type u_2}, IsEquiv α (fun x1 x2 ↦ x1 ≠ x2)ᶜ
instance Pi.preorder E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → Preorder (π i)] → Preorder ((i : ι) → π i)
theorem Pi.lt_def E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {x y : (i : ι) → π i},
x < y ↔ x ≤ y ∧ ∃ i, x i < y i
instance Pi.partialOrder E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → PartialOrder (π i)] → PartialOrder ((i : ι) → π i)
theorem Sum.elim_le_elim_iff E0 #
∀ {β : Type u_3} {α₁ : Type u_5} {α₂ : Type u_6} [inst : LE β] {u₁ v₁ : α₁ → β} {u₂ v₂ : α₂ → β},
Sum.elim u₁ u₂ ≤ Sum.elim v₁ v₂ ↔ u₁ ≤ v₁ ∧ u₂ ≤ v₂
theorem Sum.const_le_elim_iff E0 #
∀ {β : Type u_3} {α₁ : Type u_5} {α₂ : Type u_6} [inst : LE β] {b : β} {v₁ : α₁ → β} {v₂ : α₂ → β},
Function.const (α₁ ⊕ α₂) b ≤ Sum.elim v₁ v₂ ↔ Function.const α₁ b ≤ v₁ ∧ Function.const α₂ b ≤ v₂
theorem Sum.elim_le_const_iff E0 #
∀ {β : Type u_3} {α₁ : Type u_5} {α₂ : Type u_6} [inst : LE β] {b : β} {u₁ : α₁ → β} {u₂ : α₂ → β},
Sum.elim u₁ u₂ ≤ Function.const (α₁ ⊕ α₂) b ↔ u₁ ≤ Function.const α₁ b ∧ u₂ ≤ Function.const α₂ b
def StrongLT E1 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → LT (π i)] → ((i : ι) → π i) → ((i : ι) → π i) → Prop
A function a is strongly less than a function b if a i < b i for all i.
theorem le_of_strongLT E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b : (i : ι) → π i}, StrongLT a b → a ≤ b
theorem lt_of_strongLT E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b : (i : ι) → π i} [Nonempty ι],
StrongLT a b → a < b
theorem strongLT_of_strongLT_of_le E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b c : (i : ι) → π i},
StrongLT a b → b ≤ c → StrongLT a c
theorem strongLT_of_le_of_strongLT E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b c : (i : ι) → π i},
c ≤ b → StrongLT b a → StrongLT c a
theorem StrongLT.le E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b : (i : ι) → π i}, StrongLT a b → a ≤ b
Alias of le_of_strongLT.
theorem StrongLT.lt E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b : (i : ι) → π i} [Nonempty ι],
StrongLT a b → a < b
Alias of lt_of_strongLT.
theorem StrongLT.trans_le E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b c : (i : ι) → π i},
StrongLT a b → b ≤ c → StrongLT a c
Alias of strongLT_of_strongLT_of_le.
theorem LE.le.trans_strongLT E1 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] {a b c : (i : ι) → π i},
c ≤ b → StrongLT b a → StrongLT c a
Alias of strongLT_of_le_of_strongLT.
theorem le_update_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x y : (i : ι) → π i}
{i : ι} {a : π i}, x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j : ι), j ≠ i → x j ≤ y j
theorem update_le_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x y : (i : ι) → π i}
{i : ι} {a : π i}, Function.update y i a ≤ x ↔ a ≤ x i ∧ ∀ (j : ι), j ≠ i → y j ≤ x j
theorem update_le_update_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x y : (i : ι) → π i}
{i : ι} {a b : π i}, Function.update x i a ≤ Function.update y i b ↔ a ≤ b ∧ ∀ (j : ι), j ≠ i → x j ≤ y j
theorem update_le_update_iff' E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a b : π i}, Function.update x i a ≤ Function.update x i b ↔ a ≤ b
theorem update_lt_update_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a b : π i}, Function.update x i a < Function.update x i b ↔ a < b
theorem le_update_self_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a : π i}, x ≤ Function.update x i a ↔ x i ≤ a
theorem update_le_self_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a : π i}, Function.update x i a ≤ x ↔ a ≤ x i
theorem lt_update_self_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a : π i}, x < Function.update x i a ↔ x i < a
theorem update_lt_self_iff E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : DecidableEq ι] [inst_1 : (i : ι) → Preorder (π i)] {x : (i : ι) → π i}
{i : ι} {a : π i}, Function.update x i a < x ↔ a < x i
instance Pi.instSDiff E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → SDiff (π i)] → SDiff ((i : ι) → π i)
instance Pi.instHImp E0 #
{ι : Type u_1} → {π : ι → Type u_4} → [(i : ι) → HImp (π i)] → HImp ((i : ι) → π i)
theorem Pi.sdiff_def E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → SDiff (π i)] (x y : (i : ι) → π i), x \ y = fun i ↦ x i \ y i
theorem Pi.himp_def E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → HImp (π i)] (x y : (i : ι) → π i), y ⇨ x = fun i ↦ y i ⇨ x i
theorem Pi.himp_apply E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → HImp (π i)] (x y : (i : ι) → π i) (i : ι), (y ⇨ x) i = y i ⇨ x i
theorem Pi.sdiff_apply E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → SDiff (π i)] (x y : (i : ι) → π i) (i : ι), (x \ y) i = x i \ y i
theorem Function.const_le_const E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [Nonempty β] {a b : α},
Function.const β a ≤ Function.const β b ↔ a ≤ b
theorem Function.const_lt_const E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [Nonempty β] {a b : α},
Function.const β a < Function.const β b ↔ a < b
abbrev Function.Injective.preorder E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : Preorder β] →
[inst_1 : LE α] →
[inst_2 : LT α] → (f : α → β) → (∀ {x y : α}, f x ≤ f y ↔ x ≤ y) → (∀ {x y : α}, f x < f y ↔ x < y) → Preorder α
Pull back a Preorder instance along an injective function.
See note [reducible non-instances].
abbrev Function.Injective.partialOrder E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : PartialOrder β] →
[inst_1 : LE α] →
[inst_2 : LT α] →
(f : α → β) →
Function.Injective f → (∀ {x y : α}, f x ≤ f y ↔ x ≤ y) → (∀ {x y : α}, f x < f y ↔ x < y) → PartialOrder α
Pull back a PartialOrder instance along an injective function.
See note [reducible non-instances].
abbrev Function.Injective.linearOrder E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : LinearOrder β] →
[inst_1 : LE α] →
[inst_2 : LT α] →
[inst_3 : Max α] →
[inst_4 : Min α] →
[inst_5 : Ord α] →
[DecidableEq α] →
[DecidableLE α] →
[DecidableLT α] →
(f : α → β) →
Function.Injective f →
(∀ {x y : α}, f x ≤ f y ↔ x ≤ y) →
(∀ {x y : α}, f x < f y ↔ x < y) →
(∀ (x y : α), f (x ⊓ y) = min (f x) (f y)) →
(∀ (x y : α), f (x ⊔ y) = max (f x) (f y)) →
(∀ (x y : α), compare (f x) (f y) = compare x y) → LinearOrder α
Pull back a LinearOrder instance along an injective function.
See note [reducible non-instances].
abbrev Preorder.lift E1 #
{α : Type u_2} → {β : Type u_3} → [Preorder β] → (α → β) → Preorder α
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].
abbrev PartialOrder.lift E1 #
{α : Type u_2} → {β : Type u_3} → [PartialOrder β] → (f : α → β) → Function.Injective f → PartialOrder α
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].
theorem compare_of_injective_eq_compareOfLessAndEq E1 #
∀ {α : Type u_2} {β : Type u_3} (a b : α) [inst : LinearOrder β] [inst_1 : DecidableEq α] (f : α → β)
(inj : Function.Injective f) [inst_2 : Decidable (a < b)], compare (f a) (f b) = compareOfLessAndEq a b
abbrev LinearOrder.lift E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : LinearOrder β] →
[inst_1 : Max α] →
[inst_2 : Min α] →
(f : α → β) →
Function.Injective f →
(∀ (x y : α), f (x ⊔ y) = max (f x) (f y)) → (∀ (x y : α), f (x ⊓ y) = min (f x) (f y)) → LinearOrder α
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 that does not auto-generate compare
fields.
See also Function.Injective.linearOrder when only the proof fields need to be transferred.
See note [reducible non-instances].
abbrev LinearOrder.lift' E1 #
{α : Type u_2} → {β : Type u_3} → [LinearOrder β] → (f : α → β) → Function.Injective f → LinearOrder α
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 auto-generate compare fields.
See note [reducible non-instances].
abbrev LinearOrder.liftWithOrd E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : LinearOrder β] →
[inst_1 : Max α] →
[inst_2 : Min α] →
[inst_3 : Ord α] →
(f : α → β) →
Function.Injective f →
(∀ (x y : α), f (x ⊔ y) = max (f x) (f y)) →
(∀ (x y : α), f (x ⊓ y) = min (f x) (f y)) →
(∀ (a b : α), compare a b = compare (f a) (f b)) → LinearOrder α
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 autogenerates compare fields, and
LinearOrder.liftWithOrd' for one that auto-generates min and max fields.
fields. See note [reducible non-instances].
abbrev LinearOrder.liftWithOrd' E1 #
{α : Type u_2} →
{β : Type u_3} →
[inst : LinearOrder β] →
[inst_1 : Ord α] →
(f : α → β) → Function.Injective f → (∀ (a b : α), compare a b = compare (f a) (f b)) → LinearOrder α
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.liftWithOrd for one that doesn't auto-generate
min and max fields. fields. See note [reducible non-instances].
theorem Subtype.mk_le_mk E0 #
∀ {α : Type u_2} [inst : LE α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y}, ⟨x, hx⟩ ≤ ⟨y, hy⟩ ↔ x ≤ y
theorem Subtype.mk_lt_mk E0 #
∀ {α : Type u_2} [inst : LT α] {p : α → Prop} {x y : α} {hx : p x} {hy : p y}, ⟨x, hx⟩ < ⟨y, hy⟩ ↔ x < y
theorem Subtype.coe_le_coe E0 #
∀ {α : Type u_2} [inst : LE α] {p : α → Prop} {x y : Subtype p}, ↑x ≤ ↑y ↔ x ≤ y
theorem Subtype.coe_lt_coe E0 #
∀ {α : Type u_2} [inst : LT α] {p : α → Prop} {x y : Subtype p}, ↑x < ↑y ↔ x < y
instance Subtype.preorder E0 #
{α : Type u_2} → [Preorder α] → (p : α → Prop) → Preorder (Subtype p)
instance Subtype.partialOrder E0 #
{α : Type u_2} → [PartialOrder α] → (p : α → Prop) → PartialOrder (Subtype p)
instance Subtype.decidableLE E0 #
{α : Type u_2} → [inst : Preorder α] → [h : DecidableLE α] → {p : α → Prop} → DecidableLE (Subtype p)
instance Subtype.decidableLT E0 #
{α : Type u_2} → [inst : Preorder α] → [h : DecidableLT α] → {p : α → Prop} → DecidableLT (Subtype p)
instance Subtype.instLinearOrder E0 #
{α : Type u_2} → [LinearOrder α] → (p : α → Prop) → LinearOrder (Subtype p)
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.
instance Prod.instLE_mathlib E0 #
{α : Type u_2} → {β : Type u_3} → [LE α] → [LE β] → LE (α × β)
instance Prod.instDecidableLE E0 #
{α : Type u_2} →
{β : Type u_3} →
[inst : LE α] →
[inst_1 : LE β] → {x y : α × β} → [Decidable (x.1 ≤ y.1)] → [Decidable (x.2 ≤ y.2)] → Decidable (x ≤ y)
theorem Prod.le_def E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {x y : α × β}, x ≤ y ↔ x.1 ≤ y.1 ∧ x.2 ≤ y.2
theorem Prod.mk_le_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {a₁ a₂ : α} {b₁ b₂ : β},
(a₁, b₁) ≤ (a₂, b₂) ↔ a₁ ≤ a₂ ∧ b₁ ≤ b₂
theorem Prod.GCongr.mk_le_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {a₁ a₂ : α} {b₁ b₂ : β},
a₁ ≤ a₂ → b₁ ≤ b₂ → (a₁, b₁) ≤ (a₂, b₂)
theorem Prod.swap_le_swap E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {x y : α × β}, x.swap ≤ y.swap ↔ x ≤ y
theorem Prod.mk_le_swap E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {x : α × β} {a : α} {b : β}, (b, a) ≤ x.swap ↔ (a, b) ≤ x
theorem Prod.swap_le_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : LE α] [inst_1 : LE β] {x : α × β} {a : α} {b : β}, x.swap ≤ (b, a) ↔ x ≤ (a, b)
instance Prod.instPreorder E0 #
{α : Type u_2} → {β : Type u_3} → [Preorder α] → [Preorder β] → Preorder (α × β)
theorem Prod.swap_lt_swap E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {x y : α × β}, x.swap < y.swap ↔ x < y
theorem Prod.swap_lt_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a : α} {b : β} {x : α × β},
x.swap < (b, a) ↔ x < (a, b)
theorem Prod.mk_lt_swap E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a : α} {b : β} {x : α × β},
(b, a) < x.swap ↔ (a, b) < x
theorem Prod.mk_le_mk_iff_left E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a₁ a₂ : α} {b : β},
(a₁, b) ≤ (a₂, b) ↔ a₁ ≤ a₂
theorem Prod.mk_le_mk_iff_right E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a : α} {b₁ b₂ : β},
(a, b₁) ≤ (a, b₂) ↔ b₁ ≤ b₂
theorem Prod.mk_lt_mk_iff_left E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a₁ a₂ : α} {b : β},
(a₁, b) < (a₂, b) ↔ a₁ < a₂
theorem Prod.mk_lt_mk_iff_right E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a : α} {b₁ b₂ : β},
(a, b₁) < (a, b₂) ↔ b₁ < b₂
theorem Prod.lt_iff E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {x y : α × β},
x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2
theorem Prod.mk_lt_mk E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a₁ a₂ : α} {b₁ b₂ : β},
(a₁, b₁) < (a₂, b₂) ↔ a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂
theorem Prod.lt_of_lt_of_le E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {x y : α × β}, x.1 < y.1 → x.2 ≤ y.2 → x < y
theorem Prod.lt_of_le_of_lt E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {x y : α × β}, x.1 ≤ y.1 → x.2 < y.2 → x < y
theorem Prod.mk_lt_mk_of_lt_of_le E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a₁ a₂ : α} {b₁ b₂ : β},
a₁ < a₂ → b₁ ≤ b₂ → (a₁, b₁) < (a₂, b₂)
theorem Prod.mk_lt_mk_of_le_of_lt E1 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] {a₁ a₂ : α} {b₁ b₂ : β},
a₁ ≤ a₂ → b₁ < b₂ → (a₁, b₁) < (a₂, b₂)
instance Prod.instPartialOrder E0 #
(α : Type u_5) → (β : Type u_6) → [PartialOrder α] → [PartialOrder β] → PartialOrder (α × β)
The pointwise partial order on a product.
(The lexicographic ordering is defined in Order.Lexicographic, and the instances are
available via the type synonym α ×ₗ β = α × β.)
class DenselyOrdered E1 #
(α : Type u_5) → [LT α] → Prop
An order is dense if there is an element between any pair of distinct comparable elements.
ctor DenselyOrdered.mk E0 #
∀ {α : Type u_5} [inst : LT α], (∀ (a₁ a₂ : α), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂) → DenselyOrdered α
theorem DenselyOrdered.dense E1 #
∀ {α : Type u_5} {inst : LT α} [self : DenselyOrdered α] (a₁ a₂ : α), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂
An order is dense if there is an element between any pair of distinct elements.
theorem exists_between' E1 #
∀ {α : Type u_2} [inst : LT α] [DenselyOrdered α] {a₁ a₂ : α}, a₂ < a₁ → ∃ a < a₁, a₂ < a
theorem exists_between E1 #
∀ {α : Type u_2} [inst : LT α] [DenselyOrdered α] {a₁ a₂ : α}, a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂
theorem Subsingleton.instDenselyOrdered E1 #
∀ {X : Type u_5} [Subsingleton X] [inst : LT X], DenselyOrdered X
Any ordered subsingleton is densely ordered. Not an instance to avoid a heavy subsingleton typeclass search.
instance instDenselyOrderedProd E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Preorder β] [DenselyOrdered α] [DenselyOrdered β],
DenselyOrdered (α × β)
instance instDenselyOrderedForall E0 #
∀ {ι : Type u_1} {π : ι → Type u_4} [inst : (i : ι) → Preorder (π i)] [∀ (i : ι), DenselyOrdered (π i)],
DenselyOrdered ((i : ι) → π i)
theorem le_of_forall_lt_imp_le_of_dense E1 #
∀ {α : Type u_2} [inst : LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}, (∀ a < a₂, a ≤ a₁) → a₂ ≤ a₁
theorem le_of_forall_gt_imp_ge_of_dense E1 #
∀ {α : Type u_2} [inst : LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}, (∀ (a : α), a₂ < a → a₁ ≤ a) → a₁ ≤ a₂
theorem forall_gt_imp_ge_iff_le_of_dense E1 #
∀ {α : Type u_2} [inst : LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}, (∀ (a : α), a₂ < a → a₁ ≤ a) ↔ a₁ ≤ a₂
theorem forall_lt_imp_le_iff_le_of_dense E1 #
∀ {α : Type u_2} [inst : LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}, (∀ a < a₂, a ≤ a₁) ↔ a₂ ≤ a₁
theorem dense_or_discrete' E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a₁ a₂ : α),
(∃ a < a₁, a₂ < a) ∨ (∀ a < a₁, a ≤ a₂) ∧ ∀ (a : α), a₂ < a → a₁ ≤ a
theorem dense_or_discrete E1 #
∀ {α : Type u_2} [inst : LinearOrder α] (a₁ a₂ : α),
(∃ a, a₁ < a ∧ a < a₂) ∨ (∀ (a : α), a₁ < a → a₂ ≤ a) ∧ ∀ a < a₂, a ≤ a₁
abbrev LinearOrder.ofSubsingleton E1 #
{α : Type u_5} → [Subsingleton α] → LinearOrder α
Construct the trivial linear order on any type with at most one element.
instance instLinearOrderEmpty E0 #
LinearOrder Empty
instance instLinearOrderPEmpty E0 #
LinearOrder PEmpty.{u_5 + 1}
instance PUnit.instLinearOrder E0 #
LinearOrder PUnit.{u_5 + 1}
theorem PUnit.min_eq E0 #
∀ (a b : PUnit.{u_5 + 1}), min a b = PUnit.unit
theorem PUnit.max_eq E0 #
∀ (a b : PUnit.{u_5 + 1}), max a b = PUnit.unit
theorem PUnit.le E1 #
∀ (a b : PUnit.{u_5 + 1}), a ≤ b
theorem PUnit.not_lt E1 #
∀ (a b : PUnit.{u_5 + 1}), ¬a < b
instance PUnit.instDenselyOrdered E0 #
DenselyOrdered PUnit.{u_5 + 1}
theorem subrelation_iff_le E1 #
∀ {α : Type u_2} {r s : α → α → Prop}, Subrelation r s ↔ r ≤ s
instance Prop.partialOrder E0 #
PartialOrder Prop