Documentation

Mathlib.Order.Lex

Type synonyms #

This file provides two type synonyms for order theory:

Notation #

The general rule for notation of Lex types is to append to the usual notation.

Implementation notes #

One should not abuse definitional equality between α and αᵒᵈ/Lex α. Instead, explicit coercions should be inserted:

See also #

This file is similar to Mathlib.Algebra.Group.TypeTags.Basic.

Lexicographic order #

def Lex (α : Type u_2) :
Type u_2

A type synonym to equip a type with its lexicographic order.

Equations
Instances For
    @[match_pattern]
    def toLex {α : Type u_1} :
    α Lex α

    toLex is the identity function to the Lex of a type.

    Equations
    Instances For
      @[match_pattern]
      def ofLex {α : Type u_1} :
      Lex α α

      ofLex is the identity function from the Lex of a type.

      Equations
      Instances For
        @[simp]
        theorem toLex_symm_eq {α : Type u_1} :
        @[simp]
        theorem ofLex_symm_eq {α : Type u_1} :
        @[simp]
        theorem toLex_ofLex {α : Type u_1} (a : Lex α) :
        toLex (ofLex a) = a
        @[simp]
        theorem ofLex_toLex {α : Type u_1} (a : α) :
        ofLex (toLex a) = a
        theorem toLex_inj {α : Type u_1} {a b : α} :
        toLex a = toLex b a = b
        theorem ofLex_inj {α : Type u_1} {a b : Lex α} :
        ofLex a = ofLex b a = b
        @[implicit_reducible]
        instance instBEqLex (α : Type u_2) [BEq α] :
        BEq (Lex α)
        Equations
        instance instLawfulBEqLex (α : Type u_2) [BEq α] [h : LawfulBEq α] :
        @[implicit_reducible]
        instance instDecidableEqLex (α : Type u_2) [h : DecidableEq α] :
        Equations
        @[implicit_reducible]
        instance instInhabitedLex (α : Type u_2) [h : Inhabited α] :
        Equations
        instance instNonemptyLex (α : Type u_2) [h : Nonempty α] :
        instance instNontrivialLex (α : Type u_2) [h : Nontrivial α] :
        @[implicit_reducible]
        instance instUniqueLex (α : Type u_2) [h : Unique α] :
        Unique (Lex α)
        Equations
        @[implicit_reducible]
        instance instCoeFunLex {α : Type u_2} {γ : αSort u_3} [H : CoeFun α γ] :
        CoeFun (Lex α) γ
        Equations
        def Lex.rec {α : Type u_1} {β : Lex αSort u_2} (h : (a : α) → β (toLex a)) (a : Lex α) :
        β a

        A recursor for Lex. Use as induction x.

        Equations
        Instances For
          @[simp]
          theorem Lex.forall {α : Type u_1} {p : Lex αProp} :
          (∀ (a : Lex α), p a) ∀ (a : α), p (toLex a)
          @[simp]
          theorem Lex.exists {α : Type u_1} {p : Lex αProp} :
          ( (a : Lex α), p a) (a : α), p (toLex a)

          Colexicographic order #

          def Colex (α : Type u_2) :
          Type u_2

          A type synonym to equip a type with its lexicographic order.

          Equations
          Instances For
            @[match_pattern]
            def toColex {α : Type u_1} :
            α Colex α

            toColex is the identity function to the Colex of a type.

            Equations
            Instances For
              @[match_pattern]
              def ofColex {α : Type u_1} :
              Colex α α

              ofColex is the identity function from the Colex of a type.

              Equations
              Instances For
                @[simp]
                @[simp]
                @[simp]
                theorem toColex_ofColex {α : Type u_1} (a : Colex α) :
                @[simp]
                theorem ofColex_toColex {α : Type u_1} (a : α) :
                theorem toColex_inj {α : Type u_1} {a b : α} :
                theorem ofColex_inj {α : Type u_1} {a b : Colex α} :
                @[implicit_reducible]
                instance instBEqColex (α : Type u_2) [BEq α] :
                BEq (Colex α)
                Equations
                instance instLawfulBEqColex (α : Type u_2) [BEq α] [h : LawfulBEq α] :
                @[implicit_reducible]
                instance instDecidableEqColex (α : Type u_2) [h : DecidableEq α] :
                Equations
                @[implicit_reducible]
                instance instInhabitedColex (α : Type u_2) [h : Inhabited α] :
                Equations
                instance instNonemptyColex (α : Type u_2) [h : Nonempty α] :
                instance instNontrivialColex (α : Type u_2) [h : Nontrivial α] :
                @[implicit_reducible]
                instance instUniqueColex (α : Type u_2) [h : Unique α] :
                Equations
                @[implicit_reducible]
                instance instCoeFunColex {α : Type u_2} {γ : αSort u_3} [H : CoeFun α γ] :
                CoeFun (Colex α) γ
                Equations
                def Colex.rec {α : Type u_1} {β : Colex αSort u_2} (h : (a : α) → β (toColex a)) (a : Colex α) :
                β a

                A recursor for Colex. Use as induction x.

                Equations
                Instances For
                  @[simp]
                  theorem Colex.forall {α : Type u_1} {p : Colex αProp} :
                  (∀ (a : Colex α), p a) ∀ (a : α), p (toColex a)
                  @[simp]
                  theorem Colex.exists {α : Type u_1} {p : Colex αProp} :
                  ( (a : Colex α), p a) (a : α), p (toColex a)