Unbundled relation classes #
In this file we prove some properties of is_* classes defined in init.algebra.classes. The main
difference between these classes and the usual order classes (preorder etc) is that usual classes
extend has_le and/or has_lt while these classes take a relation as an explicit argument.
A version of antisymm with r explicit.
This lemma matches the lemmas from lean core in init.algebra.classes, but is missing there.
A version of antisymm' with r explicit.
This lemma matches the lemmas from lean core in init.algebra.classes, but is missing there.
In a trichotomous irreflexive order, every element is determined by the set of predecessors.
Construct a partial order from a is_strict_order relation.
See note [reducible non-instances].
Equations
- partial_order_of_SO r = {le := λ (x y : α), x = y ∨ r x y, lt := r, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
- to_is_trichotomous : is_trichotomous α lt
- to_is_strict_order : is_strict_order α lt
This is basically the same as is_strict_total_order, but that definition has a redundant
assumption is_incomp_trans α lt.
Instances of this typeclass
Construct a linear order from an is_strict_total_order' relation.
See note [reducible non-instances].
Equations
- linear_order_of_STO' r = {le := partial_order.le (partial_order_of_SO r), lt := partial_order.lt (partial_order_of_SO r), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := λ (x y : α), decidable_of_iff (¬r y x) _, decidable_eq := decidable_eq_of_decidable_le (λ (x y : α), decidable_of_iff (¬r y x) _), decidable_lt := decidable_lt_of_decidable_le (λ (x y : α), decidable_of_iff (¬r y x) _), max := max_default (λ (a b : α), decidable_of_iff (¬r b a) _), max_def := _, min := min_default (λ (a b : α), decidable_of_iff (¬r b a) _), min_def := _}
Order connection #
- conn : ∀ (a b c : α), lt a c → lt a b ∨ lt b c
A connected order is one satisfying the condition a < c → a < b ∨ b < c.
This is recognizable as an intuitionistic substitute for a ≤ b ∨ b ≤ a on
the constructive reals, and is also known as negative transitivity,
since the contrapositive asserts transitivity of the relation ¬ a < b.
Instances of this typeclass
Well-order #
- wf : well_founded r
A well-founded relation. Not to be confused with is_well_order.
Instances of this typeclass
- order_dual.well_founded_gt
- order_dual.well_founded_lt
- is_well_order.to_is_well_founded
- has_well_founded.is_well_founded
- prod.lex.is_well_founded
- inv_image.is_well_founded
- measure.is_well_founded
- nat.well_founded_lt
- part_enat.well_founded_lt
- cardinal.well_founded_lt
- ordinal.well_founded_lt
- nat_ordinal.well_founded_lt
- nonote.well_founded_lt
Induction on a well-founded relation.
All values are accessible under the well-founded relation.
Creates data, given a way to generate a value from all that compare as less under a well-founded
relation. See also is_well_founded.fix_eq.
Equations
- is_well_founded.fix r = _.fix
The value from is_well_founded.fix is built from the previous ones as specified.
Derive a has_well_founded instance from an is_well_founded instance.
Equations
- is_well_founded.to_has_well_founded r = {r := r, wf := _}
A class for a well founded relation <.
Equations
A class for a well founded relation >.
Equations
- to_is_trichotomous : is_trichotomous α r
- to_is_trans : is_trans α r
- to_is_well_founded : is_well_founded α r
A well order is a well-founded linear order.
Instances of this typeclass
- finite.linear_order.is_well_order_lt
- finite.linear_order.is_well_order_gt
- is_empty.is_well_order
- empty_relation.is_well_order
- prod.lex.is_well_order
- nat.lt.is_well_order
- gt.is_well_order
- has_lt.lt.is_well_order
- with_top.is_well_order.lt
- with_top.is_well_order.gt
- with_bot.is_well_order.lt
- with_bot.is_well_order.gt
- rel_iso.is_well_order.preimage
- rel_iso.is_well_order.ulift
- subrel.is_well_order
- fin.fin.lt.is_well_order
- part_enat.has_lt.lt.is_well_order
- cardinal.wo
- sum.lex.is_well_order
- well_ordering_rel.is_well_order
- Well_order.wo
- is_well_order_out_lt
- ordinal.has_lt.lt.is_well_order
- nat_ordinal.has_lt.lt.is_well_order
- nonote.has_lt.lt.is_well_order
Inducts on a well-founded < relation.
All values are accessible under the well-founded <.
Creates data, given a way to generate a value from all that compare as lesser. See also
well_founded_lt.fix_eq.
Equations
The value from well_founded_lt.fix is built from the previous ones as specified.
Derive a has_well_founded instance from a well_founded_lt instance.
Inducts on a well-founded > relation.
All values are accessible under the well-founded >.
Creates data, given a way to generate a value from all that compare as greater. See also
well_founded_gt.fix_eq.
Equations
The value from well_founded_gt.fix is built from the successive ones as specified.
Derive a has_well_founded instance from a well_founded_gt instance.
Construct a decidable linear order from a well-founded linear order.
Equations
- is_well_order.linear_order r = let _inst : Π (x y : α), decidable (¬r x y) := λ (x y : α), classical.dec (¬r x y) in linear_order_of_STO' r
Derive a has_well_founded instance from a is_well_order instance.
An unbounded or cofinal set.
Equations
- set.unbounded r s = ∀ (a : α), ∃ (b : α) (H : b ∈ s), ¬r b a
A bounded or final set. Not to be confused with metric.bounded.
Equations
- set.bounded r s = ∃ (a : α), ∀ (b : α), b ∈ s → r b a
Strict-non strict relations #
An unbundled relation class stating that r is the nonstrict relation corresponding to the
strict relation s. Compare preorder.lt_iff_le_not_le. This is mostly meant to provide dot
notation on (⊆) and (⊂).
Instances of this typeclass
Instances of other typeclasses for is_nonstrict_strict_order
- is_nonstrict_strict_order.has_sizeof_inst
A version of right_iff_left_not_left with explicit r and s.
⊆ and ⊂ #
Alias of subset_of_eq.
Alias of superset_of_eq.
Alias of subset_trans.
Alias of subset_antisymm.
Alias of superset_antisymm.
Alias of ssubset_irrfl.
Alias of ne_of_ssubset.
Alias of ne_of_ssuperset.
Alias of ssubset_trans.
Alias of ssubset_asymm.
Alias of subset_of_ssubset.
Alias of not_subset_of_ssubset.
Alias of not_ssubset_of_subset.
Alias of ssubset_of_subset_not_subset.
Alias of ssubset_of_subset_of_ssubset.
Alias of ssubset_of_ssubset_of_subset.
Alias of ssubset_of_subset_of_ne.
Alias of ssubset_of_ne_of_subset.
Alias of eq_or_ssubset_of_subset.
Alias of ssubset_or_eq_of_subset.