Skip to content

Commit 9757df4

Browse files
committed
chore: remove workarounds for lean4#1891 (#9290)
We no longer need to explicitly specify the `Monotone` and `StrictMono` arguments, after leanprover/lean4@069873d fixed leanprover/lean4#1891. Compare to the mathlib3 declarations: https://github.com/leanprover-community/mathlib/blob/65a1391a0106c9204fe45bc73a039f056558cb83/src/data/prod/lex.lean#L93-L107
1 parent 04c6d77 commit 9757df4

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Mathlib/Data/Prod/Lex.lean

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,14 @@ section Preorder
108108

109109
variable [PartialOrder α] [Preorder β]
110110

111-
-- porting note: type class search sees right through the type synonrm for `α ×ₗ β` and uses the
112-
-- `Preorder` structure for `α × β` instead
113-
-- This is hopefully the same problems as in https://github.com/leanprover/lean4/issues/1891
114-
-- and will be fixed in nightly-2022-11-30
115-
theorem toLex_mono : @Monotone _ _ _ (Prod.Lex.preorder α β) (toLex : α × β → α ×ₗ β) := by
111+
theorem toLex_mono : Monotone (toLex : α × β → α ×ₗ β) := by
116112
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ ⟨ha, hb⟩
117113
obtain rfl | ha : a₁ = a₂ ∨ _ := ha.eq_or_lt
118114
· exact right _ hb
119115
· exact left _ _ ha
120116
#align prod.lex.to_lex_mono Prod.Lex.toLex_mono
121117

122-
-- porting note: type class search sees right through the type synonrm for `α ×ₗ β` and uses the
123-
-- `Preorder` structure for `α × β` instead
124-
-- This is hopefully the same problems as in https://github.com/leanprover/lean4/issues/1891
125-
-- and will be fixed in nightly-2022-11-30
126-
theorem toLex_strictMono : @StrictMono _ _ _ (Prod.Lex.preorder α β) (toLex : α × β → α ×ₗ β) := by
118+
theorem toLex_strictMono : StrictMono (toLex : α × β → α ×ₗ β) := by
127119
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ h
128120
obtain rfl | ha : a₁ = a₂ ∨ _ := h.le.1.eq_or_lt
129121
· exact right _ (Prod.mk_lt_mk_iff_right.1 h)

0 commit comments

Comments
 (0)