@[class]
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
A preorder is a reflexive, transitive relation ≤
with a < b
defined in the obvious way.
Instances
- partial_order.to_preorder
- directed_order.to_preorder
- order_dual.preorder
- pi.preorder
- subtype.preorder
- prod.preorder
- with_bot.preorder
- with_top.preorder
- order_hom.preorder
- units.preorder
- add_units.preorder
- with_zero.preorder
- multiplicative.preorder
- additive.preorder
- rat.preorder
- lex_preorder
- cau_seq.preorder
- real.preorder
- associates.preorder
- finsupp.preorder
@[protected, instance]
Definition of partial_order
and lemmas about types with a partial order #
@[class]
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
A partial order is a reflexive, transitive, antisymmetric relation ≤
.
Instances
- omega_complete_partial_order.to_partial_order
- linear_order.to_partial_order
- semilattice_sup.to_partial_order
- semilattice_inf.to_partial_order
- ordered_comm_monoid.to_partial_order
- ordered_add_comm_monoid.to_partial_order
- ordered_cancel_add_comm_monoid.to_partial_order
- ordered_cancel_comm_monoid.to_partial_order
- ordered_add_comm_group.to_partial_order
- ordered_comm_group.to_partial_order
- complete_semilattice_Sup.to_partial_order
- complete_semilattice_Inf.to_partial_order
- set_like.partial_order
- order_dual.partial_order
- pi.partial_order
- subtype.partial_order
- prod.partial_order
- with_bot.partial_order
- with_top.partial_order
- order_hom.partial_order
- units.partial_order
- add_units.partial_order
- with_zero.partial_order
- multiplicative.partial_order
- additive.partial_order
- multiset.partial_order
- finset.partial_order
- rat.partial_order
- lex_partial_order
- real.partial_order
- setoid.partial_order
- setoid.partition.partial_order
- con.partial_order
- add_con.partial_order
- associates.partial_order
- finsupp.partial_order
- part.partial_order
- enat.partial_order
- omega_complete_partial_order.continuous_hom.partial_order
@[protected, instance]
theorem
decidable.lt_or_eq_of_le
{α : Type u}
[partial_order α]
[decidable_rel has_le.le]
{a b : α}
(hab : a ≤ b) :
theorem
decidable.eq_or_lt_of_le
{α : Type u}
[partial_order α]
[decidable_rel has_le.le]
{a b : α}
(hab : a ≤ b) :
theorem
decidable.le_iff_lt_or_eq
{α : Type u}
[partial_order α]
[decidable_rel has_le.le]
{a b : α} :
Definition of linear_order
and lemmas about types with a linear order #
Default definition of max
.
Equations
- max_default a b = ite (b ≤ a) a b
Default definition of min
.
Equations
- min_default a b = ite (a ≤ b) a b
@[class]
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- le_trans : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c
- lt_iff_le_not_le : (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) . "order_laws_tac"
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- le_total : ∀ (a b : α), a ≤ b ∨ b ≤ a
- decidable_le : decidable_rel has_le.le
- decidable_eq : decidable_eq α
- decidable_lt : decidable_rel has_lt.lt
- max : α → α → α
- max_def : max = max_default . "reflexivity"
- min : α → α → α
- min_def : min = min_default . "reflexivity"
A linear order is reflexive, transitive, antisymmetric and total relation ≤
.
We assume that every linear ordered type has decidable (≤)
, (<)
, and (=)
.
Instances
- linear_ordered_add_comm_monoid.to_linear_order
- linear_ordered_comm_monoid.to_linear_order
- canonically_linear_ordered_add_monoid.to_linear_order
- canonically_linear_ordered_monoid.to_linear_order
- linear_ordered_add_comm_group.to_linear_order
- linear_ordered_comm_group.to_linear_order
- linear_ordered_ring.to_linear_order
- complete_linear_order.to_linear_order
- conditionally_complete_linear_order.to_linear_order
- nat.linear_order
- int.linear_order
- bool.linear_order
- order_dual.linear_order
- subtype.linear_order
- as_linear_order.linear_order
- Prop.linear_order
- with_bot.linear_order
- with_top.linear_order
- units.linear_order
- add_units.linear_order
- with_zero.linear_order
- multiplicative.linear_order
- additive.linear_order
- list.linear_order
- fin.linear_order
- pnat.linear_order
- rat.linear_order
- char.linear_order
- string.linear_order
- lex_linear_order
- real.linear_order
- enat.linear_order
@[instance]
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
- eq.decidable a b = linear_order.decidable_eq a b
@[protected, instance]
@[protected, instance]
@[protected, instance]
def
lt_by_cases
{α : Type u}
[linear_order α]
(x y : α)
{P : Sort u_1}
(h₁ : x < y → P)
(h₂ : x = y → P)
(h₃ : y < x → P) :
P
Perform a case-split on the ordering of x
and y
in a decidable linear order.
theorem
le_imp_le_of_lt_imp_lt
{α : Type u}
[linear_order α]
{β : Type u_1}
[preorder α]
[linear_order β]
{a b : α}
{c d : β}
(H : d < c → b < a)
(h : a ≤ b) :
c ≤ d