File: Mathlib/Order/Grade.lean

full_name: GradeOrder
code: /-- An `𝕆`-graded order is an order `α` equipped with a strictly monotone function
`grade 𝕆 : α → 𝕆` which preserves order covering (`CovBy`). -/
class GradeOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] where
  /-- The grading function. -/
  protected grade : α → 𝕆
  /-- `grade` is strictly monotonic. -/
  grade_strictMono : StrictMono grade
  /-- `grade` preserves `CovBy`. -/
  covBy_grade ⦃a b : α⦄ : a ⋖ b → grade a ⋖ grade b
goal: Type (max u_5 u_6)

full_name: GradeOrder.covBy_grade
code: /-- An `𝕆`-graded order is an order `α` equipped with a strictly monotone function
`grade 𝕆 : α → 𝕆` which preserves order covering (`CovBy`). -/
class GradeOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] where
  /-- The grading function. -/
  protected grade : α → 𝕆
  /-- `grade` is strictly monotonic. -/
  grade_strictMono : StrictMono grade
  /-- `grade` preserves `CovBy`. -/
  covBy_grade ⦃a b : α⦄ : a ⋖ b → grade a ⋖ grade b
goal: a ⋖ b → GradeOrder.grade a ⋖ GradeOrder.grade b

full_name: GradeOrder.grade
code: /-- An `𝕆`-graded order is an order `α` equipped with a strictly monotone function
`grade 𝕆 : α → 𝕆` which preserves order covering (`CovBy`). -/
class GradeOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] where
  /-- The grading function. -/
  protected grade : α → 𝕆
  /-- `grade` is strictly monotonic. -/
  grade_strictMono : StrictMono grade
  /-- `grade` preserves `CovBy`. -/
  covBy_grade ⦃a b : α⦄ : a ⋖ b → grade a ⋖ grade b
goal: α → 𝕆

full_name: GradeOrder.grade_strictMono
code: /-- An `𝕆`-graded order is an order `α` equipped with a strictly monotone function
`grade 𝕆 : α → 𝕆` which preserves order covering (`CovBy`). -/
class GradeOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] where
  /-- The grading function. -/
  protected grade : α → 𝕆
  /-- `grade` is strictly monotonic. -/
  grade_strictMono : StrictMono grade
  /-- `grade` preserves `CovBy`. -/
  covBy_grade ⦃a b : α⦄ : a ⋖ b → grade a ⋖ grade b
goal: StrictMono GradeOrder.grade

full_name: GradeMinOrder.isMin_grade
code: /-- An `𝕆`-graded order where minimal elements have minimal grades. -/
class GradeMinOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] extends GradeOrder 𝕆 α where
  /-- Minimal elements have minimal grades. -/
  isMin_grade ⦃a : α⦄ : IsMin a → IsMin (grade a)
goal: IsMin a → IsMin (GradeOrder.grade a)

full_name: GradeMinOrder
code: /-- An `𝕆`-graded order where minimal elements have minimal grades. -/
class GradeMinOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] extends GradeOrder 𝕆 α where
  /-- Minimal elements have minimal grades. -/
  isMin_grade ⦃a : α⦄ : IsMin a → IsMin (grade a)
goal: Type (max u_5 u_6)

full_name: GradeMaxOrder
code: /-- An `𝕆`-graded order where maximal elements have maximal grades. -/
class GradeMaxOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] extends GradeOrder 𝕆 α where
  /-- Maximal elements have maximal grades. -/
  isMax_grade ⦃a : α⦄ : IsMax a → IsMax (grade a)
goal: Type (max u_5 u_6)

full_name: GradeMaxOrder.isMax_grade
code: /-- An `𝕆`-graded order where maximal elements have maximal grades. -/
class GradeMaxOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] extends GradeOrder 𝕆 α where
  /-- Maximal elements have maximal grades. -/
  isMax_grade ⦃a : α⦄ : IsMax a → IsMax (grade a)
goal: IsMax a → IsMax (GradeOrder.grade a)

full_name: GradeBoundedOrder
code: /-- An `𝕆`-graded order where minimal elements have minimal grades and maximal elements have maximal
grades. -/
class GradeBoundedOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] extends GradeMinOrder 𝕆 α,
  GradeMaxOrder 𝕆 α
goal: Type (max u_5 u_6)

full_name: grade
code: /-- The grade of an element in a graded order. Morally, this is the number of elements you need to
go down by to get to `⊥`. -/
def grade : α → 𝕆 
goal: α → 𝕆

full_name: CovBy.grade
code: protected theorem CovBy.grade (h : a ⋖ b) : grade 𝕆 a ⋖ grade 𝕆 b 
goal: grade 𝕆 a ⋖ grade 𝕆 b

full_name: grade_strictMono
code: theorem grade_strictMono : StrictMono (grade 𝕆 : α → 𝕆) 
goal: StrictMono (grade 𝕆)

full_name: covBy_iff_lt_covBy_grade
code: theorem covBy_iff_lt_covBy_grade : a ⋖ b ↔ a < b ∧ grade 𝕆 a ⋖ grade 𝕆 b 
goal: a ⋖ b ↔ a < b ∧ grade 𝕆 a ⋖ grade 𝕆 b

full_name: IsMin.grade
code: protected theorem IsMin.grade (h : IsMin a) : IsMin (grade 𝕆 a) 
goal: IsMin (grade 𝕆 a)

full_name: isMin_grade_iff
code: @[simp]
theorem isMin_grade_iff : IsMin (grade 𝕆 a) ↔ IsMin a 
goal: IsMin (grade 𝕆 a) ↔ IsMin a

full_name: IsMax.grade
code: protected theorem IsMax.grade (h : IsMax a) : IsMax (grade 𝕆 a) 
goal: IsMax (grade 𝕆 a)

full_name: isMax_grade_iff
code: @[simp]
theorem isMax_grade_iff : IsMax (grade 𝕆 a) ↔ IsMax a 
goal: IsMax (grade 𝕆 a) ↔ IsMax a

full_name: grade_mono
code: theorem grade_mono [PartialOrder α] [GradeOrder 𝕆 α] : Monotone (grade 𝕆 : α → 𝕆) 
goal: Monotone (grade 𝕆)

full_name: grade_injective
code: theorem grade_injective : Function.Injective (grade 𝕆 : α → 𝕆) 
goal: Function.Injective (grade 𝕆)

full_name: grade_le_grade_iff
code: @[simp]
theorem grade_le_grade_iff : grade 𝕆 a ≤ grade 𝕆 b ↔ a ≤ b 
goal: grade 𝕆 a ≤ grade 𝕆 b ↔ a ≤ b

full_name: grade_lt_grade_iff
code: @[simp]
theorem grade_lt_grade_iff : grade 𝕆 a < grade 𝕆 b ↔ a < b 
goal: grade 𝕆 a < grade 𝕆 b ↔ a < b

full_name: grade_eq_grade_iff
code: @[simp]
theorem grade_eq_grade_iff : grade 𝕆 a = grade 𝕆 b ↔ a = b 
goal: grade 𝕆 a = grade 𝕆 b ↔ a = b

full_name: grade_ne_grade_iff
code: theorem grade_ne_grade_iff : grade 𝕆 a ≠ grade 𝕆 b ↔ a ≠ b 
goal: grade 𝕆 a ≠ grade 𝕆 b ↔ a ≠ b

full_name: grade_covBy_grade_iff
code: theorem grade_covBy_grade_iff : grade 𝕆 a ⋖ grade 𝕆 b ↔ a ⋖ b 
goal: grade 𝕆 a ⋖ grade 𝕆 b ↔ a ⋖ b

full_name: grade_bot
code: @[simp]
theorem grade_bot [OrderBot 𝕆] [OrderBot α] [GradeMinOrder 𝕆 α] : grade 𝕆 (⊥ : α) = ⊥ 
goal: grade 𝕆 ⊥ = ⊥

full_name: grade_top
code: @[simp]
theorem grade_top [OrderTop 𝕆] [OrderTop α] [GradeMaxOrder 𝕆 α] : grade 𝕆 (⊤ : α) = ⊤ 
goal: grade 𝕆 ⊤ = ⊤

full_name: Preorder.toGradeBoundedOrder
code: instance Preorder.toGradeBoundedOrder : GradeBoundedOrder α α 
goal: GradeBoundedOrder α α

full_name: grade_self
code: @[simp]
theorem grade_self (a : α) : grade α a = a 
goal: grade α a = a

full_name: OrderDual.gradeOrder
code: instance OrderDual.gradeOrder [GradeOrder 𝕆 α] : GradeOrder 𝕆ᵒᵈ αᵒᵈ 
goal: GradeOrder 𝕆ᵒᵈ αᵒᵈ

full_name: OrderDual.gradeMinOrder
code: instance OrderDual.gradeMinOrder [GradeMaxOrder 𝕆 α] : GradeMinOrder 𝕆ᵒᵈ αᵒᵈ 
goal: GradeMinOrder 𝕆ᵒᵈ αᵒᵈ

full_name: OrderDual.gradeMaxOrder
code: instance OrderDual.gradeMaxOrder [GradeMinOrder 𝕆 α] : GradeMaxOrder 𝕆ᵒᵈ αᵒᵈ 
goal: GradeMaxOrder 𝕆ᵒᵈ αᵒᵈ

full_name: instGradeBoundedOrderOrderDual
code: instance [GradeBoundedOrder 𝕆 α] : GradeBoundedOrder 𝕆ᵒᵈ αᵒᵈ 
goal: GradeBoundedOrder 𝕆ᵒᵈ αᵒᵈ

full_name: grade_toDual
code: @[simp]
theorem grade_toDual [GradeOrder 𝕆 α] (a : α) : grade 𝕆ᵒᵈ (toDual a) = toDual (grade 𝕆 a) 
goal: grade 𝕆ᵒᵈ (OrderDual.toDual a) = OrderDual.toDual (grade 𝕆 a)

full_name: grade_ofDual
code: @[simp]
theorem grade_ofDual [GradeOrder 𝕆 α] (a : αᵒᵈ) : grade 𝕆 (ofDual a) = ofDual (grade 𝕆ᵒᵈ a) 
goal: grade 𝕆 (OrderDual.ofDual a) = OrderDual.ofDual (grade 𝕆ᵒᵈ a)

full_name: GradeOrder.liftLeft
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeOrder.liftLeft [GradeOrder 𝕆 α] (f : 𝕆 → ℙ) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) : GradeOrder ℙ α 
goal: GradeOrder ℙ α

full_name: GradeMinOrder.liftLeft
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeMinOrder.liftLeft [GradeMinOrder 𝕆 α] (f : 𝕆 → ℙ) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmin : ∀ a, IsMin a → IsMin (f a)) : GradeMinOrder ℙ α 
goal: GradeMinOrder ℙ α

full_name: GradeMaxOrder.liftLeft
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeMaxOrder.liftLeft [GradeMaxOrder 𝕆 α] (f : 𝕆 → ℙ) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmax : ∀ a, IsMax a → IsMax (f a)) : GradeMaxOrder ℙ α 
goal: GradeMaxOrder ℙ α

full_name: GradeBoundedOrder.liftLeft
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeBoundedOrder.liftLeft [GradeBoundedOrder 𝕆 α] (f : 𝕆 → ℙ) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmin : ∀ a, IsMin a → IsMin (f a))
    (hmax : ∀ a, IsMax a → IsMax (f a)) : GradeBoundedOrder ℙ α 
goal: GradeBoundedOrder ℙ α

full_name: GradeOrder.liftRight
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeOrder.liftRight [GradeOrder 𝕆 β] (f : α → β) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) : GradeOrder 𝕆 α 
goal: GradeOrder 𝕆 α

full_name: GradeMinOrder.liftRight
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeMinOrder.liftRight [GradeMinOrder 𝕆 β] (f : α → β) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmin : ∀ a, IsMin a → IsMin (f a)) : GradeMinOrder 𝕆 α 
goal: GradeMinOrder 𝕆 α

full_name: GradeMaxOrder.liftRight
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeMaxOrder.liftRight [GradeMaxOrder 𝕆 β] (f : α → β) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmax : ∀ a, IsMax a → IsMax (f a)) : GradeMaxOrder 𝕆 α 
goal: GradeMaxOrder 𝕆 α

full_name: GradeBoundedOrder.liftRight
code: /-- Lifts a graded order along a strictly monotone function. -/
abbrev GradeBoundedOrder.liftRight [GradeBoundedOrder 𝕆 β] (f : α → β) (hf : StrictMono f)
    (hcovBy : ∀ a b, a ⋖ b → f a ⋖ f b) (hmin : ∀ a, IsMin a → IsMin (f a))
    (hmax : ∀ a, IsMax a → IsMax (f a)) : GradeBoundedOrder 𝕆 α 
goal: GradeBoundedOrder 𝕆 α

full_name: GradeOrder.finToNat
code: /-- A `Fin n`-graded order is also `ℕ`-graded. We do not mark this an instance because `n` is not
inferrable. -/
abbrev GradeOrder.finToNat (n : ℕ) [GradeOrder (Fin n) α] : GradeOrder ℕ α 
goal: GradeOrder ℕ α

full_name: GradeMinOrder.finToNat
code: /-- A `Fin n`-graded order is also `ℕ`-graded. We do not mark this an instance because `n` is not
inferrable. -/
abbrev GradeMinOrder.finToNat (n : ℕ) [GradeMinOrder (Fin n) α] : GradeMinOrder ℕ α 
goal: GradeMinOrder ℕ α

full_name: GradeOrder.natToInt
code: instance GradeOrder.natToInt [GradeOrder ℕ α] : GradeOrder ℤ α 
goal: GradeOrder ℤ α

full_name: GradeOrder.wellFoundedLT
code: theorem GradeOrder.wellFoundedLT (𝕆 : Type*) [Preorder 𝕆] [GradeOrder 𝕆 α]
    [WellFoundedLT 𝕆] : WellFoundedLT α 
goal: WellFoundedLT α

full_name: GradeOrder.wellFoundedGT
code: theorem GradeOrder.wellFoundedGT (𝕆 : Type*) [Preorder 𝕆] [GradeOrder 𝕆 α]
    [WellFoundedGT 𝕆] : WellFoundedGT α 
goal: WellFoundedGT α

full_name: instWellFoundedLTOfGradeOrderNat
code: instance [GradeOrder ℕ α] : WellFoundedLT α 
goal: WellFoundedLT α

full_name: instWellFoundedGTOfGradeOrderOrderDualNat
code: instance [GradeOrder ℕᵒᵈ α] : WellFoundedGT α 
goal: WellFoundedGT α