algebra.order.monoid.defsMathlib.Algebra.Order.Monoid.Defs

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -49,24 +49,24 @@ attribute [to_additive] OrderedCommMonoid
 
 section OrderedInstances
 
-#print OrderedCommMonoid.to_covariantClass_left /-
+#print OrderedCommMonoid.toCovariantClassLeft /-
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.toCovariantClassLeft (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·)
     where elim a b c bc := OrderedCommMonoid.hMul_le_hMul_left _ _ bc a
-#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
-#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
+#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.toCovariantClassLeft
+#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.toCovariantClassLeft
 -/
 
-#print OrderedCommMonoid.to_covariantClass_right /-
+#print OrderedCommMonoid.toCovariantClassRight /-
 /- This instance can be proven with `by apply_instance`.  However, `with_bot ℕ` does not
 pick up a `covariant_class M M (function.swap (*)) (≤)` instance without it (see PR #7940). -/
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.toCovariantClassRight (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   covariant_swap_hMul_le_of_covariant_hMul_le M
-#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
-#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
+#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.toCovariantClassRight
+#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.toCovariantClassRight
 -/
 
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2016 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
 -/
-import Mathbin.Algebra.Order.Monoid.Lemmas
-import Mathbin.Order.BoundedOrder
+import Algebra.Order.Monoid.Lemmas
+import Order.BoundedOrder
 
 #align_import algebra.order.monoid.defs from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -69,7 +69,6 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 -/
 
-#print Mul.to_covariantClass_left /-
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `left_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (*) (≤)` implies
 `covariant_class M M (*) (<)`, see `left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le`. -/
@@ -79,9 +78,7 @@ theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_left Mul.to_covariantClass_left
 #align has_add.to_covariant_class_left Add.to_covariantClass_left
--/
 
-#print Mul.to_covariantClass_right /-
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `right_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (swap (*)) (<)`
 implies `covariant_class M M (swap (*)) (≤)`, see
@@ -92,7 +89,6 @@ theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_right Mul.to_covariantClass_right
 #align has_add.to_covariant_class_right Add.to_covariantClass_right
--/
 
 end OrderedInstances
 
Diff
@@ -53,7 +53,7 @@ section OrderedInstances
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·)
-    where elim a b c bc := OrderedCommMonoid.mul_le_mul_left _ _ bc a
+    where elim a b c bc := OrderedCommMonoid.hMul_le_hMul_left _ _ bc a
 #align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
 #align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
 -/
@@ -64,7 +64,7 @@ pick up a `covariant_class M M (function.swap (*)) (≤)` instance without it (s
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
-  covariant_swap_mul_le_of_covariant_mul_le M
+  covariant_swap_hMul_le_of_covariant_hMul_le M
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 -/
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2016 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
-
-! This file was ported from Lean 3 source module algebra.order.monoid.defs
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Order.Monoid.Lemmas
 import Mathbin.Order.BoundedOrder
 
+#align_import algebra.order.monoid.defs from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Ordered monoids
 
Diff
@@ -52,13 +52,16 @@ attribute [to_additive] OrderedCommMonoid
 
 section OrderedInstances
 
+#print OrderedCommMonoid.to_covariantClass_left /-
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·)
     where elim a b c bc := OrderedCommMonoid.mul_le_mul_left _ _ bc a
 #align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
 #align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
+-/
 
+#print OrderedCommMonoid.to_covariantClass_right /-
 /- This instance can be proven with `by apply_instance`.  However, `with_bot ℕ` does not
 pick up a `covariant_class M M (function.swap (*)) (≤)` instance without it (see PR #7940). -/
 @[to_additive]
@@ -67,6 +70,7 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
   covariant_swap_mul_le_of_covariant_mul_le M
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
+-/
 
 #print Mul.to_covariantClass_left /-
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
@@ -95,9 +99,11 @@ theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
 
 end OrderedInstances
 
+#print bit0_pos /-
 theorem bit0_pos [OrderedAddCommMonoid α] {a : α} (h : 0 < a) : 0 < bit0 a :=
   add_pos' h h
 #align bit0_pos bit0_pos
+-/
 
 #print LinearOrderedAddCommMonoid /-
 /-- A linearly ordered additive commutative monoid. -/
@@ -137,15 +143,19 @@ section LinearOrderedAddCommMonoidWithTop
 
 variable [LinearOrderedAddCommMonoidWithTop α] {a b : α}
 
+#print top_add /-
 @[simp]
 theorem top_add (a : α) : ⊤ + a = ⊤ :=
   LinearOrderedAddCommMonoidWithTop.top_add' a
 #align top_add top_add
+-/
 
+#print add_top /-
 @[simp]
 theorem add_top (a : α) : a + ⊤ = ⊤ :=
   trans (add_comm _ _) (top_add _)
 #align add_top add_top
+-/
 
 end LinearOrderedAddCommMonoidWithTop
 
Diff
@@ -119,7 +119,7 @@ class LinearOrderedCommMonoid (α : Type _) extends LinearOrder α, OrderedCommM
   Instances should include number systems with an infinite element adjoined.` -/
 @[protect_proj]
 class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCommMonoid α,
-  Top α where
+    Top α where
   le_top : ∀ x : α, x ≤ ⊤
   top_add' : ∀ x : α, ⊤ + x = ⊤
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
Diff
@@ -68,6 +68,7 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 
+#print Mul.to_covariantClass_left /-
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `left_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (*) (≤)` implies
 `covariant_class M M (*) (<)`, see `left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le`. -/
@@ -77,7 +78,9 @@ theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_left Mul.to_covariantClass_left
 #align has_add.to_covariant_class_left Add.to_covariantClass_left
+-/
 
+#print Mul.to_covariantClass_right /-
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `right_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (swap (*)) (<)`
 implies `covariant_class M M (swap (*)) (≤)`, see
@@ -88,6 +91,7 @@ theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_right Mul.to_covariantClass_right
 #align has_add.to_covariant_class_right Add.to_covariantClass_right
+-/
 
 end OrderedInstances
 
@@ -121,11 +125,13 @@ class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCo
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
 -/
 
+#print LinearOrderedAddCommMonoidWithTop.toOrderTop /-
 -- see Note [lower instance priority]
 instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type u)
     [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
   { h with }
 #align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTop
+-/
 
 section LinearOrderedAddCommMonoidWithTop
 
Diff
@@ -52,12 +52,6 @@ attribute [to_additive] OrderedCommMonoid
 
 section OrderedInstances
 
-/- warning: ordered_comm_monoid.to_covariant_class_left -> OrderedCommMonoid.to_covariantClass_left is a dubious translation:
-lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1)))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
-but is expected to have type
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.104 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.106 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.104 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.106) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.119 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.121 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.119 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.121)
-Case conversion may be inaccurate. Consider using '#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_leftₓ'. -/
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·)
@@ -65,12 +59,6 @@ instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoi
 #align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
 #align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
 
-/- warning: ordered_comm_monoid.to_covariant_class_right -> OrderedCommMonoid.to_covariantClass_right is a dubious translation:
-lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
-but is expected to have type
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.170 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.172 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.170 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.172)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.185 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.187 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.185 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.187)
-Case conversion may be inaccurate. Consider using '#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_rightₓ'. -/
 /- This instance can be proven with `by apply_instance`.  However, `with_bot ℕ` does not
 pick up a `covariant_class M M (function.swap (*)) (≤)` instance without it (see PR #7940). -/
 @[to_additive]
@@ -80,12 +68,6 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 
-/- warning: has_mul.to_covariant_class_left -> Mul.to_covariantClass_left is a dubious translation:
-lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1)) (LT.lt.{u1} M (Preorder.toHasLt.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))], CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1)) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))
-but is expected to have type
-  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.222 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.224 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.222 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.224) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.237 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.239 : M) => LT.lt.{u1} M (Preorder.toLT.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.237 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.239)], CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.255 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.257 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.255 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.257) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.270 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.272 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.270 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.272)
-Case conversion may be inaccurate. Consider using '#align has_mul.to_covariant_class_left Mul.to_covariantClass_leftₓ'. -/
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `left_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (*) (≤)` implies
 `covariant_class M M (*) (<)`, see `left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le`. -/
@@ -96,12 +78,6 @@ theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
 #align has_mul.to_covariant_class_left Mul.to_covariantClass_left
 #align has_add.to_covariant_class_left Add.to_covariantClass_left
 
-/- warning: has_mul.to_covariant_class_right -> Mul.to_covariantClass_right is a dubious translation:
-lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1))) (LT.lt.{u1} M (Preorder.toHasLt.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))
-but is expected to have type
-  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.315 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.317 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.315 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.317)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.330 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.332 : M) => LT.lt.{u1} M (Preorder.toLT.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.330 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.332)], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.351 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.353 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.351 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.353)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.366 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.368 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.366 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.368)
-Case conversion may be inaccurate. Consider using '#align has_mul.to_covariant_class_right Mul.to_covariantClass_rightₓ'. -/
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `right_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (swap (*)) (<)`
 implies `covariant_class M M (swap (*)) (≤)`, see
@@ -115,12 +91,6 @@ theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
 
 end OrderedInstances
 
-/- warning: bit0_pos -> bit0_pos is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α] {a : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) (bit0.{u1} α (AddZeroClass.toHasAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1)))) a))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α] {a : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))) a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))) (bit0.{u1} α (AddZeroClass.toAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1)))) a))
-Case conversion may be inaccurate. Consider using '#align bit0_pos bit0_posₓ'. -/
 theorem bit0_pos [OrderedAddCommMonoid α] {a : α} (h : 0 < a) : 0 < bit0 a :=
   add_pos' h h
 #align bit0_pos bit0_pos
@@ -151,12 +121,6 @@ class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCo
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
 -/
 
-/- warning: linear_ordered_add_comm_monoid_with_top.to_order_top -> LinearOrderedAddCommMonoidWithTop.toOrderTop is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [h : LinearOrderedAddCommMonoidWithTop.{u1} α], OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α h)))))
-but is expected to have type
-  forall (α : Type.{u1}) [h : LinearOrderedAddCommMonoidWithTop.{u1} α], OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α h)))))
-Case conversion may be inaccurate. Consider using '#align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTopₓ'. -/
 -- see Note [lower instance priority]
 instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type u)
     [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
@@ -167,23 +131,11 @@ section LinearOrderedAddCommMonoidWithTop
 
 variable [LinearOrderedAddCommMonoidWithTop α] {a b : α}
 
-/- warning: top_add -> top_add is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedAddCommMonoidWithTop.{u1} α] (a : α), Eq.{succ u1} α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toHasAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α _inst_1))))))) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toHasTop.{u1} α _inst_1)) a) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toHasTop.{u1} α _inst_1))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedAddCommMonoidWithTop.{u1} α] (a : α), Eq.{succ u1} α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (LinearOrderedAddCommMonoid.toAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α _inst_1)))))) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toTop.{u1} α _inst_1)) a) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toTop.{u1} α _inst_1))
-Case conversion may be inaccurate. Consider using '#align top_add top_addₓ'. -/
 @[simp]
 theorem top_add (a : α) : ⊤ + a = ⊤ :=
   LinearOrderedAddCommMonoidWithTop.top_add' a
 #align top_add top_add
 
-/- warning: add_top -> add_top is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedAddCommMonoidWithTop.{u1} α] (a : α), Eq.{succ u1} α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toHasAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α _inst_1))))))) a (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toHasTop.{u1} α _inst_1))) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toHasTop.{u1} α _inst_1))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedAddCommMonoidWithTop.{u1} α] (a : α), Eq.{succ u1} α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (LinearOrderedAddCommMonoid.toAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α _inst_1)))))) a (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toTop.{u1} α _inst_1))) (Top.top.{u1} α (LinearOrderedAddCommMonoidWithTop.toTop.{u1} α _inst_1))
-Case conversion may be inaccurate. Consider using '#align add_top add_topₓ'. -/
 @[simp]
 theorem add_top (a : α) : a + ⊤ = ⊤ :=
   trans (add_comm _ _) (top_add _)
Diff
@@ -54,7 +54,7 @@ section OrderedInstances
 
 /- warning: ordered_comm_monoid.to_covariant_class_left -> OrderedCommMonoid.to_covariantClass_left is a dubious translation:
 lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1)))))) (LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
+  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1)))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
 but is expected to have type
   forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.104 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.106 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.104 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.106) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.119 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.121 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.119 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.121)
 Case conversion may be inaccurate. Consider using '#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_leftₓ'. -/
@@ -67,7 +67,7 @@ instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoi
 
 /- warning: ordered_comm_monoid.to_covariant_class_right -> OrderedCommMonoid.to_covariantClass_right is a dubious translation:
 lean 3 declaration is
-  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))))) (LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
+  forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toHasMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))))
 but is expected to have type
   forall (M : Type.{u1}) [_inst_1 : OrderedCommMonoid.{u1} M], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.170 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.172 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulOneClass.toMul.{u1} M (Monoid.toMulOneClass.{u1} M (CommMonoid.toMonoid.{u1} M (OrderedCommMonoid.toCommMonoid.{u1} M _inst_1))))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.170 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.172)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.185 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.187 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M (OrderedCommMonoid.toPartialOrder.{u1} M _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.185 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.187)
 Case conversion may be inaccurate. Consider using '#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_rightₓ'. -/
@@ -80,7 +80,12 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 
-#print Mul.to_covariantClass_left /-
+/- warning: has_mul.to_covariant_class_left -> Mul.to_covariantClass_left is a dubious translation:
+lean 3 declaration is
+  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1)) (LT.lt.{u1} M (Preorder.toHasLt.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))], CovariantClass.{u1, u1} M M (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1)) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))
+but is expected to have type
+  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.222 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.224 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.222 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.224) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.237 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.239 : M) => LT.lt.{u1} M (Preorder.toLT.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.237 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.239)], CovariantClass.{u1, u1} M M (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.255 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.257 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.255 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.257) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.270 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.272 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.270 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.272)
+Case conversion may be inaccurate. Consider using '#align has_mul.to_covariant_class_left Mul.to_covariantClass_leftₓ'. -/
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `left_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (*) (≤)` implies
 `covariant_class M M (*) (<)`, see `left_cancel_semigroup.covariant_mul_lt_of_covariant_mul_le`. -/
@@ -90,9 +95,13 @@ theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_left Mul.to_covariantClass_left
 #align has_add.to_covariant_class_left Add.to_covariantClass_left
--/
 
-#print Mul.to_covariantClass_right /-
+/- warning: has_mul.to_covariant_class_right -> Mul.to_covariantClass_right is a dubious translation:
+lean 3 declaration is
+  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1))) (LT.lt.{u1} M (Preorder.toHasLt.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1))) (LE.le.{u1} M (Preorder.toHasLe.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)))
+but is expected to have type
+  forall (M : Type.{u1}) [_inst_1 : Mul.{u1} M] [_inst_2 : PartialOrder.{u1} M] [_inst_3 : CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.315 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.317 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.315 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.317)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.330 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.332 : M) => LT.lt.{u1} M (Preorder.toLT.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.330 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.332)], CovariantClass.{u1, u1} M M (Function.swap.{succ u1, succ u1, succ u1} M M (fun (ᾰ : M) (ᾰ : M) => M) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.351 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.353 : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.351 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.353)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.366 : M) (x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.368 : M) => LE.le.{u1} M (Preorder.toLE.{u1} M (PartialOrder.toPreorder.{u1} M _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.366 x._@.Mathlib.Algebra.Order.Monoid.Defs._hyg.368)
+Case conversion may be inaccurate. Consider using '#align has_mul.to_covariant_class_right Mul.to_covariantClass_rightₓ'. -/
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `right_cancel_semigroup` with a `partial_order`, assuming `covariant_class M M (swap (*)) (<)`
 implies `covariant_class M M (swap (*)) (≤)`, see
@@ -103,13 +112,12 @@ theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
 #align has_mul.to_covariant_class_right Mul.to_covariantClass_right
 #align has_add.to_covariant_class_right Add.to_covariantClass_right
--/
 
 end OrderedInstances
 
 /- warning: bit0_pos -> bit0_pos is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α] {a : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) (bit0.{u1} α (AddZeroClass.toHasAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1)))) a))
+  forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α] {a : α}, (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) a) -> (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))))) (bit0.{u1} α (AddZeroClass.toHasAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1)))) a))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α] {a : α}, (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))) a) -> (LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1))))) (bit0.{u1} α (AddZeroClass.toAdd.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α _inst_1)))) a))
 Case conversion may be inaccurate. Consider using '#align bit0_pos bit0_posₓ'. -/
@@ -143,13 +151,17 @@ class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCo
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
 -/
 
-#print LinearOrderedAddCommMonoidWithTop.toOrderTop /-
+/- warning: linear_ordered_add_comm_monoid_with_top.to_order_top -> LinearOrderedAddCommMonoidWithTop.toOrderTop is a dubious translation:
+lean 3 declaration is
+  forall (α : Type.{u1}) [h : LinearOrderedAddCommMonoidWithTop.{u1} α], OrderTop.{u1} α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α h)))))
+but is expected to have type
+  forall (α : Type.{u1}) [h : LinearOrderedAddCommMonoidWithTop.{u1} α], OrderTop.{u1} α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (LinearOrderedAddCommMonoid.toOrderedAddCommMonoid.{u1} α (LinearOrderedAddCommMonoidWithTop.toLinearOrderedAddCommMonoid.{u1} α h)))))
+Case conversion may be inaccurate. Consider using '#align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTopₓ'. -/
 -- see Note [lower instance priority]
 instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type u)
     [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
   { h with }
 #align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTop
--/
 
 section LinearOrderedAddCommMonoidWithTop
 

Changes in mathlib4

mathlib3
mathlib4
chore (Order.Defs): reorder parents to simplify instances and avoid non-reducible defeq checks (#9034)

Currently, OrderDual.orderedCommMonoid unifies with LinearOrderedAddCommMonoid.toOrderedAddCommMonoid at instance transparency because of an extra eta expansion in its definition. The provided instances can be synthesized by Lean and deleted. This removes the extraneous eta expansion but causes defeq to fail at instance transparency. To fix this, we reorder the parents of LinearOrderedAddCommMonoid. We also do this for the non-Add version.

Diff
@@ -123,16 +123,14 @@ set_option linter.deprecated false in
 #align bit0_pos bit0_pos
 
 /-- A linearly ordered additive commutative monoid. -/
-class LinearOrderedAddCommMonoid (α : Type*) extends LinearOrder α, OrderedAddCommMonoid α
+class LinearOrderedAddCommMonoid (α : Type*) extends OrderedAddCommMonoid α, LinearOrder α
 #align linear_ordered_add_comm_monoid LinearOrderedAddCommMonoid
 
 /-- A linearly ordered commutative monoid. -/
 @[to_additive]
-class LinearOrderedCommMonoid (α : Type*) extends LinearOrder α, OrderedCommMonoid α
+class LinearOrderedCommMonoid (α : Type*) extends OrderedCommMonoid α, LinearOrder α
 #align linear_ordered_comm_monoid LinearOrderedCommMonoid
 
-attribute [to_additive existing] LinearOrderedCommMonoid.toOrderedCommMonoid
-
 /-- A linearly ordered cancellative additive commutative monoid is an additive commutative monoid
 with a decidable linear order in which addition is cancellative and monotone. -/
 class LinearOrderedCancelAddCommMonoid (α : Type*) extends OrderedCancelAddCommMonoid α,
chore(Order): replace Top and Bot ancestors with OrderTop and OrderBot (#8446)

Co-authored-by: negiizhao <egresf@gmail.com>

Diff
@@ -151,17 +151,10 @@ attribute [to_additive existing] LinearOrderedCancelCommMonoid.toLinearOrderedCo
 /-- A linearly ordered commutative monoid with an additively absorbing `⊤` element.
   Instances should include number systems with an infinite element adjoined. -/
 class LinearOrderedAddCommMonoidWithTop (α : Type*) extends LinearOrderedAddCommMonoid α,
-    Top α where
-  /-- In a `LinearOrderedAddCommMonoidWithTop`, the `⊤` element is larger than any other element.-/
-  protected le_top : ∀ x : α, x ≤ ⊤
+    OrderTop α where
   /-- In a `LinearOrderedAddCommMonoidWithTop`, the `⊤` element is invariant under addition. -/
   protected top_add' : ∀ x : α, ⊤ + x = ⊤
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
-
--- see Note [lower instance priority]
-instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type*)
-    [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
-  { h with }
 #align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTop
 
 section LinearOrderedAddCommMonoidWithTop
chore: Merge back ordered cancellative stuff (#8170)

There really is no reason (mathematically nor import graphically) to have OrderedCancelCommMonoid be defined in a separate file from OrderedCommMonoid.

Also take the opportunity to:

  • make OrderedCancelCommMonoid extend OrderedCommMonoid
  • fix capitalisation in instance names
  • standardise to defining the additive of each structure version first, so that to_additive can be called directly on the multiplicative version
  • inline at no cost a few auxiliary lemmas
Diff
@@ -18,52 +18,104 @@ This file provides the definitions of ordered monoids.
 
 open Function
 
-universe u
+variable {α β : Type*}
 
-variable {α : Type u} {β : Type*}
-
-/-- An ordered commutative monoid is a commutative monoid
-with a partial order such that `a ≤ b → c * a ≤ c * b` (multiplication is monotone)
--/
-class OrderedCommMonoid (α : Type*) extends CommMonoid α, PartialOrder α where
-  /-- Multiplication is monotone in an `OrderedCommMonoid`. -/
-  protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c : α, c * a ≤ c * b
-#align ordered_comm_monoid OrderedCommMonoid
-
-/-- An ordered (additive) commutative monoid is a commutative monoid
-  with a partial order such that `a ≤ b → c + a ≤ c + b` (addition is monotone)
--/
+/-- An ordered (additive) commutative monoid is a commutative monoid with a partial order such that
+addition is monotone. -/
 class OrderedAddCommMonoid (α : Type*) extends AddCommMonoid α, PartialOrder α where
-  /-- Addition is monotone in an `OrderedAddCommMonoid`. -/
-  protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c : α, c + a ≤ c + b
+  protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c, c + a ≤ c + b
 #align ordered_add_comm_monoid OrderedAddCommMonoid
 
-attribute [to_additive] OrderedCommMonoid
+/-- An ordered commutative monoid is a commutative monoid with a partial order such that
+multiplication is monotone. -/
+@[to_additive]
+class OrderedCommMonoid (α : Type*) extends CommMonoid α, PartialOrder α where
+  protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c, c * a ≤ c * b
+#align ordered_comm_monoid OrderedCommMonoid
 
-section OrderedInstances
+section OrderedCommMonoid
+variable [OrderedCommMonoid α]
 
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_left (M : Type*) [OrderedCommMonoid M] :
-    CovariantClass M M (· * ·) (· ≤ ·) where
+instance OrderedCommMonoid.toCovariantClassLeft : CovariantClass α α (· * ·) (· ≤ ·) where
   elim := fun a _ _ bc ↦ OrderedCommMonoid.mul_le_mul_left _ _ bc a
-#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
-#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
+#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.toCovariantClassLeft
+#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.toCovariantClassLeft
 
 /- This instance can be proven with `by infer_instance`.  However, `WithBot ℕ` does not
-pick up a `CovariantClass M M (function.swap (*)) (≤)` instance without it (see PR mathlib#7940). -/
+pick up a `CovariantClass M M (Function.swap (*)) (≤)` instance without it (see PR mathlib#7940). -/
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_right (M : Type*) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.toCovariantClassRight (M : Type*) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   covariant_swap_mul_of_covariant_mul M _
-#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
-#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
+#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.toCovariantClassRight
+#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.toCovariantClassRight
+
+end OrderedCommMonoid
+
+/-- An ordered cancellative additive commutative monoid is a partially ordered commutative additive
+monoid in which addition is cancellative and monotone. -/
+class OrderedCancelAddCommMonoid (α : Type*) extends OrderedAddCommMonoid α where
+  protected le_of_add_le_add_left : ∀ a b c : α, a + b ≤ a + c → b ≤ c
+#align ordered_cancel_add_comm_monoid OrderedCancelAddCommMonoid
+
+/-- An ordered cancellative commutative monoid is a partially ordered commutative monoid in which
+multiplication is cancellative and monotone. -/
+@[to_additive OrderedCancelAddCommMonoid]
+class OrderedCancelCommMonoid (α : Type*) extends OrderedCommMonoid α where
+  protected le_of_mul_le_mul_left : ∀ a b c : α, a * b ≤ a * c → b ≤ c
+#align ordered_cancel_comm_monoid OrderedCancelCommMonoid
+
+#align ordered_cancel_comm_monoid.to_ordered_comm_monoid OrderedCancelCommMonoid.toOrderedCommMonoid
+#align ordered_cancel_add_comm_monoid.to_ordered_add_comm_monoid OrderedCancelAddCommMonoid.toOrderedAddCommMonoid
+
+section OrderedCancelCommMonoid
+variable [OrderedCancelCommMonoid α]
+
+-- See note [lower instance priority]
+@[to_additive]
+instance (priority := 200) OrderedCancelCommMonoid.toContravariantClassLeLeft :
+    ContravariantClass α α (· * ·) (· ≤ ·) :=
+  ⟨OrderedCancelCommMonoid.le_of_mul_le_mul_left⟩
+#align ordered_cancel_comm_monoid.to_contravariant_class_le_left OrderedCancelCommMonoid.toContravariantClassLeLeft
+#align ordered_cancel_add_comm_monoid.to_contravariant_class_le_left OrderedCancelAddCommMonoid.toContravariantClassLeLeft
+
+#noalign ordered_cancel_comm_monoid.lt_of_mul_lt_mul_left
+#noalign ordered_cancel_add_comm_monoid.lt_of_add_lt_add_left
+
+@[to_additive]
+instance OrderedCancelCommMonoid.toContravariantClassLeft :
+    ContravariantClass α α (· * ·) (· < ·) where
+  elim := contravariant_lt_of_contravariant_le α α _ ContravariantClass.elim
+#align ordered_cancel_comm_monoid.to_contravariant_class_left OrderedCancelCommMonoid.toContravariantClassLeft
+#align ordered_cancel_add_comm_monoid.to_contravariant_class_left OrderedCancelAddCommMonoid.toContravariantClassLeft
+
+/- This instance can be proven with `by infer_instance`.  However, by analogy with the
+instance `OrderedCancelCommMonoid.to_covariantClass_right` above, I imagine that without
+this instance, some Type would not have a `ContravariantClass M M (function.swap (*)) (<)`
+instance. -/
+@[to_additive]
+instance OrderedCancelCommMonoid.toContravariantClassRight :
+    ContravariantClass α α (swap (· * ·)) (· < ·) :=
+  contravariant_swap_mul_of_contravariant_mul α _
+#align ordered_cancel_comm_monoid.to_contravariant_class_right OrderedCancelCommMonoid.toContravariantClassRight
+#align ordered_cancel_add_comm_monoid.to_contravariant_class_right OrderedCancelAddCommMonoid.toContravariantClassRight
+
+-- See note [lower instance priority]
+@[to_additive OrderedCancelAddCommMonoid.toCancelAddCommMonoid]
+instance (priority := 100) OrderedCancelCommMonoid.toCancelCommMonoid : CancelCommMonoid α :=
+  { ‹OrderedCancelCommMonoid α› with
+    mul_left_cancel :=
+      fun a b c h => (le_of_mul_le_mul_left' h.le).antisymm <| le_of_mul_le_mul_left' h.ge }
+#align ordered_cancel_comm_monoid.to_cancel_comm_monoid OrderedCancelCommMonoid.toCancelCommMonoid
+#align ordered_cancel_add_comm_monoid.to_cancel_add_comm_monoid OrderedCancelAddCommMonoid.toCancelAddCommMonoid
 
 #noalign has_mul.to_covariant_class_left
 #noalign has_add.to_covariant_class_left
 #noalign has_mul.to_covariant_class_right
 #noalign has_add.to_covariant_class_right
 
-end OrderedInstances
+end OrderedCancelCommMonoid
 
 set_option linter.deprecated false in
 @[deprecated] theorem bit0_pos [OrderedAddCommMonoid α] {a : α} (h : 0 < a) : 0 < bit0 a :=
@@ -81,6 +133,21 @@ class LinearOrderedCommMonoid (α : Type*) extends LinearOrder α, OrderedCommMo
 
 attribute [to_additive existing] LinearOrderedCommMonoid.toOrderedCommMonoid
 
+/-- A linearly ordered cancellative additive commutative monoid is an additive commutative monoid
+with a decidable linear order in which addition is cancellative and monotone. -/
+class LinearOrderedCancelAddCommMonoid (α : Type*) extends OrderedCancelAddCommMonoid α,
+    LinearOrderedAddCommMonoid α
+#align linear_ordered_cancel_add_comm_monoid LinearOrderedCancelAddCommMonoid
+
+/-- A linearly ordered cancellative commutative monoid is a commutative monoid with a linear order
+in which multiplication is cancellative and monotone. -/
+@[to_additive LinearOrderedCancelAddCommMonoid]
+class LinearOrderedCancelCommMonoid (α : Type*) extends OrderedCancelCommMonoid α,
+    LinearOrderedCommMonoid α
+#align linear_ordered_cancel_comm_monoid LinearOrderedCancelCommMonoid
+
+attribute [to_additive existing] LinearOrderedCancelCommMonoid.toLinearOrderedCommMonoid
+
 /-- A linearly ordered commutative monoid with an additively absorbing `⊤` element.
   Instances should include number systems with an infinite element adjoined. -/
 class LinearOrderedAddCommMonoidWithTop (α : Type*) extends LinearOrderedAddCommMonoid α,
@@ -92,7 +159,7 @@ class LinearOrderedAddCommMonoidWithTop (α : Type*) extends LinearOrderedAddCom
 #align linear_ordered_add_comm_monoid_with_top LinearOrderedAddCommMonoidWithTop
 
 -- see Note [lower instance priority]
-instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type u)
+instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type*)
     [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
   { h with }
 #align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTop
fix: fixes of 3 PRs (#8248)

Fixes mistake introduced in #7976 (ping to @alreadydone that you should use @[to_additive (attr := simp)] and not @[to_additive, simp]) and some namespacing mistakes from my own PRs #7337 and #7755

Diff
@@ -115,16 +115,16 @@ end LinearOrderedAddCommMonoidWithTop
 
 variable [LinearOrderedCommMonoid α] {a : α}
 
-@[to_additive, simp]
+@[to_additive (attr := simp)]
 theorem one_le_mul_self_iff : 1 ≤ a * a ↔ 1 ≤ a :=
   ⟨(fun h ↦ by push_neg at h ⊢; exact mul_lt_one' h h).mtr, fun h ↦ one_le_mul h h⟩
 
-@[to_additive, simp]
+@[to_additive (attr := simp)]
 theorem one_lt_mul_self_iff : 1 < a * a ↔ 1 < a :=
   ⟨(fun h ↦ by push_neg at h ⊢; exact mul_le_one' h h).mtr, fun h ↦ one_lt_mul'' h h⟩
 
-@[to_additive, simp]
+@[to_additive (attr := simp)]
 theorem mul_self_le_one_iff : a * a ≤ 1 ↔ a ≤ 1 := by simp [← not_iff_not]
 
-@[to_additive, simp]
+@[to_additive (attr := simp)]
 theorem mul_self_lt_one_iff : a * a < 1 ↔ a < 1 := by simp [← not_iff_not]
refactor: generalize Abs lemmas from rings to groups (#7976)

Four lemmas are moved from Algebra/Order/Monoid/Defs.lean to Algebra/Order/Group/Defs.lean and generalized

Four lemmas are moved from Algebra/Order/Ring/Abs.lean to Algebra/Order/Group/Abs.lean and generalized

Four lemmas are added in Algebra/Order/Monoid/Defs.lean. They're special cases of one_le_pow_iff, but I can't import the file without offending assert_not_exists.

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -112,3 +112,19 @@ theorem add_top (a : α) : a + ⊤ = ⊤ :=
 #align add_top add_top
 
 end LinearOrderedAddCommMonoidWithTop
+
+variable [LinearOrderedCommMonoid α] {a : α}
+
+@[to_additive, simp]
+theorem one_le_mul_self_iff : 1 ≤ a * a ↔ 1 ≤ a :=
+  ⟨(fun h ↦ by push_neg at h ⊢; exact mul_lt_one' h h).mtr, fun h ↦ one_le_mul h h⟩
+
+@[to_additive, simp]
+theorem one_lt_mul_self_iff : 1 < a * a ↔ 1 < a :=
+  ⟨(fun h ↦ by push_neg at h ⊢; exact mul_le_one' h h).mtr, fun h ↦ one_lt_mul'' h h⟩
+
+@[to_additive, simp]
+theorem mul_self_le_one_iff : a * a ≤ 1 ↔ a ≤ 1 := by simp [← not_iff_not]
+
+@[to_additive, simp]
+theorem mul_self_lt_one_iff : a * a < 1 ↔ a < 1 := by simp [← not_iff_not]
chore(Co(ntra)variantClass): generalize and remove duplicates (#6677)

4 files have major changes:

Algebra/CovariantAndContravariant.lean

  • Add new theorem contravariant_le_iff_contravariant_lt_and_eq.
  • Add covariantClass_le_of_lt generalizing and replacing Mul.to_covariantClass_left/right in Algebra/Order/Monoid/Defs.lean
  • Replace CommSemigroup by IsSymmOp N N mu and replace CancelSemigroup by IsMulCancel, removing superfluous associativity assumption.
  • new theorems covariant_lt_of_covariant_le_of_contravariant_eq and contravariant_le_of_contravariant_eq_and_lt that could replace eight instances when appropriate refactoring is in place.
  • Golfs
  • Fix changed names in other files.

Algebra/Order/Monoid/Lemmas.lean

  • Generalize mul_eq_mul_iff_eq_and_eq and remove the less general Left/Right.mul_eq_mul_iff_eq_and_eq.
  • Move mul_le_mul_iff_of_ge.
  • Introduce the more general Left/Right versions of min_le_max_of_mul_le_mul.
  • Move min_lt_max_of_mul_lt_mul here from Algebra/GroupPower/Order.lean.
  • Replace CommSemigroup by IsSymmOp.

Algebra/Order/Monoid/Basic.lean

  • Remove eq_and_eq_of_le_of_le_of_mul_le as it's just one direction of mul_le_mul_iff_of_ge but with more assumptions.

Algebra/Order/Ring/Lemmas.lean

  • Generalize two versions of mul_eq_mul_iff_eq_and_eq_of_pos
  • Golfs

Changes to Algebra/Group/UniqueProds.lean and Algebra/MonoidAlgebra/NoZeroDivisors.lean are in declarations that will be removed by #6723.

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -54,32 +54,14 @@ pick up a `CovariantClass M M (function.swap (*)) (≤)` instance without it (se
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_right (M : Type*) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
-  covariant_swap_mul_le_of_covariant_mul_le M
+  covariant_swap_mul_of_covariant_mul M _
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
 #align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 
-/- This is not an instance, to avoid creating a loop in the type-class system: in a
-`LeftCancelSemigroup` with a `PartialOrder`, assuming `CovariantClass M M (*) (≤)` implies
-`CovariantClass M M (*) (<)`, see `LeftCancelSemigroup.covariant_mul_lt_of_covariant_mul_le`. -/
-@[to_additive]
-theorem Mul.to_covariantClass_left (M : Type*) [Mul M] [PartialOrder M]
-    [CovariantClass M M (· * ·) (· < ·)] :
-    CovariantClass M M (· * ·) (· ≤ ·) :=
-  ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
-#align has_mul.to_covariant_class_left Mul.to_covariantClass_left
-#align has_add.to_covariant_class_left Add.to_covariantClass_left
-
-/- This is not an instance, to avoid creating a loop in the type-class system: in a
-`RightCancelSemigroup` with a `PartialOrder`, assuming `CovariantClass M M (swap (*)) (<)`
-implies `CovariantClass M M (swap (*)) (≤)`, see
-`RightCancelSemigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le`. -/
-@[to_additive]
-theorem Mul.to_covariantClass_right (M : Type*) [Mul M] [PartialOrder M]
-    [CovariantClass M M (swap (· * ·)) (· < ·)] :
-    CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
-  ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
-#align has_mul.to_covariant_class_right Mul.to_covariantClass_right
-#align has_add.to_covariant_class_right Add.to_covariantClass_right
+#noalign has_mul.to_covariant_class_left
+#noalign has_add.to_covariant_class_left
+#noalign has_mul.to_covariant_class_right
+#noalign has_add.to_covariant_class_right
 
 end OrderedInstances
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -20,12 +20,12 @@ open Function
 
 universe u
 
-variable {α : Type u} {β : Type _}
+variable {α : Type u} {β : Type*}
 
 /-- An ordered commutative monoid is a commutative monoid
 with a partial order such that `a ≤ b → c * a ≤ c * b` (multiplication is monotone)
 -/
-class OrderedCommMonoid (α : Type _) extends CommMonoid α, PartialOrder α where
+class OrderedCommMonoid (α : Type*) extends CommMonoid α, PartialOrder α where
   /-- Multiplication is monotone in an `OrderedCommMonoid`. -/
   protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c : α, c * a ≤ c * b
 #align ordered_comm_monoid OrderedCommMonoid
@@ -33,7 +33,7 @@ class OrderedCommMonoid (α : Type _) extends CommMonoid α, PartialOrder α whe
 /-- An ordered (additive) commutative monoid is a commutative monoid
   with a partial order such that `a ≤ b → c + a ≤ c + b` (addition is monotone)
 -/
-class OrderedAddCommMonoid (α : Type _) extends AddCommMonoid α, PartialOrder α where
+class OrderedAddCommMonoid (α : Type*) extends AddCommMonoid α, PartialOrder α where
   /-- Addition is monotone in an `OrderedAddCommMonoid`. -/
   protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c : α, c + a ≤ c + b
 #align ordered_add_comm_monoid OrderedAddCommMonoid
@@ -43,7 +43,7 @@ attribute [to_additive] OrderedCommMonoid
 section OrderedInstances
 
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.to_covariantClass_left (M : Type*) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·) where
   elim := fun a _ _ bc ↦ OrderedCommMonoid.mul_le_mul_left _ _ bc a
 #align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
@@ -52,7 +52,7 @@ instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoi
 /- This instance can be proven with `by infer_instance`.  However, `WithBot ℕ` does not
 pick up a `CovariantClass M M (function.swap (*)) (≤)` instance without it (see PR mathlib#7940). -/
 @[to_additive]
-instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.to_covariantClass_right (M : Type*) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   covariant_swap_mul_le_of_covariant_mul_le M
 #align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
@@ -62,7 +62,7 @@ instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMono
 `LeftCancelSemigroup` with a `PartialOrder`, assuming `CovariantClass M M (*) (≤)` implies
 `CovariantClass M M (*) (<)`, see `LeftCancelSemigroup.covariant_mul_lt_of_covariant_mul_le`. -/
 @[to_additive]
-theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
+theorem Mul.to_covariantClass_left (M : Type*) [Mul M] [PartialOrder M]
     [CovariantClass M M (· * ·) (· < ·)] :
     CovariantClass M M (· * ·) (· ≤ ·) :=
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
@@ -74,7 +74,7 @@ theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
 implies `CovariantClass M M (swap (*)) (≤)`, see
 `RightCancelSemigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le`. -/
 @[to_additive]
-theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
+theorem Mul.to_covariantClass_right (M : Type*) [Mul M] [PartialOrder M]
     [CovariantClass M M (swap (· * ·)) (· < ·)] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
@@ -89,19 +89,19 @@ set_option linter.deprecated false in
 #align bit0_pos bit0_pos
 
 /-- A linearly ordered additive commutative monoid. -/
-class LinearOrderedAddCommMonoid (α : Type _) extends LinearOrder α, OrderedAddCommMonoid α
+class LinearOrderedAddCommMonoid (α : Type*) extends LinearOrder α, OrderedAddCommMonoid α
 #align linear_ordered_add_comm_monoid LinearOrderedAddCommMonoid
 
 /-- A linearly ordered commutative monoid. -/
 @[to_additive]
-class LinearOrderedCommMonoid (α : Type _) extends LinearOrder α, OrderedCommMonoid α
+class LinearOrderedCommMonoid (α : Type*) extends LinearOrder α, OrderedCommMonoid α
 #align linear_ordered_comm_monoid LinearOrderedCommMonoid
 
 attribute [to_additive existing] LinearOrderedCommMonoid.toOrderedCommMonoid
 
 /-- A linearly ordered commutative monoid with an additively absorbing `⊤` element.
   Instances should include number systems with an infinite element adjoined. -/
-class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCommMonoid α,
+class LinearOrderedAddCommMonoidWithTop (α : Type*) extends LinearOrderedAddCommMonoid α,
     Top α where
   /-- In a `LinearOrderedAddCommMonoidWithTop`, the `⊤` element is larger than any other element.-/
   protected le_top : ∀ x : α, x ≤ ⊤
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2016 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
-
-! This file was ported from Lean 3 source module algebra.order.monoid.defs
-! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Monoid.Lemmas
 import Mathlib.Order.BoundedOrder
 
+#align_import algebra.order.monoid.defs from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
+
 /-!
 # Ordered monoids
 
chore: fix backtick in docs (#5077)

I wrote a script to find lines that contain an odd number of backticks

Diff
@@ -103,7 +103,7 @@ class LinearOrderedCommMonoid (α : Type _) extends LinearOrder α, OrderedCommM
 attribute [to_additive existing] LinearOrderedCommMonoid.toOrderedCommMonoid
 
 /-- A linearly ordered commutative monoid with an additively absorbing `⊤` element.
-  Instances should include number systems with an infinite element adjoined.` -/
+  Instances should include number systems with an infinite element adjoined. -/
 class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCommMonoid α,
     Top α where
   /-- In a `LinearOrderedAddCommMonoidWithTop`, the `⊤` element is larger than any other element.-/
chore: fix tactic usage in docs (#4179)
Diff
@@ -52,7 +52,7 @@ instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoi
 #align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
 #align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
 
-/- This instance can be proven with `by apply_instance`.  However, `WithBot ℕ` does not
+/- This instance can be proven with `by infer_instance`.  However, `WithBot ℕ` does not
 pick up a `CovariantClass M M (function.swap (*)) (≤)` instance without it (see PR mathlib#7940). -/
 @[to_additive]
 instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMonoid M] :
feat: add to_additive linter checking whether additive decl exists (#1881)
  • Force the user to specify whether the additive declaration already exists.
  • Will raise a linter error if the user specified it wrongly
  • Requested on Zulip
Diff
@@ -100,7 +100,7 @@ class LinearOrderedAddCommMonoid (α : Type _) extends LinearOrder α, OrderedAd
 class LinearOrderedCommMonoid (α : Type _) extends LinearOrder α, OrderedCommMonoid α
 #align linear_ordered_comm_monoid LinearOrderedCommMonoid
 
-attribute [to_additive] LinearOrderedCommMonoid.toOrderedCommMonoid
+attribute [to_additive existing] LinearOrderedCommMonoid.toOrderedCommMonoid
 
 /-- A linearly ordered commutative monoid with an additively absorbing `⊤` element.
   Instances should include number systems with an infinite element adjoined.` -/
chore: the style linter shouldn't complain about long #align lines (#1643)
Diff
@@ -116,8 +116,7 @@ class LinearOrderedAddCommMonoidWithTop (α : Type _) extends LinearOrderedAddCo
 instance (priority := 100) LinearOrderedAddCommMonoidWithTop.toOrderTop (α : Type u)
     [h : LinearOrderedAddCommMonoidWithTop α] : OrderTop α :=
   { h with }
-#align linear_ordered_add_comm_monoid_with_top.to_order_top
-  LinearOrderedAddCommMonoidWithTop.toOrderTop
+#align linear_ordered_add_comm_monoid_with_top.to_order_top LinearOrderedAddCommMonoidWithTop.toOrderTop
 
 section LinearOrderedAddCommMonoidWithTop
 
chore: fix more casing errors per naming scheme (#1232)

I've avoided anything under Tactic or test.

In correcting the names, I found Option.isNone_iff_eq_none duplicated between Std and Mathlib, so the Mathlib one has been removed.

Co-authored-by: Reid Barton <rwbarton@gmail.com>

Diff
@@ -46,43 +46,43 @@ attribute [to_additive] OrderedCommMonoid
 section OrderedInstances
 
 @[to_additive]
-instance OrderedCommMonoid.to_CovariantClass_left (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.to_covariantClass_left (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (· * ·) (· ≤ ·) where
   elim := fun a _ _ bc ↦ OrderedCommMonoid.mul_le_mul_left _ _ bc a
-#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_CovariantClass_left
-#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_CovariantClass_left
+#align ordered_comm_monoid.to_covariant_class_left OrderedCommMonoid.to_covariantClass_left
+#align ordered_add_comm_monoid.to_covariant_class_left OrderedAddCommMonoid.to_covariantClass_left
 
 /- This instance can be proven with `by apply_instance`.  However, `WithBot ℕ` does not
 pick up a `CovariantClass M M (function.swap (*)) (≤)` instance without it (see PR mathlib#7940). -/
 @[to_additive]
-instance OrderedCommMonoid.to_CovariantClass_right (M : Type _) [OrderedCommMonoid M] :
+instance OrderedCommMonoid.to_covariantClass_right (M : Type _) [OrderedCommMonoid M] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   covariant_swap_mul_le_of_covariant_mul_le M
-#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_CovariantClass_right
-#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_CovariantClass_right
+#align ordered_comm_monoid.to_covariant_class_right OrderedCommMonoid.to_covariantClass_right
+#align ordered_add_comm_monoid.to_covariant_class_right OrderedAddCommMonoid.to_covariantClass_right
 
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `LeftCancelSemigroup` with a `PartialOrder`, assuming `CovariantClass M M (*) (≤)` implies
 `CovariantClass M M (*) (<)`, see `LeftCancelSemigroup.covariant_mul_lt_of_covariant_mul_le`. -/
 @[to_additive]
-theorem Mul.to_CovariantClass_left (M : Type _) [Mul M] [PartialOrder M]
+theorem Mul.to_covariantClass_left (M : Type _) [Mul M] [PartialOrder M]
     [CovariantClass M M (· * ·) (· < ·)] :
     CovariantClass M M (· * ·) (· ≤ ·) :=
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
-#align has_mul.to_covariant_class_left Mul.to_CovariantClass_left
-#align has_add.to_covariant_class_left Add.to_CovariantClass_left
+#align has_mul.to_covariant_class_left Mul.to_covariantClass_left
+#align has_add.to_covariant_class_left Add.to_covariantClass_left
 
 /- This is not an instance, to avoid creating a loop in the type-class system: in a
 `RightCancelSemigroup` with a `PartialOrder`, assuming `CovariantClass M M (swap (*)) (<)`
 implies `CovariantClass M M (swap (*)) (≤)`, see
 `RightCancelSemigroup.covariant_swap_mul_lt_of_covariant_swap_mul_le`. -/
 @[to_additive]
-theorem Mul.to_CovariantClass_right (M : Type _) [Mul M] [PartialOrder M]
+theorem Mul.to_covariantClass_right (M : Type _) [Mul M] [PartialOrder M]
     [CovariantClass M M (swap (· * ·)) (· < ·)] :
     CovariantClass M M (swap (· * ·)) (· ≤ ·) :=
   ⟨covariant_le_of_covariant_lt _ _ _ CovariantClass.elim⟩
-#align has_mul.to_covariant_class_right Mul.to_CovariantClass_right
-#align has_add.to_covariant_class_right Add.to_CovariantClass_right
+#align has_mul.to_covariant_class_right Mul.to_covariantClass_right
+#align has_add.to_covariant_class_right Add.to_covariantClass_right
 
 end OrderedInstances
 
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -2,6 +2,11 @@
 Copyright (c) 2016 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
+
+! This file was ported from Lean 3 source module algebra.order.monoid.defs
+! leanprover-community/mathlib commit 70d50ecfd4900dd6d328da39ab7ebd516abe4025
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Monoid.Lemmas
 import Mathlib.Order.BoundedOrder

Dependencies 27

28 files ported (100.0%)
14151 lines ported (100.0%)

All dependencies are ported!