Documentation

Mathlib.Init.Data.Ordering.Basic

Note about Mathlib/Init/ #

The files in Mathlib/Init are leftovers from the port from Mathlib3. (They contain content moved from lean3 itself that Mathlib needed but was not moved to lean4.)

We intend to move all the content of these files out into the main Mathlib directory structure. Contributions assisting with this are appreciated.

#align statements without corresponding declarations (i.e. because the declaration is in Batteries or Lean) can be left here. These will be deleted soon so will not significantly delay deleting otherwise empty Init files.

Helper definitions and instances for Ordering #

@[inline]

Combine two Orderings lexicographically.

Equations
Instances For
    def Ordering.toRel {α : Type u} [LT α] :
    OrderingααProp

    The relation corresponding to each Ordering constructor (e.g. .lt.toProp a b is a < b).

    Equations
    Instances For
      def cmpUsing {α : Type u} (lt : ααProp) [DecidableRel lt] (a : α) (b : α) :

      Lift a decidable relation to an Ordering, assuming that incomparable terms are Ordering.eq.

      Equations
      Instances For
        def cmp {α : Type u} [LT α] [DecidableRel fun (x x_1 : α) => x < x_1] (a : α) (b : α) :

        Construct an Ordering from a type with a decidable LT instance, assuming that incomparable terms are Ordering.eq.

        Equations
        Instances For