File: Mathlib/Order/Defs.lean

full_name: Preorder.le_refl
code: /-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
class Preorder (α : Type u) extends LE α, LT α where
  le_refl : ∀ a : α, a ≤ a
  le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
  lt := fun a b => a ≤ b ∧ ¬b ≤ a
  lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
goal: a ≤ a

full_name: Preorder.lt_iff_le_not_le
code: /-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
class Preorder (α : Type u) extends LE α, LT α where
  le_refl : ∀ a : α, a ≤ a
  le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
  lt := fun a b => a ≤ b ∧ ¬b ≤ a
  lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
goal: a < b ↔ a ≤ b ∧ ¬b ≤ a

full_name: Preorder.le_trans
code: /-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
class Preorder (α : Type u) extends LE α, LT α where
  le_refl : ∀ a : α, a ≤ a
  le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
  lt := fun a b => a ≤ b ∧ ¬b ≤ a
  lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
goal: a ≤ b → b ≤ c → a ≤ c

full_name: Preorder
code: /-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
class Preorder (α : Type u) extends LE α, LT α where
  le_refl : ∀ a : α, a ≤ a
  le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
  lt := fun a b => a ≤ b ∧ ¬b ≤ a
  lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
goal: Type u

full_name: le_refl
code: /-- The relation `≤` on a preorder is reflexive. -/
@[refl]
theorem le_refl : ∀ a : α, a ≤ a 
goal: a ≤ a

full_name: le_rfl
code: /-- A version of `le_refl` where the argument is implicit -/
theorem le_rfl {a : α} : a ≤ a 
goal: a ≤ a

full_name: le_trans
code: /-- The relation `≤` on a preorder is transitive. -/
@[trans]
theorem le_trans : ∀ {a b c : α}, a ≤ b → b ≤ c → a ≤ c 
goal: a ≤ b → b ≤ c → a ≤ c

full_name: lt_iff_le_not_le
code: theorem lt_iff_le_not_le : ∀ {a b : α}, a < b ↔ a ≤ b ∧ ¬b ≤ a 
goal: a < b ↔ a ≤ b ∧ ¬b ≤ a

full_name: lt_of_le_not_le
code: theorem lt_of_le_not_le : ∀ {a b : α}, a ≤ b → ¬b ≤ a → a < b
  
goal: a ≤ b → ¬b ≤ a → a < b

full_name: le_not_le_of_lt
code: theorem le_not_le_of_lt : ∀ {a b : α}, a < b → a ≤ b ∧ ¬b ≤ a
  
goal: a < b → a ≤ b ∧ ¬b ≤ a

full_name: le_of_eq
code: theorem le_of_eq {a b : α} : a = b → a ≤ b 
goal: a = b → a ≤ b

full_name: ge_trans
code: @[trans]
theorem ge_trans : ∀ {a b c : α}, a ≥ b → b ≥ c → a ≥ c 
goal: a ≥ b → b ≥ c → a ≥ c

full_name: lt_irrefl
code: theorem lt_irrefl : ∀ a : α, ¬a < a
  
goal: ¬a < a

full_name: gt_irrefl
code: theorem gt_irrefl : ∀ a : α, ¬a > a 
goal: ¬a > a

full_name: lt_trans
code: @[trans]
theorem lt_trans : ∀ {a b c : α}, a < b → b < c → a < c
  
goal: a < b → b < c → a < c

full_name: gt_trans
code: @[trans]
theorem gt_trans : ∀ {a b c : α}, a > b → b > c → a > c 
goal: a > b → b > c → a > c

full_name: ne_of_lt
code: theorem ne_of_lt {a b : α} (h : a < b) : a ≠ b 
goal: a ≠ b

full_name: ne_of_gt
code: theorem ne_of_gt {a b : α} (h : b < a) : a ≠ b 
goal: a ≠ b

full_name: lt_asymm
code: theorem lt_asymm {a b : α} (h : a < b) : ¬b < a 
goal: ¬b < a

full_name: le_of_lt
code: theorem le_of_lt : ∀ {a b : α}, a < b → a ≤ b
  
goal: a < b → a ≤ b

full_name: lt_of_lt_of_le
code: @[trans]
theorem lt_of_lt_of_le : ∀ {a b c : α}, a < b → b ≤ c → a < c
  
goal: a < b → b ≤ c → a < c

full_name: lt_of_le_of_lt
code: @[trans]
theorem lt_of_le_of_lt : ∀ {a b c : α}, a ≤ b → b < c → a < c
  
goal: a ≤ b → b < c → a < c

full_name: gt_of_gt_of_ge
code: @[trans]
theorem gt_of_gt_of_ge {a b c : α} (h₁ : a > b) (h₂ : b ≥ c) : a > c 
goal: a > c

full_name: gt_of_ge_of_gt
code: @[trans]
theorem gt_of_ge_of_gt {a b c : α} (h₁ : a ≥ b) (h₂ : b > c) : a > c 
goal: a > c

full_name: instTransLe_mathlib
code: instance (priority := 900) : @Trans α α α LE.le LE.le LE.le 
goal: Trans LE.le LE.le LE.le

full_name: instTransLt_mathlib
code: instance (priority := 900) : @Trans α α α LT.lt LT.lt LT.lt 
goal: Trans LT.lt LT.lt LT.lt

full_name: instTransLtLe_mathlib
code: instance (priority := 900) : @Trans α α α LT.lt LE.le LT.lt 
goal: Trans LT.lt LE.le LT.lt

full_name: instTransLeLt_mathlib
code: instance (priority := 900) : @Trans α α α LE.le LT.lt LT.lt 
goal: Trans LE.le LT.lt LT.lt

full_name: instTransGe_mathlib
code: instance (priority := 900) : @Trans α α α GE.ge GE.ge GE.ge 
goal: Trans GE.ge GE.ge GE.ge

full_name: instTransGt_mathlib
code: instance (priority := 900) : @Trans α α α GT.gt GT.gt GT.gt 
goal: Trans GT.gt GT.gt GT.gt

full_name: instTransGtGe_mathlib
code: instance (priority := 900) : @Trans α α α GT.gt GE.ge GT.gt 
goal: Trans GT.gt GE.ge GT.gt

full_name: instTransGeGt_mathlib
code: instance (priority := 900) : @Trans α α α GE.ge GT.gt GT.gt 
goal: Trans GE.ge GT.gt GT.gt

full_name: not_le_of_gt
code: theorem not_le_of_gt {a b : α} (h : a > b) : ¬a ≤ b 
goal: ¬a ≤ b

full_name: not_lt_of_ge
code: theorem not_lt_of_ge {a b : α} (h : a ≥ b) : ¬a < b 
goal: ¬a < b

full_name: le_of_lt_or_eq
code: theorem le_of_lt_or_eq : ∀ {a b : α}, a < b ∨ a = b → a ≤ b
  
goal: a < b ∨ a = b → a ≤ b

full_name: le_of_eq_or_lt
code: theorem le_of_eq_or_lt {a b : α} (h : a = b ∨ a < b) : a ≤ b 
goal: a ≤ b

full_name: decidableLTOfDecidableLE
code: /-- `<` is decidable if `≤` is. -/
def decidableLTOfDecidableLE [@DecidableRel α (· ≤ ·)] : @DecidableRel α (· < ·)
  
goal: DecidableRel fun x x_1 => x < x_1

full_name: PartialOrder
code: /-- A partial order is a reflexive, transitive, antisymmetric relation `≤`. -/
class PartialOrder (α : Type u) extends Preorder α where
  le_antisymm : ∀ a b : α, a ≤ b → b ≤ a → a = b
goal: Type u

full_name: PartialOrder.le_antisymm
code: /-- A partial order is a reflexive, transitive, antisymmetric relation `≤`. -/
class PartialOrder (α : Type u) extends Preorder α where
  le_antisymm : ∀ a b : α, a ≤ b → b ≤ a → a = b
goal: a ≤ b → b ≤ a → a = b

full_name: le_antisymm
code: theorem le_antisymm : ∀ {a b : α}, a ≤ b → b ≤ a → a = b 
goal: a ≤ b → b ≤ a → a = b

full_name: le_antisymm_iff
code: theorem le_antisymm_iff {a b : α} : a = b ↔ a ≤ b ∧ b ≤ a 
goal: a = b ↔ a ≤ b ∧ b ≤ a

full_name: lt_of_le_of_ne
code: theorem lt_of_le_of_ne {a b : α} : a ≤ b → a ≠ b → a < b 
goal: a ≤ b → a ≠ b → a < b

full_name: decidableEqOfDecidableLE
code: /-- Equality is decidable if `≤` is. -/
def decidableEqOfDecidableLE [@DecidableRel α (· ≤ ·)] : DecidableEq α
  
goal: DecidableEq α

full_name: Decidable.lt_or_eq_of_le
code: theorem lt_or_eq_of_le {a b : α} (hab : a ≤ b) : a < b ∨ a = b 
goal: a < b ∨ a = b

full_name: Decidable.eq_or_lt_of_le
code: theorem eq_or_lt_of_le {a b : α} (hab : a ≤ b) : a = b ∨ a < b 
goal: a = b ∨ a < b

full_name: Decidable.le_iff_lt_or_eq
code: theorem le_iff_lt_or_eq {a b : α} : a ≤ b ↔ a < b ∨ a = b 
goal: a ≤ b ↔ a < b ∨ a = b

full_name: lt_or_eq_of_le
code: theorem lt_or_eq_of_le {a b : α} : a ≤ b → a < b ∨ a = b 
goal: a ≤ b → a < b ∨ a = b

full_name: le_iff_lt_or_eq
code: theorem le_iff_lt_or_eq {a b : α} : a ≤ b ↔ a < b ∨ a = b 
goal: a ≤ b ↔ a < b ∨ a = b

full_name: maxDefault
code: /-- Default definition of `max`. -/
def maxDefault {α : Type u} [LE α] [DecidableRel ((· ≤ ·) : α → α → Prop)] (a b : α) 
goal: α

full_name: minDefault
code: /-- Default definition of `min`. -/
def minDefault {α : Type u} [LE α] [DecidableRel ((· ≤ ·) : α → α → Prop)] (a b : α) 
goal: α

full_name: tacticCompareOfLessAndEq_rfl
code: macro "compareOfLessAndEq_rfl" : tactic =>
  `(tactic| (intros a b; first | rfl |
    (simp only [compare, compareOfLessAndEq]; split_ifs <;> rfl) |
    (induction a <;> induction b <;> simp (config := {decide := true}) only [])))
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Order_Defs___macroRules_tacticCompareOfLessAndEq_rfl_1
code: macro "compareOfLessAndEq_rfl" : tactic =>
  `(tactic| (intros a b; first | rfl |
    (simp only [compare, compareOfLessAndEq]; split_ifs <;> rfl) |
    (induction a <;> induction b <;> simp (config := {decide := true}) only [])))
goal: Lean.Macro

full_name: LinearOrder.min_def
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: min a b = if a ≤ b then a else b

full_name: LinearOrder.le_total
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: a ≤ b ∨ b ≤ a

full_name: LinearOrder.decidableLT
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: DecidableRel fun x x_1 => x < x_1

full_name: LinearOrder.max_def
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: max a b = if a ≤ b then b else a

full_name: LinearOrder.decidableLE
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: DecidableRel fun x x_1 => x ≤ x_1

full_name: LinearOrder
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: Type u

full_name: LinearOrder.decidableEq
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: DecidableEq α

full_name: LinearOrder.compare_eq_compareOfLessAndEq
code: /-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl
goal: compare a b = compareOfLessAndEq a b

full_name: le_total
code: theorem le_total : ∀ a b : α, a ≤ b ∨ b ≤ a 
goal: a ≤ b ∨ b ≤ a

full_name: le_of_not_ge
code: theorem le_of_not_ge {a b : α} : ¬a ≥ b → a ≤ b 
goal: ¬a ≥ b → a ≤ b

full_name: le_of_not_le
code: theorem le_of_not_le {a b : α} : ¬a ≤ b → b ≤ a 
goal: ¬a ≤ b → b ≤ a

full_name: not_lt_of_gt
code: theorem not_lt_of_gt {a b : α} (h : a > b) : ¬a < b 
goal: ¬a < b

full_name: lt_trichotomy
code: theorem lt_trichotomy (a b : α) : a < b ∨ a = b ∨ b < a 
goal: a < b ∨ a = b ∨ b < a

full_name: le_of_not_lt
code: theorem le_of_not_lt {a b : α} (h : ¬b < a) : a ≤ b 
goal: a ≤ b

full_name: le_of_not_gt
code: theorem le_of_not_gt {a b : α} : ¬a > b → a ≤ b 
goal: ¬a > b → a ≤ b

full_name: lt_of_not_ge
code: theorem lt_of_not_ge {a b : α} (h : ¬a ≥ b) : a < b 
goal: a < b

full_name: lt_or_le
code: theorem lt_or_le (a b : α) : a < b ∨ b ≤ a 
goal: a < b ∨ b ≤ a

full_name: le_or_lt
code: theorem le_or_lt (a b : α) : a ≤ b ∨ b < a 
goal: a ≤ b ∨ b < a

full_name: lt_or_ge
code: theorem lt_or_ge : ∀ a b : α, a < b ∨ a ≥ b 
goal: a < b ∨ a ≥ b

full_name: le_or_gt
code: theorem le_or_gt : ∀ a b : α, a ≤ b ∨ a > b 
goal: a ≤ b ∨ a > b

full_name: lt_or_gt_of_ne
code: theorem lt_or_gt_of_ne {a b : α} (h : a ≠ b) : a < b ∨ a > b 
goal: a < b ∨ a > b

full_name: ne_iff_lt_or_gt
code: theorem ne_iff_lt_or_gt {a b : α} : a ≠ b ↔ a < b ∨ a > b 
goal: a ≠ b ↔ a < b ∨ a > b

full_name: lt_iff_not_ge
code: theorem lt_iff_not_ge (x y : α) : x < y ↔ ¬x ≥ y 
goal: x < y ↔ ¬x ≥ y

full_name: not_lt
code: @[simp]
theorem not_lt {a b : α} : ¬a < b ↔ b ≤ a 
goal: ¬a < b ↔ b ≤ a

full_name: not_le
code: @[simp]
theorem not_le {a b : α} : ¬a ≤ b ↔ b < a 
goal: ¬a ≤ b ↔ b < a

full_name: instDecidableLt_mathlib
code: instance (priority := 900) (a b : α) : Decidable (a < b) 
goal: Decidable (a < b)

full_name: instDecidableLe_mathlib
code: instance (priority := 900) (a b : α) : Decidable (a ≤ b) 
goal: Decidable (a ≤ b)

full_name: instDecidableEq_mathlib
code: instance (priority := 900) (a b : α) : Decidable (a = b) 
goal: Decidable (a = b)

full_name: eq_or_lt_of_not_lt
code: theorem eq_or_lt_of_not_lt {a b : α} (h : ¬a < b) : a = b ∨ b < a 
goal: a = b ∨ b < a

full_name: instIsTotalPreorderLe
code: instance : IsTotalPreorder α (· ≤ ·) 
goal: IsTotalPreorder α fun x x_1 => x ≤ x_1

full_name: isStrictWeakOrder_of_linearOrder
code: instance isStrictWeakOrder_of_linearOrder : IsStrictWeakOrder α (· < ·) 
goal: IsStrictWeakOrder α fun x x_1 => x < x_1

full_name: isStrictTotalOrder_of_linearOrder
code: instance isStrictTotalOrder_of_linearOrder : IsStrictTotalOrder α (· < ·) 
goal: IsStrictTotalOrder α fun x x_1 => x < x_1

full_name: ltByCases
code: /-- Perform a case-split on the ordering of `x` and `y` in a decidable linear order. -/
def ltByCases (x y : α) {P : Sort*} (h₁ : x < y → P) (h₂ : x = y → P) (h₃ : y < x → P) : P 
goal: P

full_name: le_imp_le_of_lt_imp_lt
code: theorem le_imp_le_of_lt_imp_lt {β} [Preorder α] [LinearOrder β] {a b : α} {c d : β}
    (H : d < c → b < a) (h : a ≤ b) : c ≤ d 
goal: c ≤ d

full_name: compare_lt_iff_lt
code: theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b 
goal: compare a b = Ordering.lt ↔ a < b

full_name: compare_gt_iff_gt
code: theorem compare_gt_iff_gt {a b : α} : (compare a b = .gt) ↔ a > b 
goal: compare a b = Ordering.gt ↔ a > b

full_name: compare_eq_iff_eq
code: theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b 
goal: compare a b = Ordering.eq ↔ a = b

full_name: compare_le_iff_le
code: theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b 
goal: compare a b ≠ Ordering.gt ↔ a ≤ b

full_name: compare_ge_iff_ge
code: theorem compare_ge_iff_ge {a b : α} : (compare a b ≠ .lt) ↔ a ≥ b 
goal: compare a b ≠ Ordering.lt ↔ a ≥ b

full_name: compare_iff
code: theorem compare_iff (a b : α) {o : Ordering} : compare a b = o ↔ o.toRel a b 
goal: compare a b = o ↔ o.toRel a b

full_name: instTransCmpCompare_mathlib
code: instance : Batteries.TransCmp (compare (α := α)) 
goal: Batteries.TransCmp compare