File: .lake/packages/batteries/Batteries/Classes/Order.lean

full_name: Ordering.swap_swap
code: @[simp] theorem swap_swap {o : Ordering} : o.swap.swap = o 
goal: o.swap.swap = o

full_name: Ordering.swap_inj
code: @[simp] theorem swap_inj {o₁ o₂ : Ordering} : o₁.swap = o₂.swap ↔ o₁ = o₂ 
goal: o₁.swap = o₂.swap ↔ o₁ = o₂

full_name: Ordering.swap_then
code: theorem swap_then (o₁ o₂ : Ordering) : (o₁.then o₂).swap = o₁.swap.then o₂.swap 
goal: (o₁.then o₂).swap = o₁.swap.then o₂.swap

full_name: Ordering.then_eq_lt
code: theorem then_eq_lt {o₁ o₂ : Ordering} : o₁.then o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt 
goal: o₁.then o₂ = Ordering.lt ↔ o₁ = Ordering.lt ∨ o₁ = Ordering.eq ∧ o₂ = Ordering.lt

full_name: Ordering.then_eq_eq
code: theorem then_eq_eq {o₁ o₂ : Ordering} : o₁.then o₂ = eq ↔ o₁ = eq ∧ o₂ = eq 
goal: o₁.then o₂ = Ordering.eq ↔ o₁ = Ordering.eq ∧ o₂ = Ordering.eq

full_name: Ordering.then_eq_gt
code: theorem then_eq_gt {o₁ o₂ : Ordering} : o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt 
goal: o₁.then o₂ = Ordering.gt ↔ o₁ = Ordering.gt ∨ o₁ = Ordering.eq ∧ o₂ = Ordering.gt

full_name: Batteries.TotalBLE.total
code: /-- `TotalBLE le` asserts that `le` has a total order, that is, `le a b ∨ le b a`. -/
class TotalBLE (le : α → α → Bool) : Prop where
  /-- `le` is total: either `le a b` or `le b a`. -/
  total : le a b ∨ le b a
goal: le a b = true ∨ le b a = true

full_name: Batteries.TotalBLE
code: /-- `TotalBLE le` asserts that `le` has a total order, that is, `le a b ∨ le b a`. -/
class TotalBLE (le : α → α → Bool) : Prop where
  /-- `le` is total: either `le a b` or `le b a`. -/
  total : le a b ∨ le b a
goal: Prop

full_name: Batteries.OrientedCmp.symm
code: /-- `OrientedCmp cmp` asserts that `cmp` is determined by the relation `cmp x y = .lt`. -/
class OrientedCmp (cmp : α → α → Ordering) : Prop where
  /-- The comparator operation is symmetric, in the sense that if `cmp x y` equals `.lt` then
  `cmp y x = .gt` and vice versa. -/
  symm (x y) : (cmp x y).swap = cmp y x
goal: (cmp x y).swap = cmp y x

full_name: Batteries.OrientedCmp
code: /-- `OrientedCmp cmp` asserts that `cmp` is determined by the relation `cmp x y = .lt`. -/
class OrientedCmp (cmp : α → α → Ordering) : Prop where
  /-- The comparator operation is symmetric, in the sense that if `cmp x y` equals `.lt` then
  `cmp y x = .gt` and vice versa. -/
  symm (x y) : (cmp x y).swap = cmp y x
goal: Prop

full_name: Batteries.OrientedCmp.cmp_eq_gt
code: theorem cmp_eq_gt [OrientedCmp cmp] : cmp x y = .gt ↔ cmp y x = .lt 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α} [inst : Batteries.OrientedCmp cmp],
  cmp x y = Ordering.gt ↔ cmp y x = Ordering.lt

full_name: Batteries.OrientedCmp.cmp_ne_gt
code: theorem cmp_ne_gt [OrientedCmp cmp] : cmp x y ≠ .gt ↔ cmp y x ≠ .lt 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α} [inst : Batteries.OrientedCmp cmp],
  cmp x y ≠ Ordering.gt ↔ cmp y x ≠ Ordering.lt

full_name: Batteries.OrientedCmp.cmp_eq_eq_symm
code: theorem cmp_eq_eq_symm [OrientedCmp cmp] : cmp x y = .eq ↔ cmp y x = .eq 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α} [inst : Batteries.OrientedCmp cmp],
  cmp x y = Ordering.eq ↔ cmp y x = Ordering.eq

full_name: Batteries.OrientedCmp.cmp_refl
code: theorem cmp_refl [OrientedCmp cmp] : cmp x x = .eq 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} {x : α} [inst : Batteries.OrientedCmp cmp], cmp x x = Ordering.eq

full_name: Batteries.TransCmp
code: /-- `TransCmp cmp` asserts that `cmp` induces a transitive relation. -/
class TransCmp (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- The comparator operation is transitive. -/
  le_trans : cmp x y ≠ .gt → cmp y z ≠ .gt → cmp x z ≠ .gt
goal: Prop

full_name: Batteries.TransCmp.le_trans
code: /-- `TransCmp cmp` asserts that `cmp` induces a transitive relation. -/
class TransCmp (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- The comparator operation is transitive. -/
  le_trans : cmp x y ≠ .gt → cmp y z ≠ .gt → cmp x z ≠ .gt
goal: cmp x y ≠ Ordering.gt → cmp y z ≠ Ordering.gt → cmp x z ≠ Ordering.gt

full_name: Batteries.TransCmp.ge_trans
code: theorem ge_trans (h₁ : cmp x y ≠ .lt) (h₂ : cmp y z ≠ .lt) : cmp x z ≠ .lt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y ≠ Ordering.lt → cmp y z ≠ Ordering.lt → cmp x_1 z ≠ Ordering.lt

full_name: Batteries.TransCmp.lt_asymm
code: theorem lt_asymm (h : cmp x y = .lt) : cmp y x ≠ .lt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y : x},
  cmp x_1 y = Ordering.lt → cmp y x_1 ≠ Ordering.lt

full_name: Batteries.TransCmp.gt_asymm
code: theorem gt_asymm (h : cmp x y = .gt) : cmp y x ≠ .gt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y : x},
  cmp x_1 y = Ordering.gt → cmp y x_1 ≠ Ordering.gt

full_name: Batteries.TransCmp.le_lt_trans
code: theorem le_lt_trans (h₁ : cmp x y ≠ .gt) (h₂ : cmp y z = .lt) : cmp x z = .lt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y ≠ Ordering.gt → cmp y z = Ordering.lt → cmp x_1 z = Ordering.lt

full_name: Batteries.TransCmp.lt_le_trans
code: theorem lt_le_trans (h₁ : cmp x y = .lt) (h₂ : cmp y z ≠ .gt) : cmp x z = .lt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y = Ordering.lt → cmp y z ≠ Ordering.gt → cmp x_1 z = Ordering.lt

full_name: Batteries.TransCmp.lt_trans
code: theorem lt_trans (h₁ : cmp x y = .lt) (h₂ : cmp y z = .lt) : cmp x z = .lt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y = Ordering.lt → cmp y z = Ordering.lt → cmp x_1 z = Ordering.lt

full_name: Batteries.TransCmp.gt_trans
code: theorem gt_trans (h₁ : cmp x y = .gt) (h₂ : cmp y z = .gt) : cmp x z = .gt 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y = Ordering.gt → cmp y z = Ordering.gt → cmp x_1 z = Ordering.gt

full_name: Batteries.TransCmp.cmp_congr_left
code: theorem cmp_congr_left (xy : cmp x y = .eq) : cmp x z = cmp y z 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y = Ordering.eq → cmp x_1 z = cmp y z

full_name: Batteries.TransCmp.cmp_congr_left'
code: theorem cmp_congr_left' (xy : cmp x y = .eq) : cmp x = cmp y 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y : x},
  cmp x_1 y = Ordering.eq → cmp x_1 = cmp y

full_name: Batteries.TransCmp.cmp_congr_right
code: theorem cmp_congr_right (yz : cmp y z = .eq) : cmp x y = cmp x z 
goal: ∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {y z x : x},
  cmp y z = Ordering.eq → cmp x y = cmp x z

full_name: Batteries.instOrientedCmpFlipOrdering
code: instance [inst : OrientedCmp cmp] : OrientedCmp (flip cmp) 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} [inst : Batteries.OrientedCmp cmp], Batteries.OrientedCmp (flip cmp)

full_name: Batteries.instTransCmpFlipOrdering
code: instance [inst : TransCmp cmp] : TransCmp (flip cmp) 
goal: ∀ {α : Sort u_1} {cmp : α → α → Ordering} [inst : Batteries.TransCmp cmp], Batteries.TransCmp (flip cmp)

full_name: Batteries.BEqCmp
code: /-- `BEqCmp cmp` asserts that `cmp x y = .eq` and `x == y` coincide. -/
class BEqCmp [BEq α] (cmp : α → α → Ordering) : Prop where
  /-- `cmp x y = .eq` holds iff `x == y` is true. -/
  cmp_iff_beq : cmp x y = .eq ↔ x == y
goal: Prop

full_name: Batteries.BEqCmp.cmp_iff_beq
code: /-- `BEqCmp cmp` asserts that `cmp x y = .eq` and `x == y` coincide. -/
class BEqCmp [BEq α] (cmp : α → α → Ordering) : Prop where
  /-- `cmp x y = .eq` holds iff `x == y` is true. -/
  cmp_iff_beq : cmp x y = .eq ↔ x == y
goal: cmp x y = Ordering.eq ↔ (x == y) = true

full_name: Batteries.BEqCmp.cmp_iff_eq
code: theorem BEqCmp.cmp_iff_eq [BEq α] [LawfulBEq α] [BEqCmp (α := α) cmp] : cmp x y = .eq ↔ x = y 
goal: cmp x y = Ordering.eq ↔ x = y

full_name: Batteries.LTCmp
code: /-- `LTCmp cmp` asserts that `cmp x y = .lt` and `x < y` coincide. -/
class LTCmp [LT α] (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- `cmp x y = .lt` holds iff `x < y` is true. -/
  cmp_iff_lt : cmp x y = .lt ↔ x < y
goal: Prop

full_name: Batteries.LTCmp.cmp_iff_lt
code: /-- `LTCmp cmp` asserts that `cmp x y = .lt` and `x < y` coincide. -/
class LTCmp [LT α] (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- `cmp x y = .lt` holds iff `x < y` is true. -/
  cmp_iff_lt : cmp x y = .lt ↔ x < y
goal: cmp x y = Ordering.lt ↔ x < y

full_name: Batteries.LTCmp.cmp_iff_gt
code: theorem LTCmp.cmp_iff_gt [LT α] [LTCmp (α := α) cmp] : cmp x y = .gt ↔ y < x 
goal: cmp x y = Ordering.gt ↔ y < x

full_name: Batteries.LECmp
code: /-- `LECmp cmp` asserts that `cmp x y ≠ .gt` and `x ≤ y` coincide. -/
class LECmp [LE α] (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- `cmp x y ≠ .gt` holds iff `x ≤ y` is true. -/
  cmp_iff_le : cmp x y ≠ .gt ↔ x ≤ y
goal: Prop

full_name: Batteries.LECmp.cmp_iff_le
code: /-- `LECmp cmp` asserts that `cmp x y ≠ .gt` and `x ≤ y` coincide. -/
class LECmp [LE α] (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- `cmp x y ≠ .gt` holds iff `x ≤ y` is true. -/
  cmp_iff_le : cmp x y ≠ .gt ↔ x ≤ y
goal: cmp x y ≠ Ordering.gt ↔ x ≤ y

full_name: Batteries.LECmp.cmp_iff_ge
code: theorem LECmp.cmp_iff_ge [LE α] [LECmp (α := α) cmp] : cmp x y ≠ .lt ↔ y ≤ x 
goal: cmp x y ≠ Ordering.lt ↔ y ≤ x

full_name: Batteries.LawfulCmp
code: /-- `LawfulCmp cmp` asserts that the `LE`, `LT`, `BEq` instances are all coherent with each other
and with `cmp`, describing a strict weak order (a linear order except for antisymmetry). -/
class LawfulCmp [LE α] [LT α] [BEq α] (cmp : α → α → Ordering) extends
  TransCmp cmp, BEqCmp cmp, LTCmp cmp, LECmp cmp : Prop
goal: Prop

full_name: Batteries.OrientedOrd
code: /-- `OrientedOrd α` asserts that the `Ord` instance satisfies `OrientedCmp`. -/
abbrev OrientedOrd (α) [Ord α] 
goal: Prop

full_name: Batteries.TransOrd
code: /-- `TransOrd α` asserts that the `Ord` instance satisfies `TransCmp`. -/
abbrev TransOrd (α) [Ord α] 
goal: Prop

full_name: Batteries.BEqOrd
code: /-- `BEqOrd α` asserts that the `Ord` and `BEq` instances are coherent via `BEqCmp`. -/
abbrev BEqOrd (α) [BEq α] [Ord α] 
goal: Prop

full_name: Batteries.LTOrd
code: /-- `LTOrd α` asserts that the `Ord` instance satisfies `LTCmp`. -/
abbrev LTOrd (α) [LT α] [Ord α] 
goal: Prop

full_name: Batteries.LEOrd
code: /-- `LEOrd α` asserts that the `Ord` instance satisfies `LECmp`. -/
abbrev LEOrd (α) [LE α] [Ord α] 
goal: Prop

full_name: Batteries.LawfulOrd
code: /-- `LawfulOrd α` asserts that the `Ord` instance satisfies `LawfulCmp`. -/
abbrev LawfulOrd (α) [LE α] [LT α] [BEq α] [Ord α] 
goal: Prop

full_name: Batteries.compareOfLessAndEq_eq_lt
code: theorem compareOfLessAndEq_eq_lt {x y : α} [LT α] [Decidable (x < y)] [DecidableEq α] :
    compareOfLessAndEq x y = .lt ↔ x < y 
goal: compareOfLessAndEq x y = Ordering.lt ↔ x < y

full_name: Batteries.TransCmp.compareOfLessAndEq
code: protected theorem TransCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (lt_antisymm : ∀ {x y : α}, ¬x < y → ¬y < x → x = y) :
    TransCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.TransCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.TransCmp.compareOfLessAndEq_of_le
code: protected theorem TransCmp.compareOfLessAndEq_of_le
    [LT α] [LE α] [DecidableRel (LT.lt (α := α))] [DecidableEq α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y → y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    TransCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.TransCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.BEqCmp.compareOfLessAndEq
code: protected theorem BEqCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [BEq α] [LawfulBEq α]
    (lt_irrefl : ∀ x : α, ¬x < x) :
    BEqCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.BEqCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.LTCmp.compareOfLessAndEq
code: protected theorem LTCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (lt_antisymm : ∀ {x y : α}, ¬x < y → ¬y < x → x = y) :
    LTCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.LTCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.LTCmp.compareOfLessAndEq_of_le
code: protected theorem LTCmp.compareOfLessAndEq_of_le
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [LE α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y → y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    LTCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.LTCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.LECmp.compareOfLessAndEq
code: protected theorem LECmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [LE α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y ↔ y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    LECmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.LECmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.LawfulCmp.compareOfLessAndEq
code: protected theorem LawfulCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [BEq α] [LawfulBEq α] [LE α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y ↔ y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    LawfulCmp (α := α) (compareOfLessAndEq · ·) 
goal: Batteries.LawfulCmp fun x x_1 => compareOfLessAndEq x x_1

full_name: Batteries.LTCmp.eq_compareOfLessAndEq
code: theorem LTCmp.eq_compareOfLessAndEq
    [LT α] [DecidableEq α] [BEq α] [LawfulBEq α] [BEqCmp cmp] [LTCmp cmp]
    (x y : α) [Decidable (x < y)] : cmp x y = compareOfLessAndEq x y 
goal: cmp x y = compareOfLessAndEq x y

full_name: Batteries.instOrientedCmpCompareLex
code: instance [inst₁ : OrientedCmp cmp₁] [inst₂ : OrientedCmp cmp₂] :
    OrientedCmp (compareLex cmp₁ cmp₂) 
goal: ∀ {α : Sort u_1} {cmp₁ cmp₂ : α → α → Ordering} [inst₁ : Batteries.OrientedCmp cmp₁]
  [inst₂ : Batteries.OrientedCmp cmp₂], Batteries.OrientedCmp (compareLex cmp₁ cmp₂)

full_name: Batteries.instTransCmpCompareLex
code: instance [inst₁ : TransCmp cmp₁] [inst₂ : TransCmp cmp₂] :
    TransCmp (compareLex cmp₁ cmp₂) 
goal: ∀ {α : Sort u_1} {cmp₁ cmp₂ : α → α → Ordering} [inst₁ : Batteries.TransCmp cmp₁] [inst₂ : Batteries.TransCmp cmp₂],
  Batteries.TransCmp (compareLex cmp₁ cmp₂)

full_name: Batteries.instOrientedCmpCompareOnOfOrientedOrd
code: instance [Ord β] [OrientedOrd β] (f : α → β) : OrientedCmp (compareOn f) 
goal: Batteries.OrientedCmp (compareOn f)

full_name: Batteries.instTransCmpCompareOnOfTransOrd
code: instance [Ord β] [TransOrd β] (f : α → β) : TransCmp (compareOn f) 
goal: Batteries.TransCmp (compareOn f)

full_name: lexOrd_def
code: theorem _root_.lexOrd_def [Ord α] [Ord β] :
    (lexOrd : Ord (α × β)).compare = compareLex (compareOn (·.1)) (compareOn (·.2)) 
goal: compare = compareLex (compareOn fun x => x.fst) (compareOn fun x => x.snd)

full_name: Batteries.OrientedOrd.instLexOrd
code: /-- Local instance for `OrientedOrd lexOrd`. -/
theorem OrientedOrd.instLexOrd [Ord α] [Ord β]
    [OrientedOrd α] [OrientedOrd β] : @OrientedOrd (α × β) lexOrd 
goal: Batteries.OrientedOrd (α × β)

full_name: Batteries.TransOrd.instLexOrd
code: /-- Local instance for `TransOrd lexOrd`. -/
theorem TransOrd.instLexOrd [Ord α] [Ord β]
    [TransOrd α] [TransOrd β] : @TransOrd (α × β) lexOrd 
goal: Batteries.TransOrd (α × β)

full_name: Batteries.OrientedOrd.instOpposite
code: /-- Local instance for `OrientedOrd ord.opposite`. -/
theorem OrientedOrd.instOpposite [ord : Ord α] [inst : OrientedOrd α] :
    @OrientedOrd _ ord.opposite 
goal: Batteries.OrientedOrd α

full_name: Batteries.TransOrd.instOpposite
code: /-- Local instance for `TransOrd ord.opposite`. -/
theorem TransOrd.instOpposite [ord : Ord α] [inst : TransOrd α] : @TransOrd _ ord.opposite 
goal: Batteries.TransOrd α

full_name: Batteries.OrientedOrd.instOn
code: /-- Local instance for `OrientedOrd (ord.on f)`. -/
theorem OrientedOrd.instOn [ord : Ord β] [OrientedOrd β] (f : α → β) : @OrientedOrd _ (ord.on f) 
goal: Batteries.OrientedOrd α

full_name: Batteries.TransOrd.instOn
code: /-- Local instance for `TransOrd (ord.on f)`. -/
theorem TransOrd.instOn [ord : Ord β] [TransOrd β] (f : α → β) : @TransOrd _ (ord.on f) 
goal: Batteries.TransOrd α

full_name: Batteries.OrientedOrd.instOrdLex
code: /-- Local instance for `OrientedOrd (oα.lex oβ)`. -/
theorem OrientedOrd.instOrdLex [oα : Ord α] [oβ : Ord β] [OrientedOrd α] [OrientedOrd β] :
    @OrientedOrd _ (oα.lex oβ) 
goal: Batteries.OrientedOrd (α × β)

full_name: Batteries.TransOrd.instOrdLex
code: /-- Local instance for `TransOrd (oα.lex oβ)`. -/
theorem TransOrd.instOrdLex [oα : Ord α] [oβ : Ord β] [TransOrd α] [TransOrd β] :
    @TransOrd _ (oα.lex oβ) 
goal: Batteries.TransOrd (α × β)

full_name: Batteries.OrientedOrd.instOrdLex'
code: /-- Local instance for `OrientedOrd (oα.lex' oβ)`. -/
theorem OrientedOrd.instOrdLex' (ord₁ ord₂ : Ord α) [@OrientedOrd _ ord₁] [@OrientedOrd _ ord₂] :
    @OrientedOrd _ (ord₁.lex' ord₂) 
goal: Batteries.OrientedOrd α

full_name: Batteries.TransOrd.instOrdLex'
code: /-- Local instance for `TransOrd (oα.lex' oβ)`. -/
theorem TransOrd.instOrdLex' (ord₁ ord₂ : Ord α) [@TransOrd _ ord₁] [@TransOrd _ ord₂] :
    @TransOrd _ (ord₁.lex' ord₂) 
goal: Batteries.TransOrd α

full_name: Batteries.instLawfulOrdNat
code: instance : LawfulOrd Nat 
goal: Batteries.LawfulOrd Nat

full_name: Batteries.instLawfulOrdFin
code: instance : LawfulOrd (Fin n) 
goal: Batteries.LawfulOrd (Fin n)

full_name: Batteries.instLawfulOrdBool
code: instance : LawfulOrd Bool 
goal: Batteries.LawfulOrd Bool

full_name: Batteries.instLawfulOrdInt
code: instance : LawfulOrd Int 
goal: Batteries.LawfulOrd Int

full_name: Ordering.byKey
code: /-- Pull back a comparator by a function `f`, by applying the comparator to both arguments. -/
@[inline] def byKey (f : α → β) (cmp : β → β → Ordering) (a b : α) : Ordering 
goal: Ordering

full_name: Ordering.instOrientedCmpByKey
code: instance (f : α → β) (cmp : β → β → Ordering) [OrientedCmp cmp] : OrientedCmp (byKey f cmp) 
goal: Batteries.OrientedCmp (Ordering.byKey f cmp)

full_name: Ordering.instTransCmpByKey
code: instance (f : α → β) (cmp : β → β → Ordering) [TransCmp cmp] : TransCmp (byKey f cmp) 
goal: Batteries.TransCmp (Ordering.byKey f cmp)