Documentation

Mathlib.Order.TypeTags

Order-related type synonyms #

In this file we define WithBot, WithTop, ENat, and PNat. The definitions were moved to this file without any theory so that, e.g., Data/Countable/Basic can prove Countable ENat without exploding its imports.

def WithBot (α : Type u_2) :
Type u_2

Attach to a type.

Equations
Instances For
    instance WithBot.instRepr {α : Type u_1} [Repr α] :
    Equations
    @[match_pattern]
    def WithBot.some {α : Type u_1} :
    αWithBot α

    The canonical map from α into WithBot α

    Equations
    Instances For
      instance WithBot.coe {α : Type u_1} :
      Coe α (WithBot α)
      Equations
      instance WithBot.bot {α : Type u_1} :
      Equations
      instance WithBot.inhabited {α : Type u_1} :
      Equations
      def WithBot.recBotCoe {α : Type u_1} {C : WithBot αSort u_2} (bot : C ) (coe : (a : α) → C a) (n : WithBot α) :
      C n

      Recursor for WithBot using the preferred forms and ↑a.

      Equations
      Instances For
        @[simp]
        theorem WithBot.recBotCoe_bot {α : Type u_1} {C : WithBot αSort u_2} (d : C ) (f : (a : α) → C a) :
        @[simp]
        theorem WithBot.recBotCoe_coe {α : Type u_1} {C : WithBot αSort u_2} (d : C ) (f : (a : α) → C a) (x : α) :
        WithBot.recBotCoe d f x = f x
        def WithTop (α : Type u_2) :
        Type u_2

        Attach to a type.

        Equations
        Instances For
          instance WithTop.instRepr {α : Type u_1} [Repr α] :
          Equations
          @[match_pattern]
          def WithTop.some {α : Type u_1} :
          αWithTop α

          The canonical map from α into WithTop α

          Equations
          Instances For
            instance WithTop.coeTC {α : Type u_1} :
            CoeTC α (WithTop α)
            Equations
            instance WithTop.top {α : Type u_1} :
            Equations
            instance WithTop.inhabited {α : Type u_1} :
            Equations
            def WithTop.recTopCoe {α : Type u_1} {C : WithTop αSort u_2} (top : C ) (coe : (a : α) → C a) (n : WithTop α) :
            C n

            Recursor for WithTop using the preferred forms and ↑a.

            Equations
            Instances For
              @[simp]
              theorem WithTop.recTopCoe_top {α : Type u_1} {C : WithTop αSort u_2} (d : C ) (f : (a : α) → C a) :
              @[simp]
              theorem WithTop.recTopCoe_coe {α : Type u_1} {C : WithTop αSort u_2} (d : C ) (f : (a : α) → C a) (x : α) :
              WithTop.recTopCoe d f x = f x