Documentation

Mathlib.Order.BoundedOrder.Basic

⊤ and ⊥, bounded lattices and variants #

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 #

Top, bottom element #

class OrderTop (α : Type u) [LE α] extends Top α :

An order is an OrderTop if it has a greatest element. We state this using a data mixin, holding the value of ⊤ and the greatest element constraint.

  • top : α
  • le_top (a : α) : a ≤ ⊤

    ⊤ is the greatest element

Instances
    class OrderBot (α : Type u) [LE α] extends Bot α :

    An order is an OrderBot if it has a least element. We state this using a data mixin, holding the value of ⊥ and the least element constraint.

    • bot : α
    • bot_le (a : α) : ⊥ ≤ a

      ⊥ is the least element

    Instances
      noncomputable def topOrderOrNoTopOrder (α : Type u_1) [LE α] :

      An order is (noncomputably) either an OrderTop or a NoTopOrder. Use as cases topOrderOrNoTopOrder α.

      Equations
      Instances For
        noncomputable def botOrderOrNoBotOrder (α : Type u_1) [LE α] :

        An order is (noncomputably) either an OrderBot or a NoBotOrder. Use as cases botOrderOrNoBotOrder α.

        Equations
        Instances For
          theorem dite_ne_top {α : Type u} [Top α] {p : Prop} [Decidable p] {a : p → α} {b : ¬p → α} (ha : ∀ (h : p), a h ≠ ⊤) (hb : ∀ (h : ¬p), b h ≠ ⊤) :
          (if h : p then a h else b h) ≠ ⊤
          theorem dite_ne_bot {α : Type u} [Bot α] {p : Prop} [Decidable p] {a : p → α} {b : ¬p → α} (ha : ∀ (h : p), a h ≠ ⊥) (hb : ∀ (h : ¬p), b h ≠ ⊥) :
          (if h : p then a h else b h) ≠ ⊥
          theorem ite_ne_top {α : Type u} [Top α] {p : Prop} [Decidable p] {a b : α} (ha : p → a ≠ ⊤) (hb : ¬p → b ≠ ⊤) :
          (if p then a else b) ≠ ⊤
          theorem ite_ne_bot {α : Type u} [Bot α] {p : Prop} [Decidable p] {a b : α} (ha : p → a ≠ ⊥) (hb : ¬p → b ≠ ⊥) :
          (if p then a else b) ≠ ⊥
          @[simp]
          theorem le_top {α : Type u} [LE α] [OrderTop α] {a : α} :
          @[simp]
          theorem bot_le {α : Type u} [LE α] [OrderBot α] {a : α} :
          @[simp]
          theorem isTop_top {α : Type u} [LE α] [OrderTop α] :
          @[simp]
          theorem isBot_bot {α : Type u} [LE α] [OrderBot α] :
          def IsTop.rec {α : Type u} [LE α] {P : (x : α) → IsTop x → Sort u_1} (h : [inst : OrderTop α] → P ⊤ ⋯) (x : α) (hx : IsTop x) :
          P x hx

          A top element can be replaced with ⊤.

          Prefer IsTop.eq_top if α already has a top element.

          Equations
          Instances For
            def IsBot.rec {α : Type u} [LE α] {P : (x : α) → IsBot x → Sort u_1} (h : [inst : OrderBot α] → P ⊥ ⋯) (x : α) (hx : IsBot x) :
            P x hx

            A bottom element can be replaced with ⊥.

            Prefer IsBot.eq_bot if α already has a bottom element.

            Equations
            Instances For
              @[simp]
              theorem isMax_top {α : Type u} [Preorder α] [OrderTop α] :
              @[simp]
              theorem isMin_bot {α : Type u} [Preorder α] [OrderBot α] :
              @[simp]
              theorem not_top_lt {α : Type u} [Preorder α] [OrderTop α] {a : α} :
              @[simp]
              theorem not_lt_bot {α : Type u} [Preorder α] [OrderBot α] {a : α} :
              theorem ne_top_of_lt {α : Type u} [Preorder α] [OrderTop α] {a b : α} (h : a < b) :
              theorem ne_bot_of_gt {α : Type u} [Preorder α] [OrderBot α] {a b : α} (h : b < a) :
              theorem LT.lt.ne_top {α : Type u} [Preorder α] [OrderTop α] {a b : α} (h : a < b) :

              Alias of ne_top_of_lt.

              theorem LT.lt.ne_bot {α : Type u} [Preorder α] [OrderBot α] {a b : α} (h : b < a) :
              theorem lt_top_of_lt {α : Type u} [Preorder α] [OrderTop α] {a b : α} (h : a < b) :
              a < ⊤
              theorem bot_lt_of_lt {α : Type u} [Preorder α] [OrderBot α] {a b : α} (h : b < a) :
              ⊥ < a
              theorem LT.lt.lt_top {α : Type u} [Preorder α] [OrderTop α] {a b : α} (h : a < b) :
              a < ⊤

              Alias of lt_top_of_lt.

              theorem LT.lt.bot_lt {α : Type u} [Preorder α] [OrderBot α] {a b : α} (h : b < a) :
              ⊥ < a
              @[simp]
              theorem isMax_iff_eq_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              @[simp]
              theorem isMin_iff_eq_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              @[simp]
              theorem isTop_iff_eq_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              @[simp]
              theorem isBot_iff_eq_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem not_isMax_iff_ne_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              theorem not_isMin_iff_ne_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem not_isTop_iff_ne_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              theorem not_isBot_iff_ne_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem IsMax.eq_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              IsMax a → a = ⊤

              Alias of the forward direction of isMax_iff_eq_top.

              theorem IsMin.eq_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              IsMin a → a = ⊥
              theorem IsTop.eq_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              IsTop a → a = ⊤

              Alias of the forward direction of isTop_iff_eq_top.

              theorem IsBot.eq_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              IsBot a → a = ⊥
              @[simp]
              theorem top_le_iff {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              @[simp]
              theorem le_bot_iff {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem top_unique {α : Type u} [PartialOrder α] [OrderTop α] {a : α} (h : ⊤ ≤ a) :
              a = ⊤
              theorem bot_unique {α : Type u} [PartialOrder α] [OrderBot α] {a : α} (h : a ≤ ⊥) :
              a = ⊥
              theorem eq_top_iff {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              theorem eq_bot_iff {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem eq_top_mono {α : Type u} [PartialOrder α] [OrderTop α] {a b : α} (h : a ≤ b) (h₂ : a = ⊤) :
              b = ⊤
              theorem eq_bot_mono {α : Type u} [PartialOrder α] [OrderBot α] {a b : α} (h : b ≤ a) (h₂ : a = ⊥) :
              b = ⊥
              theorem lt_top_iff_ne_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              theorem bot_lt_iff_ne_bot {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              @[simp]
              theorem not_lt_top_iff {α : Type u} [PartialOrder α] [OrderTop α] {a : α} :
              @[simp]
              theorem not_bot_lt_iff {α : Type u} [PartialOrder α] [OrderBot α] {a : α} :
              theorem eq_top_or_lt_top {α : Type u} [PartialOrder α] [OrderTop α] (a : α) :
              a = ⊤ ∨ a < ⊤
              theorem eq_bot_or_bot_lt {α : Type u} [PartialOrder α] [OrderBot α] (a : α) :
              a = ⊥ ∨ ⊥ < a
              theorem Ne.lt_top {α : Type u} [PartialOrder α] [OrderTop α] {a : α} (h : a ≠ ⊤) :
              a < ⊤
              theorem Ne.bot_lt {α : Type u} [PartialOrder α] [OrderBot α] {a : α} (h : a ≠ ⊥) :
              ⊥ < a
              theorem Ne.lt_top' {α : Type u} [PartialOrder α] [OrderTop α] {a : α} (h : ⊤ ≠ a) :
              a < ⊤
              theorem Ne.bot_lt' {α : Type u} [PartialOrder α] [OrderBot α] {a : α} (h : ⊥ ≠ a) :
              ⊥ < a
              theorem ne_top_of_le_ne_top {α : Type u} [PartialOrder α] [OrderTop α] {a b : α} (hb : b ≠ ⊤) (hab : a ≤ b) :
              theorem ne_bot_of_le_ne_bot {α : Type u} [PartialOrder α] [OrderBot α] {a b : α} (hb : b ≠ ⊥) (hab : b ≤ a) :
              theorem top_notMem_iff {α : Type u} [PartialOrder α] [OrderTop α] {s : Set α} :
              ¬⊤ ∈ s ↔ ∀ (x : α), x ∈ s → x < ⊤
              theorem bot_notMem_iff {α : Type u} [PartialOrder α] [OrderBot α] {s : Set α} :
              ¬⊥ ∈ s ↔ ∀ (x : α), x ∈ s → ⊥ < x
              theorem OrderTop.ext_top {α : Type u_1} {hA : PartialOrder α} (A : OrderTop α) {hB : PartialOrder α} (B : OrderTop α) (H : ∀ (x y : α), x ≤ y ↔ x ≤ y) :
              theorem OrderBot.ext_bot {α : Type u_1} {hA : PartialOrder α} (A : OrderBot α) {hB : PartialOrder α} (B : OrderBot α) (H : ∀ (y x : α), y ≤ x ↔ y ≤ x) :
              @[implicit_reducible]
              instance OrderDual.instTop (α : Type u) [Bot α] :
              Equations
              @[implicit_reducible]
              instance OrderDual.instBot (α : Type u) [Top α] :
              Equations
              @[implicit_reducible]
              instance OrderDual.instOrderTop (α : Type u) [LE α] [OrderBot α] :
              Equations
              @[implicit_reducible]
              instance OrderDual.instOrderBot (α : Type u) [LE α] [OrderTop α] :
              Equations
              @[simp]
              theorem OrderDual.ofDual_top (α : Type u) [Bot α] :
              @[simp]
              theorem OrderDual.ofDual_bot (α : Type u) [Top α] :
              @[simp]
              theorem OrderDual.toDual_top (α : Type u) [Top α] :
              @[simp]
              theorem OrderDual.toDual_bot (α : Type u) [Bot α] :
              @[simp]
              theorem OrderDual.ofDual_eq_top (α : Type u) [Top α] {a : αᵒᵈ} :
              @[simp]
              theorem OrderDual.ofDual_eq_bot (α : Type u) [Bot α] {a : αᵒᵈ} :
              @[simp]
              theorem OrderDual.toDual_eq_top (α : Type u) [Bot α] {a : α} :
              @[simp]
              theorem OrderDual.toDual_eq_bot (α : Type u) [Top α] {a : α} :
              @[deprecated not_bot_lt_iff (since := "2025-12-03")]
              theorem eq_bot_of_minimal {α : Type u} [PartialOrder α] [OrderBot α] {a : α} (h : ∀ (b : α), ¬b < a) :
              a = ⊥

              Bounded order #

              class BoundedOrder (α : Type u) [LE α] extends OrderTop α, OrderBot α :

              A bounded order describes an order (≤) with a top and bottom element, denoted ⊤ and ⊥ respectively.

              Instances
                @[implicit_reducible]
                Equations

                Function lattices #

                @[implicit_reducible]
                instance Pi.instBotForall {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Bot (α' i)] :
                Bot ((i : ι) → α' i)
                Equations
                @[implicit_reducible]
                instance Pi.instTopForall {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Top (α' i)] :
                Top ((i : ι) → α' i)
                Equations
                @[simp]
                theorem Pi.bot_apply {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Bot (α' i)] (i : ι) :
                @[simp]
                theorem Pi.top_apply {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Top (α' i)] (i : ι) :
                theorem Pi.bot_def {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Bot (α' i)] :
                ⊥ = fun (x : ι) => ⊥
                theorem Pi.top_def {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → Top (α' i)] :
                ⊤ = fun (x : ι) => ⊤
                @[simp]
                theorem Pi.bot_comp {α : Type u_3} {β : Type u_4} {γ : Type u_5} [Bot γ] (x : α → β) :
                @[simp]
                theorem Pi.top_comp {α : Type u_3} {β : Type u_4} {γ : Type u_5} [Top γ] (x : α → β) :
                @[implicit_reducible]
                instance Pi.instOrderBot {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → LE (α' i)] [(i : ι) → OrderBot (α' i)] :
                OrderBot ((i : ι) → α' i)
                Equations
                @[implicit_reducible]
                instance Pi.instOrderTop {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → LE (α' i)] [(i : ι) → OrderTop (α' i)] :
                OrderTop ((i : ι) → α' i)
                Equations
                @[implicit_reducible]
                instance Pi.instBoundedOrder {ι : Type u_1} {α' : ι → Type u_2} [(i : ι) → LE (α' i)] [(i : ι) → BoundedOrder (α' i)] :
                BoundedOrder ((i : ι) → α' i)
                Equations
                theorem eq_bot_of_bot_eq_top {α : Type u} [PartialOrder α] [BoundedOrder α] (hα : ⊥ = ⊤) (x : α) :
                x = ⊥
                theorem eq_top_of_top_eq_bot {α : Type u} [PartialOrder α] [BoundedOrder α] (hα : ⊤ = ⊥) (x : α) :
                x = ⊤
                theorem eq_top_of_bot_eq_top {α : Type u} [PartialOrder α] [BoundedOrder α] (hα : ⊥ = ⊤) (x : α) :
                x = ⊤
                theorem eq_bot_of_top_eq_bot {α : Type u} [PartialOrder α] [BoundedOrder α] (hα : ⊤ = ⊥) (x : α) :
                x = ⊥
                @[reducible, inline]
                abbrev OrderTop.lift {α : Type u} {β : Type v} [LE α] [Top α] [LE β] [OrderTop β] (f : α → β) (map_le : ∀ (a b : α), f a ≤ f b → a ≤ b) (map_top : f ⊤ = ⊤) :

                Pullback an OrderTop.

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev OrderBot.lift {α : Type u} {β : Type v} [LE α] [Bot α] [LE β] [OrderBot β] (f : α → β) (map_le : ∀ (b a : α), f b ≤ f a → b ≤ a) (map_bot : f ⊥ = ⊥) :

                  Pullback an OrderBot.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev BoundedOrder.lift {α : Type u} {β : Type v} [LE α] [Top α] [Bot α] [LE β] [BoundedOrder β] (f : α → β) (map_le : ∀ (a b : α), f a ≤ f b → a ≤ b) (map_top : f ⊤ = ⊤) (map_bot : f ⊥ = ⊥) :

                    Pullback a BoundedOrder.

                    Equations
                    Instances For

                      Subtype, order dual, product lattices #

                      @[reducible, inline]
                      abbrev Subtype.orderBot {α : Type u} {p : α → Prop} [LE α] [OrderBot α] (hbot : p ⊥) :
                      OrderBot { x : α // p x }

                      A subtype remains a ⊥-order if the property holds at ⊥.

                      Equations
                      Instances For
                        @[reducible, inline]
                        abbrev Subtype.orderTop {α : Type u} {p : α → Prop} [LE α] [OrderTop α] (htop : p ⊤) :
                        OrderTop { x : α // p x }

                        A subtype remains a ⊤-order if the property holds at ⊤.

                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev Subtype.boundedOrder {α : Type u} {p : α → Prop} [LE α] [BoundedOrder α] (hbot : p ⊥) (htop : p ⊤) :

                          A subtype remains a bounded order if the property holds at ⊥ and ⊤.

                          Equations
                          Instances For
                            @[simp]
                            theorem Subtype.mk_bot {α : Type u} {p : α → Prop} [PartialOrder α] [OrderBot α] [OrderBot (Subtype p)] (hbot : p ⊥) :
                            @[simp]
                            theorem Subtype.mk_top {α : Type u} {p : α → Prop} [PartialOrder α] [OrderTop α] [OrderTop (Subtype p)] (htop : p ⊤) :
                            theorem Subtype.coe_bot {α : Type u} {p : α → Prop} [PartialOrder α] [OrderBot α] [OrderBot (Subtype p)] (hbot : p ⊥) :
                            ↑⊥ = ⊥
                            theorem Subtype.coe_top {α : Type u} {p : α → Prop} [PartialOrder α] [OrderTop α] [OrderTop (Subtype p)] (htop : p ⊤) :
                            ↑⊤ = ⊤
                            @[simp]
                            theorem Subtype.coe_eq_bot_iff {α : Type u} {p : α → Prop} [PartialOrder α] [OrderBot α] [OrderBot (Subtype p)] (hbot : p ⊥) {x : { x : α // p x }} :
                            ↑x = ⊥ ↔ x = ⊥
                            @[simp]
                            theorem Subtype.coe_eq_top_iff {α : Type u} {p : α → Prop} [PartialOrder α] [OrderTop α] [OrderTop (Subtype p)] (htop : p ⊤) {x : { x : α // p x }} :
                            ↑x = ⊤ ↔ x = ⊤
                            @[simp]
                            theorem Subtype.mk_eq_bot_iff {α : Type u} {p : α → Prop} [PartialOrder α] [OrderBot α] [OrderBot (Subtype p)] (hbot : p ⊥) {x : α} (hx : p x) :
                            ⟨x, hx⟩ = ⊥ ↔ x = ⊥
                            @[simp]
                            theorem Subtype.mk_eq_top_iff {α : Type u} {p : α → Prop} [PartialOrder α] [OrderTop α] [OrderTop (Subtype p)] (htop : p ⊤) {x : α} (hx : p x) :
                            ⟨x, hx⟩ = ⊤ ↔ x = ⊤
                            @[implicit_reducible]
                            instance Prod.instTop (α : Type u) (β : Type v) [Top α] [Top β] :
                            Top (α × β)
                            Equations
                            @[implicit_reducible]
                            instance Prod.instBot (α : Type u) (β : Type v) [Bot α] [Bot β] :
                            Bot (α × β)
                            Equations
                            @[simp]
                            theorem Prod.fst_top (α : Type u) (β : Type v) [Top α] [Top β] :
                            @[simp]
                            theorem Prod.fst_bot (α : Type u) (β : Type v) [Bot α] [Bot β] :
                            @[simp]
                            theorem Prod.snd_top (α : Type u) (β : Type v) [Top α] [Top β] :
                            @[simp]
                            theorem Prod.snd_bot (α : Type u) (β : Type v) [Bot α] [Bot β] :
                            @[implicit_reducible]
                            instance Prod.instOrderTop (α : Type u) (β : Type v) [LE α] [LE β] [OrderTop α] [OrderTop β] :
                            OrderTop (α × β)
                            Equations
                            @[implicit_reducible]
                            instance Prod.instOrderBot (α : Type u) (β : Type v) [LE α] [LE β] [OrderBot α] [OrderBot β] :
                            OrderBot (α × β)
                            Equations
                            @[implicit_reducible]
                            instance Prod.instBoundedOrder (α : Type u) (β : Type v) [LE α] [LE β] [BoundedOrder α] [BoundedOrder β] :
                            Equations
                            @[implicit_reducible]
                            instance ULift.instTop {α : Type u} [Top α] :
                            Top (ULift α)
                            Equations
                            @[implicit_reducible]
                            instance ULift.instBot {α : Type u} [Bot α] :
                            Bot (ULift α)
                            Equations
                            @[simp]
                            theorem ULift.up_top {α : Type u} [Top α] :
                            { down := ⊤ } = ⊤
                            @[simp]
                            theorem ULift.up_bot {α : Type u} [Bot α] :
                            { down := ⊥ } = ⊥
                            @[simp]
                            theorem ULift.down_top {α : Type u} [Top α] :
                            @[simp]
                            theorem ULift.down_bot {α : Type u} [Bot α] :
                            @[implicit_reducible]
                            instance ULift.instOrderBot {α : Type u} [LE α] [OrderBot α] :
                            Equations
                            @[implicit_reducible]
                            instance ULift.instOrderTop {α : Type u} [LE α] [OrderTop α] :
                            Equations
                            @[implicit_reducible]
                            instance ULift.instBoundedOrder {α : Type u} [LE α] [BoundedOrder α] :
                            Equations
                            @[simp]
                            theorem bot_ne_top {α : Type u} [PartialOrder α] [BoundedOrder α] [Nontrivial α] :
                            @[simp]
                            theorem top_ne_bot {α : Type u} [PartialOrder α] [BoundedOrder α] [Nontrivial α] :
                            @[simp]
                            theorem bot_lt_top {α : Type u} [PartialOrder α] [BoundedOrder α] [Nontrivial α] :
                            @[implicit_reducible]
                            Equations
                            @[simp]
                            @[simp]