⊤ and ⊥, bounded lattices and variants #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines top and bottom elements (greatest and least elements) of a type, the bounded
variants of different kinds of lattices, sets up the typeclass hierarchy between them and provides
instances for Prop
and fun
.
Main declarations #
has_<top/bot> α
: Typeclasses to declare the⊤
/⊥
notation.order_<top/bot> α
: Order with a top/bottom element.bounded_order α
: Order with a top and bottom element.
Common lattices #
- Distributive lattices with a bottom element. Notated by
[distrib_lattice α] [order_bot α]
It captures the properties ofdisjoint
that are common togeneralized_boolean_algebra
anddistrib_lattice
whenorder_bot
. - Bounded and distributive lattice. Notated by
[distrib_lattice α] [bounded_order α]
. Typical examples includeProp
andset α
.
Top, bottom element #
- top : α
Typeclass for the ⊤
(\top
) notation
Instances of this typeclass
- order_top.to_has_top
- generalized_heyting_algebra.to_has_top
- coheyting_algebra.to_has_top
- boolean_algebra.to_has_top
- linear_ordered_add_comm_monoid_with_top.to_has_top
- complete_lattice.to_has_top
- order_dual.has_top
- pi.has_top
- prod.has_top
- with_top.has_top
- associates.has_top
- sup_hom.has_top
- inf_hom.has_top
- subsemigroup.has_top
- add_subsemigroup.has_top
- submonoid.has_top
- add_submonoid.has_top
- subgroup.has_top
- add_subgroup.has_top
- submodule.has_top
- subsemiring.has_top
- subring.has_top
- order_hom.has_top
- Inf_hom.has_top
- enat.has_top
- part_enat.has_top
- filter.has_top
- upper_set.has_top
- lower_set.has_top
- uniform_space.has_top
- group_topology.has_top
- add_group_topology.has_top
- subfield.has_top
- quiver.wide_subquiver.has_top
Instances of other typeclasses for has_top
- has_top.has_sizeof_inst
- bot : α
Typeclass for the ⊥
(\bot
) notation
Instances of this typeclass
- order_bot.to_has_bot
- generalized_coheyting_algebra.to_has_bot
- heyting_algebra.to_has_bot
- generalized_boolean_algebra.to_has_bot
- boolean_algebra.to_has_bot
- canonically_ordered_add_monoid.to_has_bot
- canonically_ordered_monoid.to_has_bot
- complete_lattice.to_has_bot
- conditionally_complete_linear_order_bot.to_has_bot
- order_dual.has_bot
- pi.has_bot
- prod.has_bot
- with_bot.has_bot
- associates.has_bot
- sup_hom.has_bot
- inf_hom.has_bot
- subsemigroup.has_bot
- add_subsemigroup.has_bot
- submonoid.has_bot
- add_submonoid.has_bot
- subgroup.has_bot
- add_subgroup.has_bot
- sub_mul_action.has_bot
- submodule.has_bot
- subsemiring.has_bot
- subring.has_bot
- order_hom.has_bot
- Sup_hom.has_bot
- enat.has_bot
- part_enat.has_bot
- linear_pmap.has_bot
- pequiv.has_bot
- upper_set.has_bot
- lower_set.has_bot
- uniform_space.has_bot
- group_topology.has_bot
- add_group_topology.has_bot
- quiver.wide_subquiver.has_bot
Instances of other typeclasses for has_bot
- has_bot.has_sizeof_inst
An order is an order_top
if it has a greatest element.
We state this using a data mixin, holding the value of ⊤
and the greatest element constraint.
Instances of this typeclass
- bounded_order.to_order_top
- generalized_heyting_algebra.to_order_top
- linear_ordered_add_comm_monoid_with_top.to_order_top
- order_dual.order_top
- pi.order_top
- prod.order_top
- with_bot.order_top
- with_top.order_top
- multiplicative.order_top
- additive.order_top
- set.order_top
- associates.order_top
- pi.lex.order_top
- top_hom.order_top
- sup_hom.order_top
- inf_hom.order_top
- inf_top_hom.order_top
- set.Iic.order_top
- set.Ici.order_top
- submodule.order_top
- flag.order_top
- order_hom.order_top
- Inf_hom.order_top
- prod.lex.order_top
- enat.order_top
- part_enat.order_top
- sum.lex.order_top
- ordinal.order_top_out_succ
- topological_space.open_nhds_of.order_top
Instances of other typeclasses for order_top
- order_top.has_sizeof_inst
An order is (noncomputably) either an order_top
or a no_order_top
. Use as
casesI bot_order_or_no_bot_order α
.
Alias of ne_top_of_lt
.
Alias of the forward direction of is_max_iff_eq_top
.
Alias of the forward direction of is_top_iff_eq_top
.
An order is an order_bot
if it has a least element.
We state this using a data mixin, holding the value of ⊥
and the least element constraint.
Instances of this typeclass
- bounded_order.to_order_bot
- generalized_coheyting_algebra.to_order_bot
- generalized_boolean_algebra.to_order_bot
- canonically_ordered_add_monoid.to_order_bot
- canonically_ordered_monoid.to_order_bot
- conditionally_complete_linear_order_bot.to_order_bot
- idem_semiring.to_order_bot
- order_dual.order_bot
- pi.order_bot
- prod.order_bot
- with_bot.order_bot
- with_top.order_bot
- with_zero.order_bot
- nat.order_bot
- multiplicative.order_bot
- additive.order_bot
- nat.subtype.order_bot
- associates.order_bot
- multiset.order_bot
- finset.order_bot
- pi.lex.order_bot
- bot_hom.order_bot
- sup_hom.order_bot
- inf_hom.order_bot
- sup_bot_hom.order_bot
- pnat.order_bot
- set.Iic.order_bot
- set.Ici.order_bot
- submodule.order_bot
- flag.order_bot
- part.order_bot
- order_hom.order_bot
- Sup_hom.order_bot
- set_semiring.order_bot
- prod.lex.order_bot
- enat.order_bot
- part_enat.order_bot
- linear_pmap.order_bot
- finsupp.order_bot
- sum.lex.order_bot
- ordinal.order_bot
- pequiv.order_bot
- nonneg.order_bot
- nnreal.order_bot
- ennreal.order_bot
- seminorm.order_bot
Instances of other typeclasses for order_bot
- order_bot.has_sizeof_inst
An order is (noncomputably) either an order_bot
or a no_order_bot
. Use as
casesI bot_order_or_no_bot_order α
.
Alias of ne_bot_of_gt
.
Alias of the forward direction of is_min_iff_eq_bot
.
Alias of the forward direction of is_bot_iff_eq_bot
.
Bounded order #
A bounded order describes an order (≤)
with a top and bottom element,
denoted ⊤
and ⊥
respectively.
Instances of this typeclass
- heyting_algebra.to_bounded_order
- coheyting_algebra.to_bounded_order
- boolean_algebra.to_bounded_order
- complete_lattice.to_bounded_order
- order_dual.bounded_order
- pi.bounded_order
- prod.bounded_order
- bool.bounded_order
- complementeds.bounded_order
- with_bot.bounded_order
- with_top.bounded_order
- Prop.bounded_order
- multiplicative.bounded_order
- additive.bounded_order
- associates.bounded_order
- fin.bounded_order
- finset.bounded_order
- pi.lex.bounded_order
- sup_hom.bounded_order
- inf_hom.bounded_order
- set.Iic.bounded_order
- set.Ici.bounded_order
- flag.bounded_order
- prod.lex.bounded_order
- part_enat.bounded_order
- sum.lex.bounded_order
- group_topology.bounded_order
- add_group_topology.bounded_order
- ennreal.bounded_order
- sign_type.bounded_order
Instances of other typeclasses for bounded_order
- bounded_order.has_sizeof_inst
Equations
- order_dual.bounded_order α = {top := order_top.top (order_dual.order_top α), le_top := _, bot := order_bot.bot (order_dual.order_bot α), bot_le := _}
In this section we prove some properties about monotone and antitone operations on Prop
#
Function lattices #
Equations
- pi.bounded_order = {top := order_top.top pi.order_top, le_top := _, bot := order_bot.bot pi.order_bot, bot_le := _}
Pullback a bounded_order
.
Equations
- bounded_order.lift f map_le map_top map_bot = {top := order_top.top (order_top.lift f map_le map_top), le_top := _, bot := order_bot.bot (order_bot.lift f map_le map_bot), bot_le := _}
Subtype, order dual, product lattices #
A subtype remains a bounded order if the property holds at ⊥
and ⊤
.
Equations
- subtype.bounded_order hbot htop = {top := order_top.top (subtype.order_top htop), le_top := _, bot := order_bot.bot (subtype.order_bot hbot), bot_le := _}
Equations
- prod.bounded_order α β = {top := order_top.top (prod.order_top α β), le_top := _, bot := order_bot.bot (prod.order_bot α β), bot_le := _}