order.synonym

# Type synonyms #

This file provides two type synonyms for order theory:

• order_dual α: Type synonym of α to equip it with the dual order (a ≤ b becomes b ≤ a).
• lex α: Type synonym of α to equip it with its lexicographic order. The precise meaning depends on the type we take the lex of. Examples include prod, sigma, list, finset.

## Notation #

αᵒᵈ is notation for order_dual α.

The general rule for notation of lex types is to append ₗ to the usual notation.

## Implementation notes #

One should not abuse definitional equality between α and αᵒᵈ/lex α. Instead, explicit coercions should be inserted:

• order_dual: order_dual.to_dual : α → αᵒᵈ and order_dual.of_dual : αᵒᵈ → α
• lex: to_lex : α → lex α and of_lex : lex α → α.

In fact, those are bundled as equivs to put goals in the right syntactic form for rewriting with the equiv API (⇑to_lex a where ⇑ is coe_fn : (α ≃ lex α) → α → lex α, instead of a bare to_lex a).

This file is similar to algebra.group.type_tags.

### Order dual #

@[protected, instance]
def order_dual.nontrivial {α : Type u_1} [h : nontrivial α] :
def order_dual.to_dual {α : Type u_1} :
α αᵒᵈ

to_dual is the identity function to the order_dual of a linear order.

Equations
def order_dual.of_dual {α : Type u_1} :
αᵒᵈ α

of_dual is the identity function from the order_dual of a linear order.

Equations
@[simp]
theorem order_dual.to_dual_symm_eq {α : Type u_1} :
@[simp]
theorem order_dual.of_dual_symm_eq {α : Type u_1} :
@[simp]
theorem order_dual.to_dual_of_dual {α : Type u_1} (a : αᵒᵈ) :
@[simp]
theorem order_dual.of_dual_to_dual {α : Type u_1} (a : α) :
@[simp]
theorem order_dual.to_dual_inj {α : Type u_1} {a b : α} :
@[simp]
theorem order_dual.of_dual_inj {α : Type u_1} {a b : αᵒᵈ} :
@[simp]
theorem order_dual.to_dual_le_to_dual {α : Type u_1} [has_le α] {a b : α} :
@[simp]
theorem order_dual.to_dual_lt_to_dual {α : Type u_1} [has_lt α] {a b : α} :
@[simp]
theorem order_dual.of_dual_le_of_dual {α : Type u_1} [has_le α] {a b : αᵒᵈ} :
@[simp]
theorem order_dual.of_dual_lt_of_dual {α : Type u_1} [has_lt α] {a b : αᵒᵈ} :
theorem order_dual.le_to_dual {α : Type u_1} [has_le α] {a : αᵒᵈ} {b : α} :
theorem order_dual.lt_to_dual {α : Type u_1} [has_lt α] {a : αᵒᵈ} {b : α} :
theorem order_dual.to_dual_le {α : Type u_1} [has_le α] {a : α} {b : αᵒᵈ} :
theorem order_dual.to_dual_lt {α : Type u_1} [has_lt α] {a : α} {b : αᵒᵈ} :
@[protected]
def order_dual.rec {α : Type u_1} {C : αᵒᵈSort u_2} (h₂ : Π (a : α), C ) (a : αᵒᵈ) :
C a

Recursor for αᵒᵈ.

Equations
• = h₂
@[protected, simp]
theorem order_dual.forall {α : Type u_1} {p : αᵒᵈ → Prop} :
(∀ (a : αᵒᵈ), p a) ∀ (a : α), p
@[protected, simp]
theorem order_dual.exists {α : Type u_1} {p : αᵒᵈ → Prop} :
(∃ (a : αᵒᵈ), p a) ∃ (a : α), p
theorem has_le.le.dual {α : Type u_1} [has_le α] {a b : α} :
b a

Alias of the reverse direction of order_dual.to_dual_le_to_dual.

theorem has_lt.lt.dual {α : Type u_1} [has_lt α] {a b : α} :
b < a

Alias of the reverse direction of order_dual.to_dual_lt_to_dual.

theorem has_le.le.of_dual {α : Type u_1} [has_le α] {a b : αᵒᵈ} :
b a

Alias of the reverse direction of order_dual.of_dual_le_of_dual.

theorem has_lt.lt.of_dual {α : Type u_1} [has_lt α] {a b : αᵒᵈ} :
b < a

Alias of the reverse direction of order_dual.of_dual_lt_of_dual.

### Lexicographic order #

def lex (α : Type u_1) :
Type u_1

A type synonym to equip a type with its lexicographic order.

Equations
Instances for lex
def to_lex {α : Type u_1} :
α lex α

to_lex is the identity function to the lex of a type.

Equations
def of_lex {α : Type u_1} :
lex α α

of_lex is the identity function from the lex of a type.

Equations
@[simp]
theorem to_lex_symm_eq {α : Type u_1} :
@[simp]
theorem of_lex_symm_eq {α : Type u_1} :
@[simp]
theorem to_lex_of_lex {α : Type u_1} (a : lex α) :
@[simp]
theorem of_lex_to_lex {α : Type u_1} (a : α) :
@[simp]
theorem to_lex_inj {α : Type u_1} {a b : α} :
= a = b
@[simp]
theorem of_lex_inj {α : Type u_1} {a b : lex α} :
= a = b
@[protected]
def lex.rec {α : Type u_1} {β : lex αSort u_2} (h : Π (a : α), β (to_lex a)) (a : lex α) :
β a

A recursor for lex. Use as induction x using lex.rec.

Equations