Orders #
Defines classes for preorders, partial orders, and linear orders and proves some basic lemmas about them.
Unbundled classes #
IsAntisymm X r means the binary relation r on X is antisymmetric.
- antisymm (a b : α) : r a b → r b a → a = b
Instances
Equations
- instTransOfIsTrans = { trans := ⋯ }
IsPreorder X r means that the binary relation r on X is a pre-order, that is, reflexive
and transitive.
Instances
IsPartialOrder X r means that the binary relation r on X is a partial order, that is,
IsPreorder X r and IsAntisymm X r.
Instances
IsLinearOrder X r means that the binary relation r on X is a linear order, that is,
IsPartialOrder X r and IsTotal X r.
Instances
IsEquiv X r means that the binary relation r on X is an equivalence relation, that
is, IsPreorder X r and IsSymm X r.
Instances
IsStrictWeakOrder X lt means that the binary relation lt on X is a strict weak order,
that is, IsStrictOrder X lt and ¬lt a b ∧ ¬lt b a → ¬lt b c ∧ ¬lt c b → ¬lt a c ∧ ¬lt c a.
Instances
IsTrichotomous X lt means that the binary relation lt on X is trichotomous, that is,
either lt a b or a = b or lt b a for any a and b.
Instances
IsStrictTotalOrder X lt means that the binary relation lt on X is a strict total order,
that is, IsTrichotomous X lt and IsStrictOrder X lt.
Instances
Equality is an equivalence relation.
IsTrans as a definition, suitable for use in proofs.
Equations
- Transitive r = ∀ ⦃x y z : α⦄, r x y → r y z → r x z
Instances For
IsIrrefl as a definition, suitable for use in proofs.
Equations
- Irreflexive r = ∀ (x : α), ¬r x x
Instances For
IsAntisymm as a definition, suitable for use in proofs.
Equations
- AntiSymmetric r = ∀ ⦃x y : α⦄, r x y → r y x → x = y
Instances For
Minimal and maximal #
MinimalFor P f i means that f i is minimal over all i satisfying P.
Equations
- MinimalFor P f i = (P i ∧ ∀ ⦃j : ι⦄, P j → f j ≤ f i → f i ≤ f j)
Instances For
MaximalFor P f i means that f i is maximal over all i satisfying P.
Equations
- MaximalFor P f i = (P i ∧ ∀ ⦃j : ι⦄, P j → f i ≤ f j → f j ≤ f i)
Instances For
Upper and lower sets #
An upper set in an order α is a set such that any element greater than one of its members is
also a member. Also called up-set, upward-closed set.
- carrier : Set α
The carrier of an
UpperSet. - upper' : IsUpperSet self.carrier
The carrier of an
UpperSetis an upper set.
Instances For
A lower set in an order α is a set such that any element less than one of its members is also
a member. Also called down-set, downward-closed set.
- carrier : Set α
The carrier of a
LowerSet. - lower' : IsLowerSet self.carrier
The carrier of a
LowerSetis a lower set.
Instances For
An upper set relative to a predicate P is a set such that all elements satisfy P and
any element greater than one of its members and satisfying P is also a member.
Instances For
A lower set relative to a predicate P is a set such that all elements satisfy P and
any element less than one of its members and satisfying P is also a member.
Instances For
An upper set relative to a predicate P is a set such that all elements satisfy P and
any element greater than one of its members and satisfying P is also a member.
- carrier : Set α
The carrier of a
RelUpperSet. - isRelUpperSet' : IsRelUpperSet self.carrier P
The carrier of a
RelUpperSetis an upper set relative toP.Do NOT use directly. Please use
RelUpperSet.isRelUpperSetinstead.
Instances For
A lower set relative to a predicate P is a set such that all elements satisfy P and
any element less than one of its members and satisfying P is also a member.
- carrier : Set α
The carrier of a
RelLowerSet. - isRelLowerSet' : IsRelLowerSet self.carrier P
The carrier of a
RelLowerSetis a lower set relative toP.Do NOT use directly. Please use
RelLowerSet.isRelLowerSetinstead.
Instances For
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.