Type synonyms #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file provides two type synonyms for order theory:
order_dual α
: Type synonym ofα
to equip it with the dual order (a ≤ b
becomesb ≤ 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 includeprod
,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 : α → αᵒᵈ
andorder_dual.of_dual : αᵒᵈ → α
lex
:to_lex : α → lex α
andof_lex : lex α → α
.
In fact, those are bundled as equiv
s 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
).
See also #
This file is similar to algebra.group.type_tags
.
Order dual #
to_dual
is the identity function to the order_dual
of a linear order.
Equations
of_dual
is the identity function from the order_dual
of a linear order.
Equations
Recursor for αᵒᵈ
.
Equations
- order_dual.rec h₂ = h₂
Alias of the reverse direction of order_dual.to_dual_le_to_dual
.
Alias of the reverse direction of order_dual.to_dual_lt_to_dual
.
Alias of the reverse direction of order_dual.of_dual_le_of_dual
.
Alias of the reverse direction of order_dual.of_dual_lt_of_dual
.
Lexicographic order #
A type synonym to equip a type with its lexicographic order.
Instances for lex
- lex.has_one
- lex.has_zero
- lex.has_mul
- lex.has_add
- lex.has_inv
- lex.has_neg
- lex.has_div
- lex.has_sub
- lex.has_smul
- lex.has_vadd
- lex.has_smul'
- lex.has_vadd'
- lex.has_pow
- lex.has_pow'
- lex.semigroup
- lex.add_semigroup
- lex.comm_semigroup
- lex.add_comm_semigroup
- lex.left_cancel_semigroup
- lex.left_cancel_add_semigroup
- lex.right_cancel_semigroup
- lex.right_cancel_add_semigroup
- lex.mul_one_class
- lex.add_zero_class
- lex.monoid
- lex.add_monoid
- lex.comm_monoid
- lex.add_comm_monoid
- lex.left_cancel_monoid
- lex.left_cancel_add_monoid
- lex.right_cancel_monoid
- lex.right_cancel_add_monoid
- lex.cancel_monoid
- lex.cancel_add_monoid
- lex.cancel_comm_monoid
- lex.cancel_add_comm_monoid
- lex.has_involutive_inv
- lex.has_involutive_neg
- lex.div_inv_monoid
- lex.sub_neg_add_monoid
- lex.division_monoid
- lex.division_comm_monoid
- lex.group
- lex.add_group
- lex.comm_group
- lex.add_comm_group
- lex.mul_zero_class
- lex.mul_zero_one_class
- lex.no_zero_divisors
- lex.semigroup_with_zero
- lex.monoid_with_zero
- lex.cancel_monoid_with_zero
- lex.comm_monoid_with_zero
- lex.cancel_comm_monoid_with_zero
- lex.group_with_zero
- lex.comm_group_with_zero
- lex.has_nat_cast
- lex.add_monoid_with_one
- lex.add_comm_monoid_with_one
- lex.has_int_cast
- lex.add_group_with_one
- lex.add_comm_group_with_one
- lex.fintype
- pi.lex.inhabited
- pi.lex.has_lt
- pi.lex.is_strict_order
- pi.lex.partial_order
- pi.lex.linear_order
- pi.lex.order_bot
- pi.lex.order_top
- pi.lex.bounded_order
- pi.lex.densely_ordered
- pi.lex.no_max_order
- pi.lex.no_min_order
- pi.lex.ordered_comm_group
- pi.lex.ordered_add_comm_group
- lex.has_rat_cast
- lex.division_semiring
- lex.division_ring
- lex.semifield
- lex.field
- prod.lex.lex.has_to_format
- prod.lex.inhabited
- prod.lex.has_le
- prod.lex.has_lt
- prod.lex.preorder
- prod.lex.partial_order
- prod.lex.linear_order
- prod.lex.order_bot
- prod.lex.order_top
- prod.lex.bounded_order
- prod.lex.lex.densely_ordered
- prod.lex.no_max_order_of_left
- prod.lex.no_min_order_of_left
- prod.lex.no_max_order_of_right
- prod.lex.no_min_order_of_right
- sum.lex.has_le
- sum.lex.has_lt
- sum.lex.preorder
- sum.lex.partial_order
- sum.lex.linear_order
- sum.lex.order_bot
- sum.lex.order_top
- sum.lex.bounded_order
- sum.lex.no_min_order
- sum.lex.no_max_order
- sum.lex.no_min_order_of_nonempty
- sum.lex.no_max_order_of_nonempty
- sum.lex.densely_ordered_of_no_max_order
- sum.lex.densely_ordered_of_no_min_order
- dfinsupp.lex.has_lt
- dfinsupp.lex.is_strict_order
- dfinsupp.lex.partial_order
- dfinsupp.lex.linear_order
- dfinsupp.lex.covariant_class_lt_left
- dfinsupp.lex.covariant_class_le_left
- dfinsupp.lex.covariant_class_lt_right
- dfinsupp.lex.covariant_class_le_right
- finsupp.lex.has_lt
- finsupp.lex.is_strict_order
- finsupp.lex.partial_order
- finsupp.lex.linear_order
- finsupp.lex.covariant_class_lt_left
- finsupp.lex.covariant_class_le_left
- finsupp.lex.covariant_class_lt_right
- finsupp.lex.covariant_class_le_right
- lex.distrib
- lex.left_distrib_class
- lex.right_distrib_class
- lex.non_unital_non_assoc_semiring
- lex.non_unital_semiring
- lex.non_assoc_semiring
- lex.semiring
- lex.non_unital_comm_semiring
- lex.comm_semiring
- lex.has_distrib_neg
- lex.non_unital_non_assoc_ring
- lex.non_unital_ring
- lex.non_assoc_ring
- lex.ring
- lex.non_unital_comm_ring
- lex.comm_ring
- lex.is_domain
- dfinsupp.lex.well_founded_lt
- pi.lex.well_founded_lt
- function.lex.well_founded_lt
- dfinsupp.lex.well_founded_lt_of_finite
- sigma.lex.has_le
- sigma.lex.has_lt
- sigma.lex.preorder
- sigma.lex.partial_order
- sigma.lex.linear_order
- sigma.lex.order_bot
- sigma.lex.order_top
- sigma.lex.bounded_order
- sigma.lex.densely_ordered
- sigma.lex.densely_ordered_of_no_max_order
- sigma.lex.densely_ordered_of_no_min_order
- sigma.lex.no_max_order_of_nonempty
- sigma.lex.no_min_order_of_nonempty
- sigma.lex.no_max_order
- sigma.lex.no_min_order
- finsupp.lex.well_founded_lt
- sum.lex.locally_finite_order
- psigma.lex.has_le
- psigma.lex.has_lt
- psigma.lex.preorder
- psigma.lex.partial_order
- psigma.lex.linear_order
- psigma.lex.order_bot
- psigma.lex.order_top
- psigma.lex.bounded_order
- psigma.lex.densely_ordered
- psigma.lex.densely_ordered_of_no_max_order
- psigma.lex.densely_ordered_of_no_min_order
- psigma.lex.no_max_order_of_nonempty
- psigma.lex.no_min_order_of_nonempty
- psigma.lex.no_max_order
- psigma.lex.no_min_order