algebra.order.monoid.basicMathlib.Algebra.Order.Monoid.Basic

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,9 +3,9 @@ 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.Defs
-import Mathbin.Algebra.Group.InjSurj
-import Mathbin.Order.Hom.Basic
+import Algebra.Order.Monoid.Defs
+import Algebra.Group.InjSurj
+import Order.Hom.Basic
 
 #align_import algebra.order.monoid.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,16 +2,13 @@
 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.basic
-! 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.Defs
 import Mathbin.Algebra.Group.InjSurj
 import Mathbin.Order.Hom.Basic
 
+#align_import algebra.order.monoid.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Ordered monoids
 
Diff
@@ -28,6 +28,7 @@ universe u
 
 variable {α : Type u} {β : Type _}
 
+#print Function.Injective.orderedCommMonoid /-
 /-- Pullback an `ordered_comm_monoid` under an injective map.
 See note [reducible non-instances]. -/
 @[reducible,
@@ -42,7 +43,9 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
       show f (c * a) ≤ f (c * b) by rw [mul, mul]; apply mul_le_mul_left'; exact ab }
 #align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoid
 #align function.injective.ordered_add_comm_monoid Function.Injective.orderedAddCommMonoid
+-/
 
+#print Function.Injective.linearOrderedCommMonoid /-
 /-- Pullback a `linear_ordered_comm_monoid` under an injective map.
 See note [reducible non-instances]. -/
 @[reducible,
@@ -56,6 +59,7 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
   { hf.OrderedCommMonoid f one mul npow, LinearOrder.lift f hf hsup hinf with }
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
 #align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
+-/
 
 #print OrderEmbedding.mulLeft /-
 -- TODO find a better home for the next two constructions.
Diff
@@ -57,6 +57,7 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
 #align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
 
+#print OrderEmbedding.mulLeft /-
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `order_iso.mul_left` when working in an ordered group. -/
@@ -68,7 +69,9 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α] [CovariantCla
   OrderEmbedding.ofStrictMono (fun n => m * n) fun a b w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 #align order_embedding.add_left OrderEmbedding.addLeft
+-/
 
+#print OrderEmbedding.mulRight /-
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `order_iso.mul_right` when working in an ordered group. -/
 @[to_additive
@@ -79,4 +82,5 @@ def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
   OrderEmbedding.ofStrictMono (fun n => n * m) fun a b w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
 #align order_embedding.add_right OrderEmbedding.addRight
+-/
 
Diff
@@ -28,12 +28,6 @@ universe u
 
 variable {α : Type u} {β : Type _}
 
-/- warning: function.injective.ordered_comm_monoid -> Function.Injective.orderedCommMonoid is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : OrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))) (f x) n)) -> (OrderedCommMonoid.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : OrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))) (f x) n)) -> (OrderedCommMonoid.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoidₓ'. -/
 /-- Pullback an `ordered_comm_monoid` under an injective map.
 See note [reducible non-instances]. -/
 @[reducible,
@@ -49,12 +43,6 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
 #align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoid
 #align function.injective.ordered_add_comm_monoid Function.Injective.orderedAddCommMonoid
 
-/- warning: function.injective.linear_ordered_comm_monoid -> Function.Injective.linearOrderedCommMonoid is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : Sup.{u2} β] [_inst_6 : Inf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Sup.sup.{u2} β _inst_5 x y)) (LinearOrder.max.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Inf.inf.{u2} β _inst_6 x y)) (LinearOrder.min.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : Sup.{u2} β] [_inst_6 : Inf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Sup.sup.{u2} β _inst_5 x y)) (Max.max.{u1} α (LinearOrder.toMax.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Inf.inf.{u2} β _inst_6 x y)) (Min.min.{u1} α (LinearOrder.toMin.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoidₓ'. -/
 /-- Pullback a `linear_ordered_comm_monoid` under an injective map.
 See note [reducible non-instances]. -/
 @[reducible,
@@ -69,12 +57,6 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
 #align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
 
-/- warning: order_embedding.mul_left -> OrderEmbedding.mulLeft is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.376 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.378 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.376 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.378) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.391 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.393 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.391 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.393)], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))))
-Case conversion may be inaccurate. Consider using '#align order_embedding.mul_left OrderEmbedding.mulLeftₓ'. -/
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `order_iso.mul_left` when working in an ordered group. -/
@@ -87,12 +69,6 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α] [CovariantCla
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 #align order_embedding.add_left OrderEmbedding.addLeft
 
-/- warning: order_embedding.mul_right -> OrderEmbedding.mulRight is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (Function.swap.{succ u1, succ u1, succ u1} α α (fun (ᾰ : α) (ᾰ : α) => α) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1))) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (Function.swap.{succ u1, succ u1, succ u1} α α (fun (ᾰ : α) (ᾰ : α) => α) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.459 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.461 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.459 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.461)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.474 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.476 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.474 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.476)], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))))
-Case conversion may be inaccurate. Consider using '#align order_embedding.mul_right OrderEmbedding.mulRightₓ'. -/
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `order_iso.mul_right` when working in an ordered group. -/
 @[to_additive
Diff
@@ -45,10 +45,7 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
     OrderedCommMonoid β :=
   { PartialOrder.lift f hf, hf.CommMonoid f one mul npow with
     mul_le_mul_left := fun a b ab c =>
-      show f (c * a) ≤ f (c * b) by
-        rw [mul, mul]
-        apply mul_le_mul_left'
-        exact ab }
+      show f (c * a) ≤ f (c * b) by rw [mul, mul]; apply mul_le_mul_left'; exact ab }
 #align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoid
 #align function.injective.ordered_add_comm_monoid Function.Injective.orderedAddCommMonoid
 
Diff
@@ -72,7 +72,12 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
 #align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
 
-#print OrderEmbedding.mulLeft /-
+/- warning: order_embedding.mul_left -> OrderEmbedding.mulLeft is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.376 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.378 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.376 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.378) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.391 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.393 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.391 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.393)], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))))
+Case conversion may be inaccurate. Consider using '#align order_embedding.mul_left OrderEmbedding.mulLeftₓ'. -/
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `order_iso.mul_left` when working in an ordered group. -/
@@ -84,9 +89,13 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α] [CovariantCla
   OrderEmbedding.ofStrictMono (fun n => m * n) fun a b w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 #align order_embedding.add_left OrderEmbedding.addLeft
--/
 
-#print OrderEmbedding.mulRight /-
+/- warning: order_embedding.mul_right -> OrderEmbedding.mulRight is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (Function.swap.{succ u1, succ u1, succ u1} α α (fun (ᾰ : α) (ᾰ : α) => α) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1))) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (LinearOrder.toLattice.{u1} α _inst_2))))))
+but is expected to have type
+  forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : LinearOrder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (Function.swap.{succ u1, succ u1, succ u1} α α (fun (ᾰ : α) (ᾰ : α) => α) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.459 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.461 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.459 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.461)) (fun (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.474 : α) (x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.476 : α) => LT.lt.{u1} α (Preorder.toLT.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.474 x._@.Mathlib.Algebra.Order.Monoid.Basic._hyg.476)], α -> (OrderEmbedding.{u1, u1} α α (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (SemilatticeInf.toPartialOrder.{u1} α (Lattice.toSemilatticeInf.{u1} α (DistribLattice.toLattice.{u1} α (instDistribLattice.{u1} α _inst_2)))))))
+Case conversion may be inaccurate. Consider using '#align order_embedding.mul_right OrderEmbedding.mulRightₓ'. -/
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `order_iso.mul_right` when working in an ordered group. -/
 @[to_additive
@@ -97,5 +106,4 @@ def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
   OrderEmbedding.ofStrictMono (fun n => n * m) fun a b w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
 #align order_embedding.add_right OrderEmbedding.addRight
--/
 
Diff
@@ -54,9 +54,9 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
 
 /- warning: function.injective.linear_ordered_comm_monoid -> Function.Injective.linearOrderedCommMonoid is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : HasSup.{u2} β] [_inst_6 : HasInf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HasSup.sup.{u2} β _inst_5 x y)) (LinearOrder.max.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HasInf.inf.{u2} β _inst_6 x y)) (LinearOrder.min.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
+  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : Sup.{u2} β] [_inst_6 : Inf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (OrderedCommMonoid.toCommMonoid.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α _inst_1))))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Sup.sup.{u2} β _inst_5 x y)) (LinearOrder.max.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Inf.inf.{u2} β _inst_6 x y)) (LinearOrder.min.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : HasSup.{u2} β] [_inst_6 : HasInf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HasSup.sup.{u2} β _inst_5 x y)) (Max.max.{u1} α (LinearOrder.toMax.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HasInf.inf.{u2} β _inst_6 x y)) (Min.min.{u1} α (LinearOrder.toMin.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
+  forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoid.{u1} α] {β : Type.{u2}} [_inst_2 : One.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : Pow.{u2, 0} β Nat] [_inst_5 : Sup.{u2} β] [_inst_6 : Inf.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Monoid.toOne.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toMul.{u1} α (Monoid.toMulOneClass.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_4) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (CommMonoid.toMonoid.{u1} α (LinearOrderedCommMonoid.toCommMonoid.{u1} α _inst_1)))) (f x) n)) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Sup.sup.{u2} β _inst_5 x y)) (Max.max.{u1} α (LinearOrder.toMax.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (Inf.inf.{u2} β _inst_6 x y)) (Min.min.{u1} α (LinearOrder.toMin.{u1} α (LinearOrderedCommMonoid.toLinearOrder.{u1} α _inst_1)) (f x) (f y))) -> (LinearOrderedCommMonoid.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoidₓ'. -/
 /-- Pullback a `linear_ordered_comm_monoid` under an injective map.
 See note [reducible non-instances]. -/
@@ -64,7 +64,7 @@ See note [reducible non-instances]. -/
   to_additive Function.Injective.linearOrderedAddCommMonoid
       "Pullback an `ordered_add_comm_monoid` under an injective map."]
 def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type _} [One β]
-    [Mul β] [Pow β ℕ] [HasSup β] [HasInf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
+    [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
     LinearOrderedCommMonoid β :=

Changes in mathlib4

mathlib3
mathlib4
perf: Use spread notation in ring transfer definitions (#10131)

Make sure that Function.Injective.somethingRing looks like

def ... : SomethingRing β where
  toA := hf.a f ...
  __ := hf.b f ...
  __ := hf.c f ...

if SomethingRing α extends A α, B α, C α.

This should hopefully give a performance boost in applications.

Incidentally, there were a few missing transfer definitions, so I added them as I needed them.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -28,42 +28,40 @@ See note [reducible non-instances]. -/
 def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type*} [One β] [Mul β]
     [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
-    OrderedCommMonoid β :=
-  { PartialOrder.lift f hf,
-    hf.commMonoid f one mul npow with
-    mul_le_mul_left := fun a b ab c =>
-      show f (c * a) ≤ f (c * b) by
-        rw [mul, mul]
-        apply mul_le_mul_left'
-        exact ab }
+    OrderedCommMonoid β where
+  toCommMonoid := hf.commMonoid f one mul npow
+  toPartialOrder := PartialOrder.lift f hf
+  mul_le_mul_left a b ab c := show f (c * a) ≤ f (c * b) by
+    rw [mul, mul]; apply mul_le_mul_left'; exact ab
 #align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoid
 #align function.injective.ordered_add_comm_monoid Function.Injective.orderedAddCommMonoid
 
-/-- Pullback a `LinearOrderedCommMonoid` under an injective map.
-See note [reducible non-instances]. -/
-@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
-def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type*} [One β]
-    [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
-    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
-    LinearOrderedCommMonoid β :=
-  { hf.orderedCommMonoid f one mul npow, LinearOrder.lift f hf hsup hinf with }
-#align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
-#align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
-
 /-- Pullback an `OrderedCancelCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
 @[to_additive (attr := reducible) Function.Injective.orderedCancelAddCommMonoid
     "Pullback an `OrderedCancelAddCommMonoid` under an injective map."]
 def Function.Injective.orderedCancelCommMonoid [OrderedCancelCommMonoid α] [One β] [Mul β] [Pow β ℕ]
     (f : β → α) (hf : Injective f) (one : f 1 = 1) (mul : ∀ x y, f (x * y) = f x * f y)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) : OrderedCancelCommMonoid β :=
-  { hf.orderedCommMonoid f one mul npow with
-    le_of_mul_le_mul_left := fun a b c (bc : f (a * b) ≤ f (a * c)) ↦
-      (mul_le_mul_iff_left (f a)).mp (by rwa [← mul, ← mul]) }
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) : OrderedCancelCommMonoid β where
+  toOrderedCommMonoid := hf.orderedCommMonoid f one mul npow
+  le_of_mul_le_mul_left a b c (bc : f (a * b) ≤ f (a * c)) :=
+    (mul_le_mul_iff_left (f a)).1 (by rwa [← mul, ← mul])
 #align function.injective.ordered_cancel_comm_monoid Function.Injective.orderedCancelCommMonoid
 #align function.injective.ordered_cancel_add_comm_monoid Function.Injective.orderedCancelAddCommMonoid
 
+/-- Pullback a `LinearOrderedCommMonoid` under an injective map.
+See note [reducible non-instances]. -/
+@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
+def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type*} [One β]
+    [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
+    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+    (sup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (inf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
+    LinearOrderedCommMonoid β where
+  toOrderedCommMonoid := hf.orderedCommMonoid f one mul npow
+  __ := LinearOrder.lift f hf sup inf
+#align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
+#align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
+
 /-- Pullback a `LinearOrderedCancelCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
 @[to_additive (attr := reducible) Function.Injective.linearOrderedCancelAddCommMonoid
@@ -72,9 +70,9 @@ def Function.Injective.linearOrderedCancelCommMonoid [LinearOrderedCancelCommMon
     [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
-    LinearOrderedCancelCommMonoid β :=
-  { hf.linearOrderedCommMonoid f one mul npow hsup hinf,
-    hf.orderedCancelCommMonoid f one mul npow with }
+    LinearOrderedCancelCommMonoid β where
+  toOrderedCancelCommMonoid := hf.orderedCancelCommMonoid f one mul npow
+  __ := hf.linearOrderedCommMonoid f one mul npow hsup hinf
 #align function.injective.linear_ordered_cancel_comm_monoid Function.Injective.linearOrderedCancelCommMonoid
 #align function.injective.linear_ordered_cancel_add_comm_monoid Function.Injective.linearOrderedCancelAddCommMonoid
 
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
@@ -51,6 +51,33 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
 #align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
 
+/-- Pullback an `OrderedCancelCommMonoid` under an injective map.
+See note [reducible non-instances]. -/
+@[to_additive (attr := reducible) Function.Injective.orderedCancelAddCommMonoid
+    "Pullback an `OrderedCancelAddCommMonoid` under an injective map."]
+def Function.Injective.orderedCancelCommMonoid [OrderedCancelCommMonoid α] [One β] [Mul β] [Pow β ℕ]
+    (f : β → α) (hf : Injective f) (one : f 1 = 1) (mul : ∀ x y, f (x * y) = f x * f y)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) : OrderedCancelCommMonoid β :=
+  { hf.orderedCommMonoid f one mul npow with
+    le_of_mul_le_mul_left := fun a b c (bc : f (a * b) ≤ f (a * c)) ↦
+      (mul_le_mul_iff_left (f a)).mp (by rwa [← mul, ← mul]) }
+#align function.injective.ordered_cancel_comm_monoid Function.Injective.orderedCancelCommMonoid
+#align function.injective.ordered_cancel_add_comm_monoid Function.Injective.orderedCancelAddCommMonoid
+
+/-- Pullback a `LinearOrderedCancelCommMonoid` under an injective map.
+See note [reducible non-instances]. -/
+@[to_additive (attr := reducible) Function.Injective.linearOrderedCancelAddCommMonoid
+    "Pullback a `LinearOrderedCancelAddCommMonoid` under an injective map."]
+def Function.Injective.linearOrderedCancelCommMonoid [LinearOrderedCancelCommMonoid α] [One β]
+    [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Injective f) (one : f 1 = 1)
+    (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+    (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
+    LinearOrderedCancelCommMonoid β :=
+  { hf.linearOrderedCommMonoid f one mul npow hsup hinf,
+    hf.orderedCancelCommMonoid f one mul npow with }
+#align function.injective.linear_ordered_cancel_comm_monoid Function.Injective.linearOrderedCancelCommMonoid
+#align function.injective.linear_ordered_cancel_add_comm_monoid Function.Injective.linearOrderedCancelAddCommMonoid
+
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `OrderIso.mulLeft` when working in an ordered group. -/
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
@@ -77,16 +77,3 @@ def OrderEmbedding.mulRight {α : Type*} [Mul α] [LinearOrder α]
 #align order_embedding.add_right OrderEmbedding.addRight
 #align order_embedding.mul_right_apply OrderEmbedding.mulRight_apply
 #align order_embedding.add_right_apply OrderEmbedding.addRight_apply
-
-@[to_additive]
-theorem eq_and_eq_of_le_of_le_of_mul_le [Mul α] [LinearOrder α]
-    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (Function.swap (· * ·)) (· < ·)]
-    [ContravariantClass α α (· * ·) (· ≤ ·)] {a b a0 b0 : α} (ha : a0 ≤ a) (hb : b0 ≤ b)
-    (ab : a * b ≤ a0 * b0) : a = a0 ∧ b = b0 := by
-  haveI := Mul.to_covariantClass_right α
-  have ha' : ¬a0 * b0 < a * b → ¬a0 < a := mt (mul_lt_mul_of_lt_of_le · hb)
-  have hb' : ¬a0 * b0 < a * b → ¬b0 < b := mt (mul_lt_mul_of_le_of_lt ha ·)
-  push_neg at ha' hb'
-  exact ⟨ha.antisymm' (ha' ab), hb.antisymm' (hb' ab)⟩
-#align eq_and_eq_of_le_of_le_of_mul_le eq_and_eq_of_le_of_le_of_mul_le
-#align eq_and_eq_of_le_of_le_of_add_le eq_and_eq_of_le_of_le_of_add_le
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*}
 
 /-- Pullback an `OrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
 @[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
-def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [One β] [Mul β]
+def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type*} [One β] [Mul β]
     [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
     OrderedCommMonoid β :=
@@ -42,7 +42,7 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
 /-- Pullback a `LinearOrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
 @[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
-def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type _} [One β]
+def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type*} [One β]
     [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
@@ -57,7 +57,7 @@ See also `OrderIso.mulLeft` when working in an ordered group. -/
 @[to_additive (attr := simps!)
       "The order embedding sending `b` to `a + b`, for some fixed `a`.
        See also `OrderIso.addLeft` when working in an additive ordered group."]
-def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
+def OrderEmbedding.mulLeft {α : Type*} [Mul α] [LinearOrder α]
     [CovariantClass α α (· * ·) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => m * n) fun _ _ w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
@@ -70,7 +70,7 @@ See also `OrderIso.mulRight` when working in an ordered group. -/
 @[to_additive (attr := simps!)
       "The order embedding sending `b` to `b + a`, for some fixed `a`.
        See also `OrderIso.addRight` when working in an additive ordered group."]
-def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
+def OrderEmbedding.mulRight {α : Type*} [Mul α] [LinearOrder α]
     [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => n * m) fun _ _ w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
chore(Algebra/{ Group/UniqueProds, Order/Monoid/Basic }): move eq_and_eq_of_le_of_le_of_mul_le earlier (#6483)

This move was suggested in #6220. In fact, the lemma is a general fact about an inequality involving multiplications and did not really belong in the file where it was.

Affected files:

Algebra.Group.UniqueProds
Algebra.Order.Monoid.Basic
Diff
@@ -77,3 +77,16 @@ def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
 #align order_embedding.add_right OrderEmbedding.addRight
 #align order_embedding.mul_right_apply OrderEmbedding.mulRight_apply
 #align order_embedding.add_right_apply OrderEmbedding.addRight_apply
+
+@[to_additive]
+theorem eq_and_eq_of_le_of_le_of_mul_le [Mul α] [LinearOrder α]
+    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (Function.swap (· * ·)) (· < ·)]
+    [ContravariantClass α α (· * ·) (· ≤ ·)] {a b a0 b0 : α} (ha : a0 ≤ a) (hb : b0 ≤ b)
+    (ab : a * b ≤ a0 * b0) : a = a0 ∧ b = b0 := by
+  haveI := Mul.to_covariantClass_right α
+  have ha' : ¬a0 * b0 < a * b → ¬a0 < a := mt (mul_lt_mul_of_lt_of_le · hb)
+  have hb' : ¬a0 * b0 < a * b → ¬b0 < b := mt (mul_lt_mul_of_le_of_lt ha ·)
+  push_neg at ha' hb'
+  exact ⟨ha.antisymm' (ha' ab), hb.antisymm' (hb' ab)⟩
+#align eq_and_eq_of_le_of_le_of_mul_le eq_and_eq_of_le_of_le_of_mul_le
+#align eq_and_eq_of_le_of_le_of_add_le eq_and_eq_of_le_of_le_of_add_le
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,16 +2,13 @@
 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.basic
-! leanprover-community/mathlib commit 9b2660e1b25419042c8da10bf411aa3c67f14383
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Monoid.Defs
 import Mathlib.Algebra.Group.InjSurj
 import Mathlib.Order.Hom.Basic
 
+#align_import algebra.order.monoid.basic from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
+
 /-!
 # Ordered monoids
 
Fix: Move more attributes to the attr argument of to_additive (#2558)
Diff
@@ -27,8 +27,7 @@ variable {α : Type u} {β : Type _}
 
 /-- Pullback an `OrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
-@[reducible,
-  to_additive "Pullback an `OrderedAddCommMonoid` under an injective map."]
+@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
 def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [One β] [Mul β]
     [Pow β ℕ] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) :
@@ -45,8 +44,7 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
 
 /-- Pullback a `LinearOrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
-@[reducible,
-  to_additive "Pullback an `OrderedAddCommMonoid` under an injective map."]
+@[to_additive (attr := reducible) "Pullback an `OrderedAddCommMonoid` under an injective map."]
 def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type _} [One β]
     [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
refactor: rename HasSup/HasInf to Sup/Inf (#2475)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -48,7 +48,7 @@ See note [reducible non-instances]. -/
 @[reducible,
   to_additive "Pullback an `OrderedAddCommMonoid` under an injective map."]
 def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type _} [One β]
-    [Mul β] [Pow β ℕ] [HasSup β] [HasInf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
+    [Mul β] [Pow β ℕ] [Sup β] [Inf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (hsup : ∀ x y, f (x ⊔ y) = max (f x) (f y)) (hinf : ∀ x y, f (x ⊓ y) = min (f x) (f y)) :
     LinearOrderedCommMonoid β :=
feat: require @[simps!] if simps runs in expensive mode (#1885)
  • This does not change the behavior of simps, just raises a linter error if you run simps in a more expensive mode without writing !.
  • Fixed some incorrect occurrences of to_additive, simps. Will do that systematically in future PR.
  • Fix port of OmegaCompletePartialOrder.ContinuousHom.ofMono a bit

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -59,7 +59,7 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `OrderIso.mulLeft` when working in an ordered group. -/
-@[to_additive (attr := simps)
+@[to_additive (attr := simps!)
       "The order embedding sending `b` to `a + b`, for some fixed `a`.
        See also `OrderIso.addLeft` when working in an additive ordered group."]
 def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
@@ -72,7 +72,7 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `OrderIso.mulRight` when working in an ordered group. -/
-@[to_additive (attr := simps)
+@[to_additive (attr := simps!)
       "The order embedding sending `b` to `b + a`, for some fixed `a`.
        See also `OrderIso.addRight` when working in an additive ordered group."]
 def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
fix: use to_additive (attr := _) here and there (#2073)
Diff
@@ -59,26 +59,26 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
 See also `OrderIso.mulLeft` when working in an ordered group. -/
-@[to_additive
+@[to_additive (attr := simps)
       "The order embedding sending `b` to `a + b`, for some fixed `a`.
-       See also `OrderIso.addLeft` when working in an additive ordered group.",
-  simps]
+       See also `OrderIso.addLeft` when working in an additive ordered group."]
 def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (· * ·) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => m * n) fun _ _ w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 #align order_embedding.add_left OrderEmbedding.addLeft
 #align order_embedding.mul_left_apply OrderEmbedding.mulLeft_apply
+#align order_embedding.add_left_apply OrderEmbedding.addLeft_apply
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `OrderIso.mulRight` when working in an ordered group. -/
-@[to_additive
+@[to_additive (attr := simps)
       "The order embedding sending `b` to `b + a`, for some fixed `a`.
-       See also `OrderIso.addRight` when working in an additive ordered group.",
-  simps]
+       See also `OrderIso.addRight` when working in an additive ordered group."]
 def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => n * m) fun _ _ w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
 #align order_embedding.add_right OrderEmbedding.addRight
 #align order_embedding.mul_right_apply OrderEmbedding.mulRight_apply
+#align order_embedding.add_right_apply OrderEmbedding.addRight_apply
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -68,6 +68,7 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
   OrderEmbedding.ofStrictMono (fun n => m * n) fun _ _ w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 #align order_embedding.add_left OrderEmbedding.addLeft
+#align order_embedding.mul_left_apply OrderEmbedding.mulLeft_apply
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `OrderIso.mulRight` when working in an ordered group. -/
@@ -80,3 +81,4 @@ def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
   OrderEmbedding.ofStrictMono (fun n => n * m) fun _ _ w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
 #align order_embedding.add_right OrderEmbedding.addRight
+#align order_embedding.mul_right_apply OrderEmbedding.mulRight_apply
chore: add #align statements for to_additive decls (#1816)

Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>

Diff
@@ -41,6 +41,7 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
         apply mul_le_mul_left'
         exact ab }
 #align function.injective.ordered_comm_monoid Function.Injective.orderedCommMonoid
+#align function.injective.ordered_add_comm_monoid Function.Injective.orderedAddCommMonoid
 
 /-- Pullback a `LinearOrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
@@ -53,6 +54,7 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
     LinearOrderedCommMonoid β :=
   { hf.orderedCommMonoid f one mul npow, LinearOrder.lift f hf hsup hinf with }
 #align function.injective.linear_ordered_comm_monoid Function.Injective.linearOrderedCommMonoid
+#align function.injective.linear_ordered_add_comm_monoid Function.Injective.linearOrderedAddCommMonoid
 
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
@@ -65,6 +67,7 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (· * ·) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => m * n) fun _ _ w => mul_lt_mul_left' w m
 #align order_embedding.mul_left OrderEmbedding.mulLeft
+#align order_embedding.add_left OrderEmbedding.addLeft
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
 See also `OrderIso.mulRight` when working in an ordered group. -/
@@ -76,3 +79,4 @@ def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α :=
   OrderEmbedding.ofStrictMono (fun n => n * m) fun _ _ w => mul_lt_mul_right' w m
 #align order_embedding.mul_right OrderEmbedding.mulRight
+#align order_embedding.add_right OrderEmbedding.addRight
chore: fix a few docstrings (#1291)

Fix a few docstrings still using the mathlib3 naming convention -- hard to notice these things while porting, but easy to notice when clicking round the docs.

Diff
@@ -56,10 +56,10 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
-See also `OrderIso.mul_left` when working in an ordered group. -/
+See also `OrderIso.mulLeft` when working in an ordered group. -/
 @[to_additive
       "The order embedding sending `b` to `a + b`, for some fixed `a`.
-       See also `OrderIso.add_left` when working in an additive ordered group.",
+       See also `OrderIso.addLeft` when working in an additive ordered group.",
   simps]
 def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (· * ·) (· < ·)] (m : α) : α ↪o α :=
@@ -67,10 +67,10 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
-See also `OrderIso.mul_right` when working in an ordered group. -/
+See also `OrderIso.mulRight` when working in an ordered group. -/
 @[to_additive
       "The order embedding sending `b` to `b + a`, for some fixed `a`.
-       See also `OrderIso.add_right` when working in an additive ordered group.",
+       See also `OrderIso.addRight` when working in an additive ordered group.",
   simps]
 def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α :=
chore: fix casing per naming scheme (#1183)

Fix a lot of wrong casing mostly in the docstrings but also sometimes in def/theorem names. E.g. fin 2 --> Fin 2, add_monoid_hom --> AddMonoidHom

Remove \n from to_additive docstrings that were inserted by mathport.

Move files and directories with Gcd and Smul to GCD and SMul

Diff
@@ -45,7 +45,7 @@ def Function.Injective.orderedCommMonoid [OrderedCommMonoid α] {β : Type _} [O
 /-- Pullback a `LinearOrderedCommMonoid` under an injective map.
 See note [reducible non-instances]. -/
 @[reducible,
-  to_additive "Pullback an `ordered_add_comm_monoid` under an injective map."]
+  to_additive "Pullback an `OrderedAddCommMonoid` under an injective map."]
 def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β : Type _} [One β]
     [Mul β] [Pow β ℕ] [HasSup β] [HasInf β] (f : β → α) (hf : Function.Injective f) (one : f 1 = 1)
     (mul : ∀ x y, f (x * y) = f x * f y) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
@@ -56,10 +56,10 @@ def Function.Injective.linearOrderedCommMonoid [LinearOrderedCommMonoid α] {β
 
 -- TODO find a better home for the next two constructions.
 /-- The order embedding sending `b` to `a * b`, for some fixed `a`.
-See also `order_iso.mul_left` when working in an ordered group. -/
+See also `OrderIso.mul_left` when working in an ordered group. -/
 @[to_additive
       "The order embedding sending `b` to `a + b`, for some fixed `a`.
-       See also `order_iso.add_left` when working in an additive ordered group.",
+       See also `OrderIso.add_left` when working in an additive ordered group.",
   simps]
 def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (· * ·) (· < ·)] (m : α) : α ↪o α :=
@@ -67,10 +67,10 @@ def OrderEmbedding.mulLeft {α : Type _} [Mul α] [LinearOrder α]
 #align order_embedding.mul_left OrderEmbedding.mulLeft
 
 /-- The order embedding sending `b` to `b * a`, for some fixed `a`.
-See also `order_iso.mul_right` when working in an ordered group. -/
+See also `OrderIso.mul_right` when working in an ordered group. -/
 @[to_additive
       "The order embedding sending `b` to `b + a`, for some fixed `a`.
-       See also `order_iso.add_right` when working in an additive ordered group.",
+       See also `OrderIso.add_right` when working in an additive ordered group.",
   simps]
 def OrderEmbedding.mulRight {α : Type _} [Mul α] [LinearOrder α]
     [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α :=
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.basic
+! leanprover-community/mathlib commit 9b2660e1b25419042c8da10bf411aa3c67f14383
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Order.Monoid.Defs
 import Mathlib.Algebra.Group.InjSurj

Dependencies 45

46 files ported (100.0%)
20951 lines ported (100.0%)

All dependencies are ported!