Skip to content

Commit

Permalink
chore(Order.Grade): remove porting notes (#10496)
Browse files Browse the repository at this point in the history
Simple changes to remove porting notes.
  • Loading branch information
mattrobball committed Feb 13, 2024
1 parent fc83024 commit 2096ece
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Mathlib/Order/Grade.lean
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ class GradeBoundedOrder (𝕆 Ξ± : Type*) [Preorder 𝕆] [Preorder Ξ±] extends
#align grade_bounded_order GradeBoundedOrder

section Preorder -- grading
-- PORTING NOTE: this `variable [Preorder 𝕆]` for the whole section seems to not work in Lean4
-- variable [Preorder 𝕆]
variable [Preorder 𝕆]

section Preorder -- graded order
variable [Preorder Ξ±]

section GradeOrder
variable (𝕆) [Preorder 𝕆] [GradeOrder 𝕆 Ξ±] {a b : Ξ±}
variable (𝕆)
variable [GradeOrder 𝕆 Ξ±] {a b : Ξ±}

/-- 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 `βŠ₯`. -/
Expand Down Expand Up @@ -265,9 +265,8 @@ theorem grade_ofDual [GradeOrder 𝕆 Ξ±] (a : Ξ±α΅’α΅ˆ) : grade 𝕆 (ofDual a)
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftLeft [GradeOrder 𝕆 Ξ±] (f : 𝕆 β†’ β„™) (hf : StrictMono f)
(hcovBy : βˆ€ a b, a β‹– b β†’ f a β‹– f b) : GradeOrder β„™ Ξ±
where
grade := f ∘ (@grade 𝕆 _ _ _ _) -- porting note - what the hell?! used to be `grade 𝕆`
(hcovBy : βˆ€ a b, a β‹– b β†’ f a β‹– f b) : GradeOrder β„™ Ξ± where
grade := f ∘ _root_.grade 𝕆
grade_strictMono := hf.comp grade_strictMono
covBy_grade _ _ h := hcovBy _ _ <| h.grade _
#align grade_order.lift_left GradeOrder.liftLeft
Expand Down Expand Up @@ -301,9 +300,8 @@ def GradeBoundedOrder.liftLeft [GradeBoundedOrder 𝕆 Ξ±] (f : 𝕆 β†’ β„™) (h
/-- Lifts a graded order along a strictly monotone function. -/
@[reducible]
def GradeOrder.liftRight [GradeOrder 𝕆 Ξ²] (f : Ξ± β†’ Ξ²) (hf : StrictMono f)
(hcovBy : βˆ€ a b, a β‹– b β†’ f a β‹– f b) : GradeOrder 𝕆 Ξ±
where
grade := (@grade 𝕆 _ _ _ _) ∘ f -- porting note: again, weird
(hcovBy : βˆ€ a b, a β‹– b β†’ f a β‹– f b) : GradeOrder 𝕆 Ξ± where
grade := _root_.grade 𝕆 ∘ f
grade_strictMono := grade_strictMono.comp hf
covBy_grade _ _ h := (hcovBy _ _ h).grade _
#align grade_order.lift_right GradeOrder.liftRight
Expand Down

0 comments on commit 2096ece

Please sign in to comment.