algebra.order.monoid.with_zero.defs
⟷
Mathlib.Algebra.Order.Monoid.WithZero.Defs
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -5,7 +5,7 @@ Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
-/
import Algebra.Group.WithOne.Defs
import Algebra.Order.Monoid.Canonical.Defs
-import Algebra.Order.ZeroLeOne
+import Algebra.Order.ZeroLEOne
#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -167,7 +167,7 @@ protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a :
end WithZero
-section CanonicallyOrderedCommMonoid
+section CanonicallyOrderedAddCommMonoid
#print WithZero.existsAddOfLE /-
instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
@@ -198,7 +198,7 @@ instance WithZero.canonicallyOrderedAddCommMonoid {α : Type u} [CanonicallyOrde
#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddCommMonoid
-/
-end CanonicallyOrderedCommMonoid
+end CanonicallyOrderedAddCommMonoid
section CanonicallyLinearOrderedCommMonoid
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -36,11 +36,11 @@ instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
-/
-#print CanonicallyOrderedAddMonoid.toZeroLeOneClass /-
-instance (priority := 100) CanonicallyOrderedAddMonoid.toZeroLeOneClass
- [CanonicallyOrderedAddMonoid α] [One α] : ZeroLEOneClass α :=
+#print canonicallyOrderedAddCommMonoid.toZeroLeOneClass /-
+instance (priority := 100) canonicallyOrderedAddCommMonoid.toZeroLeOneClass
+ [CanonicallyOrderedAddCommMonoid α] [One α] : ZeroLEOneClass α :=
⟨zero_le 1⟩
-#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClass
+#align canonically_ordered_add_monoid.to_zero_le_one_class canonicallyOrderedAddCommMonoid.toZeroLeOneClass
-/
namespace WithZero
@@ -167,7 +167,7 @@ protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a :
end WithZero
-section CanonicallyOrderedMonoid
+section CanonicallyOrderedCommMonoid
#print WithZero.existsAddOfLE /-
instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
@@ -183,11 +183,11 @@ instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
#align with_zero.has_exists_add_of_le WithZero.existsAddOfLE
-/
-#print WithZero.canonicallyOrderedAddMonoid /-
+#print WithZero.canonicallyOrderedAddCommMonoid /-
-- This instance looks absurd: a monoid already has a zero
/-- Adding a new zero to a canonically ordered additive monoid produces another one. -/
-instance WithZero.canonicallyOrderedAddMonoid {α : Type u} [CanonicallyOrderedAddMonoid α] :
- CanonicallyOrderedAddMonoid (WithZero α) :=
+instance WithZero.canonicallyOrderedAddCommMonoid {α : Type u} [CanonicallyOrderedAddCommMonoid α] :
+ CanonicallyOrderedAddCommMonoid (WithZero α) :=
{ WithZero.orderBot, WithZero.orderedAddCommMonoid zero_le, WithZero.existsAddOfLE with
le_self_add := fun a b => by
apply WithZero.cases_on a
@@ -195,19 +195,20 @@ instance WithZero.canonicallyOrderedAddMonoid {α : Type u} [CanonicallyOrderedA
apply WithZero.cases_on b
· exact fun b' => le_rfl
· exact fun a' b' => WithZero.coe_le_coe.2 le_self_add }
-#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddMonoid
+#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddCommMonoid
-/
-end CanonicallyOrderedMonoid
+end CanonicallyOrderedCommMonoid
-section CanonicallyLinearOrderedMonoid
+section CanonicallyLinearOrderedCommMonoid
-#print WithZero.canonicallyLinearOrderedAddMonoid /-
-instance WithZero.canonicallyLinearOrderedAddMonoid (α : Type _)
- [CanonicallyLinearOrderedAddMonoid α] : CanonicallyLinearOrderedAddMonoid (WithZero α) :=
- { WithZero.canonicallyOrderedAddMonoid, WithZero.linearOrder with }
-#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddMonoid
+#print WithZero.canonicallyLinearOrderedAddCommMonoid /-
+instance WithZero.canonicallyLinearOrderedAddCommMonoid (α : Type _)
+ [CanonicallyLinearOrderedAddCommMonoid α] :
+ CanonicallyLinearOrderedAddCommMonoid (WithZero α) :=
+ { WithZero.canonicallyOrderedAddCommMonoid, WithZero.linearOrder with }
+#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddCommMonoid
-/
-end CanonicallyLinearOrderedMonoid
+end CanonicallyLinearOrderedCommMonoid
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -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.Group.WithOne.Defs
-import Mathbin.Algebra.Order.Monoid.Canonical.Defs
-import Mathbin.Algebra.Order.ZeroLeOne
+import Algebra.Group.WithOne.Defs
+import Algebra.Order.Monoid.Canonical.Defs
+import Algebra.Order.ZeroLeOne
#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -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.with_zero.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.Group.WithOne.Defs
import Mathbin.Algebra.Order.Monoid.Canonical.Defs
import Mathbin.Algebra.Order.ZeroLeOne
+#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
/-!
# Adjoining a zero element to an ordered monoid.
mathlib commit https://github.com/leanprover-community/mathlib/commit/6285167a053ad0990fc88e56c48ccd9fae6550eb
@@ -111,15 +111,19 @@ instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
-/
+#print WithZero.le_max_iff /-
@[simp]
theorem le_max_iff [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b c ↔ a ≤ max b c := by
simp only [WithZero.coe_le_coe, le_max_iff]
#align with_zero.le_max_iff WithZero.le_max_iff
+-/
+#print WithZero.min_le_iff /-
@[simp]
theorem min_le_iff [LinearOrder α] {a b c : α} : min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
simp only [WithZero.coe_le_coe, min_le_iff]
#align with_zero.min_le_iff WithZero.min_le_iff
+-/
instance [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
{ WithZero.commMonoidWithZero, WithZero.partialOrder with
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -32,15 +32,19 @@ class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMon
#align linear_ordered_comm_monoid_with_zero LinearOrderedCommMonoidWithZero
-/
+#print LinearOrderedCommMonoidWithZero.toZeroLeOneClass /-
instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
[LinearOrderedCommMonoidWithZero α] : ZeroLEOneClass α :=
{ ‹LinearOrderedCommMonoidWithZero α› with }
#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
+-/
+#print CanonicallyOrderedAddMonoid.toZeroLeOneClass /-
instance (priority := 100) CanonicallyOrderedAddMonoid.toZeroLeOneClass
[CanonicallyOrderedAddMonoid α] [One α] : ZeroLEOneClass α :=
⟨zero_le 1⟩
#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClass
+-/
namespace WithZero
@@ -67,9 +71,11 @@ theorem zero_lt_coe [Preorder α] (a : α) : (0 : WithZero α) < a :=
#align with_zero.zero_lt_coe WithZero.zero_lt_coe
-/
+#print WithZero.zero_eq_bot /-
theorem zero_eq_bot [Preorder α] : (0 : WithZero α) = ⊥ :=
rfl
#align with_zero.zero_eq_bot WithZero.zero_eq_bot
+-/
#print WithZero.coe_lt_coe /-
@[simp, norm_cast]
@@ -91,6 +97,7 @@ instance [Lattice α] : Lattice (WithZero α) :=
instance [LinearOrder α] : LinearOrder (WithZero α) :=
WithBot.linearOrder
+#print WithZero.covariantClass_mul_le /-
instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
[CovariantClass α α (· * ·) (· ≤ ·)] :
CovariantClass (WithZero α) (WithZero α) (· * ·) (· ≤ ·) :=
@@ -102,6 +109,7 @@ instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
rw [← coe_mul, ← coe_mul, coe_le_coe]
exact mul_le_mul_left' hbc' a
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
+-/
@[simp]
theorem le_max_iff [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b c ↔ a ≤ max b c := by
@@ -117,6 +125,7 @@ instance [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
{ WithZero.commMonoidWithZero, WithZero.partialOrder with
mul_le_mul_left := fun _ _ => mul_le_mul_left' }
+#print WithZero.covariantClass_add_le /-
protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
[CovariantClass α α (· + ·) (· ≤ ·)] (h : ∀ a : α, 0 ≤ a) :
CovariantClass (WithZero α) (WithZero α) (· + ·) (· ≤ ·) :=
@@ -134,7 +143,9 @@ protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
rw [← coe_add, ← coe_add, coe_le_coe]
exact add_le_add_left hbc' a
#align with_zero.covariant_class_add_le WithZero.covariantClass_add_le
+-/
+#print WithZero.orderedAddCommMonoid /-
/-
Note 1 : the below is not an instance because it requires `zero_le`. It seems
like a rather pathological definition because α already has a zero.
@@ -151,6 +162,7 @@ protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a :
{ WithZero.partialOrder, WithZero.addCommMonoid with
add_le_add_left := @add_le_add_left _ _ _ (WithZero.covariantClass_add_le zero_le) .. }
#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoid
+-/
end WithZero
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -27,7 +27,7 @@ variable {α : Type u}
#print LinearOrderedCommMonoidWithZero /-
/-- A linearly ordered commutative monoid with a zero element. -/
class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMonoid α,
- CommMonoidWithZero α where
+ CommMonoidWithZero α where
zero_le_one : (0 : α) ≤ 1
#align linear_ordered_comm_monoid_with_zero LinearOrderedCommMonoidWithZero
-/
@@ -149,7 +149,7 @@ See note [reducible non-instances].
protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a : α, 0 ≤ a) :
OrderedAddCommMonoid (WithZero α) :=
{ WithZero.partialOrder, WithZero.addCommMonoid with
- add_le_add_left := @add_le_add_left _ _ _ (WithZero.covariantClass_add_le zero_le).. }
+ add_le_add_left := @add_le_add_left _ _ _ (WithZero.covariantClass_add_le zero_le) .. }
#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoid
end WithZero
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -103,19 +103,15 @@ instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
exact mul_le_mul_left' hbc' a
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
-/- warning: with_zero.le_max_iff clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align with_zero.le_max_iff [anonymous]ₓ'. -/
@[simp]
-theorem [anonymous] [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b c ↔ a ≤ max b c := by
+theorem le_max_iff [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b c ↔ a ≤ max b c := by
simp only [WithZero.coe_le_coe, le_max_iff]
-#align with_zero.le_max_iff [anonymous]
+#align with_zero.le_max_iff WithZero.le_max_iff
-/- warning: with_zero.min_le_iff clashes with [anonymous] -> [anonymous]
-Case conversion may be inaccurate. Consider using '#align with_zero.min_le_iff [anonymous]ₓ'. -/
@[simp]
-theorem [anonymous] [LinearOrder α] {a b c : α} : min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
+theorem min_le_iff [LinearOrder α] {a b c : α} : min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
simp only [WithZero.coe_le_coe, min_le_iff]
-#align with_zero.min_le_iff [anonymous]
+#align with_zero.min_le_iff WithZero.min_le_iff
instance [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
{ WithZero.commMonoidWithZero, WithZero.partialOrder with
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -55,27 +55,35 @@ instance [PartialOrder α] : PartialOrder (WithZero α) :=
instance [Preorder α] : OrderBot (WithZero α) :=
WithBot.orderBot
+#print WithZero.zero_le /-
theorem zero_le [Preorder α] (a : WithZero α) : 0 ≤ a :=
bot_le
#align with_zero.zero_le WithZero.zero_le
+-/
+#print WithZero.zero_lt_coe /-
theorem zero_lt_coe [Preorder α] (a : α) : (0 : WithZero α) < a :=
WithBot.bot_lt_coe a
#align with_zero.zero_lt_coe WithZero.zero_lt_coe
+-/
theorem zero_eq_bot [Preorder α] : (0 : WithZero α) = ⊥ :=
rfl
#align with_zero.zero_eq_bot WithZero.zero_eq_bot
+#print WithZero.coe_lt_coe /-
@[simp, norm_cast]
theorem coe_lt_coe [Preorder α] {a b : α} : (a : WithZero α) < b ↔ a < b :=
WithBot.coe_lt_coe
#align with_zero.coe_lt_coe WithZero.coe_lt_coe
+-/
+#print WithZero.coe_le_coe /-
@[simp, norm_cast]
theorem coe_le_coe [Preorder α] {a b : α} : (a : WithZero α) ≤ b ↔ a ≤ b :=
WithBot.coe_le_coe
#align with_zero.coe_le_coe WithZero.coe_le_coe
+-/
instance [Lattice α] : Lattice (WithZero α) :=
WithBot.lattice
@@ -152,6 +160,7 @@ end WithZero
section CanonicallyOrderedMonoid
+#print WithZero.existsAddOfLE /-
instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
ExistsAddOfLE (WithZero α) :=
⟨fun a b => by
@@ -163,6 +172,7 @@ instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
obtain ⟨c, rfl⟩ := exists_add_of_le (WithZero.coe_le_coe.1 h)
exact ⟨c, rfl⟩⟩
#align with_zero.has_exists_add_of_le WithZero.existsAddOfLE
+-/
#print WithZero.canonicallyOrderedAddMonoid /-
-- This instance looks absurd: a monoid already has a zero
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -32,23 +32,11 @@ class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMon
#align linear_ordered_comm_monoid_with_zero LinearOrderedCommMonoidWithZero
-/
-/- warning: linear_ordered_comm_monoid_with_zero.to_zero_le_one_class -> LinearOrderedCommMonoidWithZero.toZeroLeOneClass is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoidWithZero.{u1} α], ZeroLEOneClass.{u1} α (MulZeroClass.toHasZero.{u1} α (MulZeroOneClass.toMulZeroClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (MulOneClass.toHasOne.{u1} α (MulZeroOneClass.toMulOneClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedCommMonoid.toPartialOrder.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α (LinearOrderedCommMonoidWithZero.toLinearOrderedCommMonoid.{u1} α _inst_1)))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoidWithZero.{u1} α], ZeroLEOneClass.{u1} α (LinearOrderedCommMonoidWithZero.toZero.{u1} α _inst_1) (Monoid.toOne.{u1} α (MonoidWithZero.toMonoid.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1)))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedCommMonoid.toPartialOrder.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α (LinearOrderedCommMonoidWithZero.toLinearOrderedCommMonoid.{u1} α _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClassₓ'. -/
instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
[LinearOrderedCommMonoidWithZero α] : ZeroLEOneClass α :=
{ ‹LinearOrderedCommMonoidWithZero α› with }
#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
-/- warning: canonically_ordered_add_monoid.to_zero_le_one_class -> CanonicallyOrderedAddMonoid.toZeroLeOneClass is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : One.{u1} α], ZeroLEOneClass.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) _inst_2 (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : One.{u1} α], ZeroLEOneClass.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2 (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))
-Case conversion may be inaccurate. Consider using '#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClassₓ'. -/
instance (priority := 100) CanonicallyOrderedAddMonoid.toZeroLeOneClass
[CanonicallyOrderedAddMonoid α] [One α] : ZeroLEOneClass α :=
⟨zero_le 1⟩
@@ -67,53 +55,23 @@ instance [PartialOrder α] : PartialOrder (WithZero α) :=
instance [Preorder α] : OrderBot (WithZero α) :=
WithBot.orderBot
-/- warning: with_zero.zero_le -> WithZero.zero_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : WithZero.{u1} α), LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) a
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : WithZero.{u1} α), LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) a
-Case conversion may be inaccurate. Consider using '#align with_zero.zero_le WithZero.zero_leₓ'. -/
theorem zero_le [Preorder α] (a : WithZero α) : 0 ≤ a :=
bot_le
#align with_zero.zero_le WithZero.zero_le
-/- warning: with_zero.zero_lt_coe -> WithZero.zero_lt_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : α), LT.lt.{u1} (WithZero.{u1} α) (Preorder.toHasLt.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : α), LT.lt.{u1} (WithZero.{u1} α) (Preorder.toLT.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) (WithZero.coe.{u1} α a)
-Case conversion may be inaccurate. Consider using '#align with_zero.zero_lt_coe WithZero.zero_lt_coeₓ'. -/
theorem zero_lt_coe [Preorder α] (a : α) : (0 : WithZero α) < a :=
WithBot.bot_lt_coe a
#align with_zero.zero_lt_coe WithZero.zero_lt_coe
-/- warning: with_zero.zero_eq_bot -> WithZero.zero_eq_bot is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α], Eq.{succ u1} (WithZero.{u1} α) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) (Bot.bot.{u1} (WithZero.{u1} α) (OrderBot.toHasBot.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.orderBot.{u1} α _inst_1)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α], Eq.{succ u1} (WithZero.{u1} α) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) (Bot.bot.{u1} (WithZero.{u1} α) (OrderBot.toBot.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.orderBot.{u1} α _inst_1)))
-Case conversion may be inaccurate. Consider using '#align with_zero.zero_eq_bot WithZero.zero_eq_botₓ'. -/
theorem zero_eq_bot [Preorder α] : (0 : WithZero α) = ⊥ :=
rfl
#align with_zero.zero_eq_bot WithZero.zero_eq_bot
-/- warning: with_zero.coe_lt_coe -> WithZero.coe_lt_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} (WithZero.{u1} α) (Preorder.toHasLt.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} (WithZero.{u1} α) (Preorder.toLT.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.coe.{u1} α a) (WithZero.coe.{u1} α b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align with_zero.coe_lt_coe WithZero.coe_lt_coeₓ'. -/
@[simp, norm_cast]
theorem coe_lt_coe [Preorder α] {a b : α} : (a : WithZero α) < b ↔ a < b :=
WithBot.coe_lt_coe
#align with_zero.coe_lt_coe WithZero.coe_lt_coe
-/- warning: with_zero.coe_le_coe -> WithZero.coe_le_coe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.coe.{u1} α a) (WithZero.coe.{u1} α b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
-Case conversion may be inaccurate. Consider using '#align with_zero.coe_le_coe WithZero.coe_le_coeₓ'. -/
@[simp, norm_cast]
theorem coe_le_coe [Preorder α] {a b : α} : (a : WithZero α) ≤ b ↔ a ≤ b :=
WithBot.coe_le_coe
@@ -125,12 +83,6 @@ instance [Lattice α] : Lattice (WithZero α) :=
instance [LinearOrder α] : LinearOrder (WithZero α) :=
WithBot.linearOrder
-/- warning: with_zero.covariant_class_mul_le -> WithZero.covariantClass_mul_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HMul.hMul.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHMul.{u1} (WithZero.{u1} α) (MulZeroClass.toHasMul.{u1} (WithZero.{u1} α) (WithZero.mulZeroClass.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.255 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.257 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.255 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.257) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.270 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.272 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.270 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.272)], CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.294 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.296 : WithZero.{u1} α) => HMul.hMul.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHMul.{u1} (WithZero.{u1} α) (MulZeroClass.toMul.{u1} (WithZero.{u1} α) (WithZero.mulZeroClass.{u1} α _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.294 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.296) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.309 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.311 : WithZero.{u1} α) => LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.309 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.311)
-Case conversion may be inaccurate. Consider using '#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_leₓ'. -/
instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
[CovariantClass α α (· * ·) (· ≤ ·)] :
CovariantClass (WithZero α) (WithZero α) (· * ·) (· ≤ ·) :=
@@ -144,11 +96,6 @@ instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
/- warning: with_zero.le_max_iff clashes with [anonymous] -> [anonymous]
-warning: with_zero.le_max_iff -> [anonymous] is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toHasLe.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) (LinearOrder.max.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c))) (LE.le.{u} α (Preorder.toHasLe.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) a (LinearOrder.max.{u} α _inst_1 b c))
-but is expected to have type
- forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
Case conversion may be inaccurate. Consider using '#align with_zero.le_max_iff [anonymous]ₓ'. -/
@[simp]
theorem [anonymous] [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b c ↔ a ≤ max b c := by
@@ -156,11 +103,6 @@ theorem [anonymous] [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b
#align with_zero.le_max_iff [anonymous]
/- warning: with_zero.min_le_iff clashes with [anonymous] -> [anonymous]
-warning: with_zero.min_le_iff -> [anonymous] is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toHasLe.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) (LinearOrder.min.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b)) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c)) (LE.le.{u} α (Preorder.toHasLe.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) (LinearOrder.min.{u} α _inst_1 a b) c)
-but is expected to have type
- forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
Case conversion may be inaccurate. Consider using '#align with_zero.min_le_iff [anonymous]ₓ'. -/
@[simp]
theorem [anonymous] [LinearOrder α] {a b c : α} : min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
@@ -171,12 +113,6 @@ instance [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
{ WithZero.commMonoidWithZero, WithZero.partialOrder with
mul_le_mul_left := fun _ _ => mul_le_mul_left' }
-/- warning: with_zero.covariant_class_add_le -> WithZero.covariantClass_add_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : AddZeroClass.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1))) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], (forall (a : α), LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α _inst_1)))) a) -> (CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HAdd.hAdd.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHAdd.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : AddZeroClass.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.454 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.456 : α) => HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toAdd.{u1} α _inst_1)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.454 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.456) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.469 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.471 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.469 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.471)], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddZeroClass.toZero.{u1} α _inst_1))) a) -> (CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.503 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.505 : WithZero.{u1} α) => HAdd.hAdd.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHAdd.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α (AddZeroClass.toAdd.{u1} α _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.503 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.505) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.518 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.520 : WithZero.{u1} α) => LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.518 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.520))
-Case conversion may be inaccurate. Consider using '#align with_zero.covariant_class_add_le WithZero.covariantClass_add_leₓ'. -/
protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
[CovariantClass α α (· + ·) (· ≤ ·)] (h : ∀ a : α, 0 ≤ a) :
CovariantClass (WithZero α) (WithZero α) (· + ·) (· ≤ ·) :=
@@ -195,12 +131,6 @@ protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
exact add_le_add_left hbc' a
#align with_zero.covariant_class_add_le WithZero.covariantClass_add_le
-/- warning: with_zero.ordered_add_comm_monoid -> WithZero.orderedAddCommMonoid is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α], (forall (a : α), LE.le.{u1} α (Preorder.toHasLe.{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) -> (OrderedAddCommMonoid.{u1} (WithZero.{u1} α))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{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) -> (OrderedAddCommMonoid.{u1} (WithZero.{u1} α))
-Case conversion may be inaccurate. Consider using '#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoidₓ'. -/
/-
Note 1 : the below is not an instance because it requires `zero_le`. It seems
like a rather pathological definition because α already has a zero.
@@ -222,12 +152,6 @@ end WithZero
section CanonicallyOrderedMonoid
-/- warning: with_zero.has_exists_add_of_le -> WithZero.existsAddOfLE is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Add.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : ExistsAddOfLE.{u1} α _inst_1 (Preorder.toHasLe.{u1} α _inst_2)], ExistsAddOfLE.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α _inst_1) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : Add.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : ExistsAddOfLE.{u1} α _inst_1 (Preorder.toLE.{u1} α _inst_2)], ExistsAddOfLE.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α _inst_1) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))
-Case conversion may be inaccurate. Consider using '#align with_zero.has_exists_add_of_le WithZero.existsAddOfLEₓ'. -/
instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
ExistsAddOfLE (WithZero α) :=
⟨fun a b => by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -187,8 +187,7 @@ protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
induction b using WithZero.recZeroCoe
· rw [add_zero]
induction c using WithZero.recZeroCoe
- · rw [add_zero]
- exact le_rfl
+ · rw [add_zero]; exact le_rfl
· rw [← coe_add, coe_le_coe]
exact le_add_of_nonneg_right (h _)
· rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -34,7 +34,7 @@ class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMon
/- warning: linear_ordered_comm_monoid_with_zero.to_zero_le_one_class -> LinearOrderedCommMonoidWithZero.toZeroLeOneClass is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoidWithZero.{u1} α], ZeroLEOneClass.{u1} α (MulZeroClass.toHasZero.{u1} α (MulZeroOneClass.toMulZeroClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (MulOneClass.toHasOne.{u1} α (MulZeroOneClass.toMulOneClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedCommMonoid.toPartialOrder.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α (LinearOrderedCommMonoidWithZero.toLinearOrderedCommMonoid.{u1} α _inst_1)))))
+ forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoidWithZero.{u1} α], ZeroLEOneClass.{u1} α (MulZeroClass.toHasZero.{u1} α (MulZeroOneClass.toMulZeroClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (MulOneClass.toHasOne.{u1} α (MulZeroOneClass.toMulOneClass.{u1} α (MonoidWithZero.toMulZeroOneClass.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1))))) (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedCommMonoid.toPartialOrder.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α (LinearOrderedCommMonoidWithZero.toLinearOrderedCommMonoid.{u1} α _inst_1)))))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : LinearOrderedCommMonoidWithZero.{u1} α], ZeroLEOneClass.{u1} α (LinearOrderedCommMonoidWithZero.toZero.{u1} α _inst_1) (Monoid.toOne.{u1} α (MonoidWithZero.toMonoid.{u1} α (CommMonoidWithZero.toMonoidWithZero.{u1} α (LinearOrderedCommMonoidWithZero.toCommMonoidWithZero.{u1} α _inst_1)))) (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedCommMonoid.toPartialOrder.{u1} α (LinearOrderedCommMonoid.toOrderedCommMonoid.{u1} α (LinearOrderedCommMonoidWithZero.toLinearOrderedCommMonoid.{u1} α _inst_1)))))
Case conversion may be inaccurate. Consider using '#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClassₓ'. -/
@@ -45,7 +45,7 @@ instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
/- warning: canonically_ordered_add_monoid.to_zero_le_one_class -> CanonicallyOrderedAddMonoid.toZeroLeOneClass is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : One.{u1} α], ZeroLEOneClass.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) _inst_2 (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))
+ forall {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : One.{u1} α], ZeroLEOneClass.{u1} α (AddZeroClass.toHasZero.{u1} α (AddMonoid.toAddZeroClass.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))) _inst_2 (Preorder.toHasLe.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : CanonicallyOrderedAddMonoid.{u1} α] [_inst_2 : One.{u1} α], ZeroLEOneClass.{u1} α (AddMonoid.toZero.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (OrderedAddCommMonoid.toAddCommMonoid.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1)))) _inst_2 (Preorder.toLE.{u1} α (PartialOrder.toPreorder.{u1} α (OrderedAddCommMonoid.toPartialOrder.{u1} α (CanonicallyOrderedAddMonoid.toOrderedAddCommMonoid.{u1} α _inst_1))))
Case conversion may be inaccurate. Consider using '#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClassₓ'. -/
@@ -67,21 +67,29 @@ instance [PartialOrder α] : PartialOrder (WithZero α) :=
instance [Preorder α] : OrderBot (WithZero α) :=
WithBot.orderBot
-#print WithZero.zero_le /-
+/- warning: with_zero.zero_le -> WithZero.zero_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : WithZero.{u1} α), LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) a
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : WithZero.{u1} α), LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) a
+Case conversion may be inaccurate. Consider using '#align with_zero.zero_le WithZero.zero_leₓ'. -/
theorem zero_le [Preorder α] (a : WithZero α) : 0 ≤ a :=
bot_le
#align with_zero.zero_le WithZero.zero_le
--/
-#print WithZero.zero_lt_coe /-
+/- warning: with_zero.zero_lt_coe -> WithZero.zero_lt_coe is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : α), LT.lt.{u1} (WithZero.{u1} α) (Preorder.toHasLt.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] (a : α), LT.lt.{u1} (WithZero.{u1} α) (Preorder.toLT.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) (WithZero.coe.{u1} α a)
+Case conversion may be inaccurate. Consider using '#align with_zero.zero_lt_coe WithZero.zero_lt_coeₓ'. -/
theorem zero_lt_coe [Preorder α] (a : α) : (0 : WithZero α) < a :=
WithBot.bot_lt_coe a
#align with_zero.zero_lt_coe WithZero.zero_lt_coe
--/
/- warning: with_zero.zero_eq_bot -> WithZero.zero_eq_bot is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α], Eq.{succ u1} (WithZero.{u1} α) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) (Bot.bot.{u1} (WithZero.{u1} α) (OrderBot.toHasBot.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.orderBot.{u1} α _inst_1)))
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α], Eq.{succ u1} (WithZero.{u1} α) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (OfNat.mk.{u1} (WithZero.{u1} α) 0 (Zero.zero.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α)))) (Bot.bot.{u1} (WithZero.{u1} α) (OrderBot.toHasBot.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.orderBot.{u1} α _inst_1)))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α], Eq.{succ u1} (WithZero.{u1} α) (OfNat.ofNat.{u1} (WithZero.{u1} α) 0 (Zero.toOfNat0.{u1} (WithZero.{u1} α) (WithZero.zero.{u1} α))) (Bot.bot.{u1} (WithZero.{u1} α) (OrderBot.toBot.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.orderBot.{u1} α _inst_1)))
Case conversion may be inaccurate. Consider using '#align with_zero.zero_eq_bot WithZero.zero_eq_botₓ'. -/
@@ -89,19 +97,27 @@ theorem zero_eq_bot [Preorder α] : (0 : WithZero α) = ⊥ :=
rfl
#align with_zero.zero_eq_bot WithZero.zero_eq_bot
-#print WithZero.coe_lt_coe /-
+/- warning: with_zero.coe_lt_coe -> WithZero.coe_lt_coe is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} (WithZero.{u1} α) (Preorder.toHasLt.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) b)) (LT.lt.{u1} α (Preorder.toHasLt.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LT.lt.{u1} (WithZero.{u1} α) (Preorder.toLT.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.coe.{u1} α a) (WithZero.coe.{u1} α b)) (LT.lt.{u1} α (Preorder.toLT.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align with_zero.coe_lt_coe WithZero.coe_lt_coeₓ'. -/
@[simp, norm_cast]
theorem coe_lt_coe [Preorder α] {a b : α} : (a : WithZero α) < b ↔ a < b :=
WithBot.coe_lt_coe
#align with_zero.coe_lt_coe WithZero.coe_lt_coe
--/
-#print WithZero.coe_le_coe /-
+/- warning: with_zero.coe_le_coe -> WithZero.coe_le_coe is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) a) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) α (WithZero.{u1} α) (HasLiftT.mk.{succ u1, succ u1} α (WithZero.{u1} α) (CoeTCₓ.coe.{succ u1, succ u1} α (WithZero.{u1} α) (WithZero.hasCoeT.{u1} α))) b)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_1) a b)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Preorder.{u1} α] {a : α} {b : α}, Iff (LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_1)) (WithZero.coe.{u1} α a) (WithZero.coe.{u1} α b)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_1) a b)
+Case conversion may be inaccurate. Consider using '#align with_zero.coe_le_coe WithZero.coe_le_coeₓ'. -/
@[simp, norm_cast]
theorem coe_le_coe [Preorder α] {a b : α} : (a : WithZero α) ≤ b ↔ a ≤ b :=
WithBot.coe_le_coe
#align with_zero.coe_le_coe WithZero.coe_le_coe
--/
instance [Lattice α] : Lattice (WithZero α) :=
WithBot.lattice
@@ -111,7 +127,7 @@ instance [LinearOrder α] : LinearOrder (WithZero α) :=
/- warning: with_zero.covariant_class_mul_le -> WithZero.covariantClass_mul_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1)) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))], CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HMul.hMul.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHMul.{u1} (WithZero.{u1} α) (MulZeroClass.toHasMul.{u1} (WithZero.{u1} α) (WithZero.mulZeroClass.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)))
+ forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1)) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HMul.hMul.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHMul.{u1} (WithZero.{u1} α) (MulZeroClass.toHasMul.{u1} (WithZero.{u1} α) (WithZero.mulZeroClass.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : Mul.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.255 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.257 : α) => HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.255 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.257) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.270 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.272 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.270 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.272)], CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.294 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.296 : WithZero.{u1} α) => HMul.hMul.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHMul.{u1} (WithZero.{u1} α) (MulZeroClass.toMul.{u1} (WithZero.{u1} α) (WithZero.mulZeroClass.{u1} α _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.294 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.296) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.309 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.311 : WithZero.{u1} α) => LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.309 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.311)
Case conversion may be inaccurate. Consider using '#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_leₓ'. -/
@@ -130,7 +146,7 @@ instance covariantClass_mul_le {α : Type u} [Mul α] [Preorder α]
/- warning: with_zero.le_max_iff clashes with [anonymous] -> [anonymous]
warning: with_zero.le_max_iff -> [anonymous] is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toLE.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) (LinearOrder.max.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c))) (LE.le.{u} α (Preorder.toLE.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) a (LinearOrder.max.{u} α _inst_1 b c))
+ forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toHasLe.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) (LinearOrder.max.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c))) (LE.le.{u} α (Preorder.toHasLe.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) a (LinearOrder.max.{u} α _inst_1 b c))
but is expected to have type
forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
Case conversion may be inaccurate. Consider using '#align with_zero.le_max_iff [anonymous]ₓ'. -/
@@ -142,7 +158,7 @@ theorem [anonymous] [LinearOrder α] {a b c : α} : (a : WithZero α) ≤ max b
/- warning: with_zero.min_le_iff clashes with [anonymous] -> [anonymous]
warning: with_zero.min_le_iff -> [anonymous] is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toLE.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) (LinearOrder.min.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b)) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c)) (LE.le.{u} α (Preorder.toLE.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) (LinearOrder.min.{u} α _inst_1 a b) c)
+ forall {α : Type.{u}} [_inst_1 : LinearOrder.{u} α] {a : α} {b : α} {c : α}, Iff (LE.le.{u} (WithZero.{u} α) (Preorder.toHasLe.{u} (WithZero.{u} α) (WithZero.preorder.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1)))))) (LinearOrder.min.{u} (WithZero.{u} α) (WithZero.linearOrder.{u} α _inst_1) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) a) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) b)) ((fun (a : Type.{u}) (b : Type.{u}) [self : HasLiftT.{succ u, succ u} a b] => self.0) α (WithZero.{u} α) (HasLiftT.mk.{succ u, succ u} α (WithZero.{u} α) (CoeTCₓ.coe.{succ u, succ u} α (WithZero.{u} α) (WithZero.hasCoeT.{u} α))) c)) (LE.le.{u} α (Preorder.toHasLe.{u} α (PartialOrder.toPreorder.{u} α (SemilatticeInf.toPartialOrder.{u} α (Lattice.toSemilatticeInf.{u} α (LinearOrder.toLattice.{u} α _inst_1))))) (LinearOrder.min.{u} α _inst_1 a b) c)
but is expected to have type
forall {α : Type.{u}} {_inst_1 : Type.{v}}, (Nat -> α -> _inst_1) -> Nat -> (List.{u} α) -> (List.{v} _inst_1)
Case conversion may be inaccurate. Consider using '#align with_zero.min_le_iff [anonymous]ₓ'. -/
@@ -157,7 +173,7 @@ instance [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
/- warning: with_zero.covariant_class_add_le -> WithZero.covariantClass_add_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : AddZeroClass.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1))) (LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2))], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α _inst_1)))) a) -> (CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HAdd.hAdd.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHAdd.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))))
+ forall {α : Type.{u1}} [_inst_1 : AddZeroClass.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1))) (LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2))], (forall (a : α), LE.le.{u1} α (Preorder.toHasLe.{u1} α _inst_2) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (AddZeroClass.toHasZero.{u1} α _inst_1)))) a) -> (CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (HAdd.hAdd.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHAdd.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α (AddZeroClass.toHasAdd.{u1} α _inst_1)))) (LE.le.{u1} (WithZero.{u1} α) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : AddZeroClass.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : CovariantClass.{u1, u1} α α (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.454 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.456 : α) => HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (AddZeroClass.toAdd.{u1} α _inst_1)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.454 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.456) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.469 : α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.471 : α) => LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.469 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.471)], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{u1} α _inst_2) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (AddZeroClass.toZero.{u1} α _inst_1))) a) -> (CovariantClass.{u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.503 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.505 : WithZero.{u1} α) => HAdd.hAdd.{u1, u1, u1} (WithZero.{u1} α) (WithZero.{u1} α) (WithZero.{u1} α) (instHAdd.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α (AddZeroClass.toAdd.{u1} α _inst_1))) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.503 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.505) (fun (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.518 : WithZero.{u1} α) (x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.520 : WithZero.{u1} α) => LE.le.{u1} (WithZero.{u1} α) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2)) x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.518 x._@.Mathlib.Algebra.Order.Monoid.WithZero.Defs._hyg.520))
Case conversion may be inaccurate. Consider using '#align with_zero.covariant_class_add_le WithZero.covariantClass_add_leₓ'. -/
@@ -182,7 +198,7 @@ protected theorem covariantClass_add_le [AddZeroClass α] [Preorder α]
/- warning: with_zero.ordered_add_comm_monoid -> WithZero.orderedAddCommMonoid is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{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) -> (OrderedAddCommMonoid.{u1} (WithZero.{u1} α))
+ forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α], (forall (a : α), LE.le.{u1} α (Preorder.toHasLe.{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) -> (OrderedAddCommMonoid.{u1} (WithZero.{u1} α))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : OrderedAddCommMonoid.{u1} α], (forall (a : α), LE.le.{u1} α (Preorder.toLE.{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) -> (OrderedAddCommMonoid.{u1} (WithZero.{u1} α))
Case conversion may be inaccurate. Consider using '#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoidₓ'. -/
@@ -207,7 +223,12 @@ end WithZero
section CanonicallyOrderedMonoid
-#print WithZero.existsAddOfLE /-
+/- warning: with_zero.has_exists_add_of_le -> WithZero.existsAddOfLE is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : Add.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : ExistsAddOfLE.{u1} α _inst_1 (Preorder.toHasLe.{u1} α _inst_2)], ExistsAddOfLE.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α _inst_1) (Preorder.toHasLe.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : Add.{u1} α] [_inst_2 : Preorder.{u1} α] [_inst_3 : ExistsAddOfLE.{u1} α _inst_1 (Preorder.toLE.{u1} α _inst_2)], ExistsAddOfLE.{u1} (WithZero.{u1} α) (WithZero.add.{u1} α _inst_1) (Preorder.toLE.{u1} (WithZero.{u1} α) (WithZero.preorder.{u1} α _inst_2))
+Case conversion may be inaccurate. Consider using '#align with_zero.has_exists_add_of_le WithZero.existsAddOfLEₓ'. -/
instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
ExistsAddOfLE (WithZero α) :=
⟨fun a b => by
@@ -219,7 +240,6 @@ instance WithZero.existsAddOfLE {α} [Add α] [Preorder α] [ExistsAddOfLE α] :
obtain ⟨c, rfl⟩ := exists_add_of_le (WithZero.coe_le_coe.1 h)
exact ⟨c, rfl⟩⟩
#align with_zero.has_exists_add_of_le WithZero.existsAddOfLE
--/
#print WithZero.canonicallyOrderedAddMonoid /-
-- This instance looks absurd: a monoid already has a zero
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Occasionally, remove a "deprecated by" or "deprecated since", to fit the line length.
This is desirable (to me) because
@@ -288,8 +288,7 @@ lemma pow_lt_pow_right₀ (ha : 1 < a) (hmn : m < n) : a ^ m < a ^ n := by
induction' hmn with n _ ih; exacts [pow_lt_pow_succ ha, lt_trans ih (pow_lt_pow_succ ha)]
#align pow_lt_pow₀ pow_lt_pow_right₀
--- 2023-12-23
-@[deprecated] alias pow_lt_pow₀ := pow_lt_pow_right₀
+@[deprecated] alias pow_lt_pow₀ := pow_lt_pow_right₀ -- 2023-12-23
end LinearOrderedCommGroupWithZero
@@ -280,7 +280,7 @@ instance : LinearOrderedAddCommGroupWithTop (Additive αᵒᵈ) :=
add_neg_cancel := fun a ha ↦ mul_inv_cancel (G₀ := α) (id ha : Additive.toMul a ≠ 0) }
lemma pow_lt_pow_succ (ha : 1 < a) : a ^ n < a ^ n.succ := by
- rw [← one_mul (a ^ n), pow_succ'];
+ rw [← one_mul (a ^ n), pow_succ']
exact mul_lt_right₀ _ ha (pow_ne_zero _ (zero_lt_one.trans ha).ne')
#align pow_lt_pow_succ pow_lt_pow_succ
@@ -334,17 +334,16 @@ lemma zero_eq_bot : (0 : WithZero α) = ⊥ := rfl
@[simp, norm_cast] lemma coe_le_coe : (a : WithZero α) ≤ b ↔ a ≤ b := WithBot.coe_le_coe
#align with_zero.coe_le_coe WithZero.coe_le_coe
+theorem coe_le_iff {x : WithZero α} : (a : WithZero α) ≤ x ↔ ∃ b : α, x = b ∧ a ≤ b :=
+ WithBot.coe_le_iff
+
instance covariantClass_mul_le [Mul α] [CovariantClass α α (· * ·) (· ≤ ·)] :
CovariantClass (WithZero α) (WithZero α) (· * ·) (· ≤ ·) := by
refine ⟨fun a b c hbc => ?_⟩
induction a using WithZero.recZeroCoe; · exact zero_le _
induction b using WithZero.recZeroCoe; · exact zero_le _
- rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
- refine le_trans ?_ (le_of_eq <| coe_mul _ _)
- -- rw [← coe_mul, ← coe_mul, coe_le_coe]
- -- Porting note: rewriting `coe_mul` here doesn't work because of some difference between
- -- `coe` and `WithBot.some`, even though they're definitionally equal as shown by the `refine'`
- rw [← coe_mul, coe_le_coe]
+ rcases WithZero.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
+ rw [← coe_mul _ c, ← coe_mul, coe_le_coe]
exact mul_le_mul_left' hbc' _
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
WithZero
material depending on GroupWithZero
(#12351)
Everything under Algebra.Group
should be additivisable. Therefore I move the GroupWithZero
instances for WithZero
from Algebra.Group.WithOne.Defs
and the whole of Algebra.Group.WithOne.Units
to a new file Algebra.GroupWithZero.WithZero
. I credit Mario for https://github.com/leanprover-community/mathlib/commit/ad92a9ba47f417916aab365d13db653fa8991a84 and Johan for https://github.com/leanprover-community/mathlib/pull/762.
Use the opportunity to slightly clean up the code:
:=
by where
in instance declarationscoe
lemmassection ... end
@@ -6,6 +6,7 @@ Authors: Kenny Lau, Johan Commelin, Patrick Massot
import Mathlib.Algebra.Group.WithOne.Defs
import Mathlib.Algebra.GroupWithZero.InjSurj
import Mathlib.Algebra.GroupWithZero.Units.Equiv
+import Mathlib.Algebra.GroupWithZero.WithZero
import Mathlib.Algebra.Order.Group.Units
import Mathlib.Algebra.Order.Monoid.Basic
import Mathlib.Algebra.Order.Monoid.OrderDual
@@ -339,7 +340,7 @@ instance covariantClass_mul_le [Mul α] [CovariantClass α α (· * ·) (· ≤
induction a using WithZero.recZeroCoe; · exact zero_le _
induction b using WithZero.recZeroCoe; · exact zero_le _
rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
- refine le_trans ?_ (le_of_eq <| coe_mul)
+ refine le_trans ?_ (le_of_eq <| coe_mul _ _)
-- rw [← coe_mul, ← coe_mul, coe_le_coe]
-- Porting note: rewriting `coe_mul` here doesn't work because of some difference between
-- `coe` and `WithBot.some`, even though they're definitionally equal as shown by the `refine'`
Mostly automatic, with a few manual corrections.
@@ -298,7 +298,7 @@ instance instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual
{ Multiplicative.orderedCommMonoid, Multiplicative.linearOrder with
zero := Multiplicative.ofAdd (⊤ : α)
zero_mul := @top_add _ (_)
- -- Porting note: Here and elsewhere in the file, just `zero_mul` worked in Lean 3. See
+ -- Porting note: Here and elsewhere in the file, just `zero_mul` worked in Lean 3. See
-- https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Type.20synonyms
mul_zero := @add_top _ (_)
zero_le_one := (le_top : (0 : α) ≤ ⊤) }
LinearOrderedCommGroupWithZero
(#11716)
Reconstitute the file Algebra.Order.Monoid.WithZero
from three files:
Algebra.Order.Monoid.WithZero.Defs
Algebra.Order.Monoid.WithZero.Basic
Algebra.Order.WithZero
Avoid importing it in many files. Most uses were just to get le_zero_iff
to work on Nat
.
Before
After
@@ -3,14 +3,17 @@ Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Johan Commelin, Patrick Massot
-/
+import Mathlib.Algebra.Group.WithOne.Defs
import Mathlib.Algebra.GroupWithZero.InjSurj
import Mathlib.Algebra.GroupWithZero.Units.Equiv
import Mathlib.Algebra.Order.Group.Units
import Mathlib.Algebra.Order.Monoid.Basic
import Mathlib.Algebra.Order.Monoid.OrderDual
import Mathlib.Algebra.Order.Monoid.TypeTags
-import Mathlib.Algebra.Order.Monoid.WithZero.Defs
+import Mathlib.Algebra.Order.ZeroLEOne
+#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"4dc134b97a3de65ef2ed881f3513d56260971562"
+#align_import algebra.order.monoid.with_zero.basic from "leanprover-community/mathlib"@"dad7ecf9a1feae63e6e49f07619b7087403fb8d4"
#align_import algebra.order.with_zero from "leanprover-community/mathlib"@"655994e298904d7e5bbd1e18c95defd7b543eb94"
/-!
@@ -25,49 +28,34 @@ by taking a linearly ordered commutative group Γ and formally adjoining a zero
The disadvantage is that a type such as `NNReal` is not of that form,
whereas it is a very common target for valuations.
The solutions is to use a typeclass, and that is exactly what we do in this file.
-
-Note that to avoid issues with import cycles, `LinearOrderedCommMonoidWithZero` is defined
-in another file. However, the lemmas about it are stated here.
-/
+variable {α : Type*}
+
+/-- A linearly ordered commutative monoid with a zero element. -/
+class LinearOrderedCommMonoidWithZero (α : Type*) extends LinearOrderedCommMonoid α,
+ CommMonoidWithZero α where
+ /-- `0 ≤ 1` in any linearly ordered commutative monoid. -/
+ zero_le_one : (0 : α) ≤ 1
+#align linear_ordered_comm_monoid_with_zero LinearOrderedCommMonoidWithZero
/-- A linearly ordered commutative group with a zero element. -/
class LinearOrderedCommGroupWithZero (α : Type*) extends LinearOrderedCommMonoidWithZero α,
CommGroupWithZero α
#align linear_ordered_comm_group_with_zero LinearOrderedCommGroupWithZero
-variable {α : Type*} {a b c d x y z : α}
-
-instance instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual
- [LinearOrderedAddCommMonoidWithTop α] :
- LinearOrderedCommMonoidWithZero (Multiplicative αᵒᵈ) :=
- { Multiplicative.orderedCommMonoid, Multiplicative.linearOrder with
- zero := Multiplicative.ofAdd (⊤ : α)
- zero_mul := @top_add _ (_)
- -- Porting note: Here and elsewhere in the file, just `zero_mul` worked in Lean 3. See
- -- https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Type.20synonyms
- mul_zero := @add_top _ (_)
- zero_le_one := (le_top : (0 : α) ≤ ⊤) }
-#align multiplicative.linear_ordered_comm_monoid_with_zero instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual
-
-instance [LinearOrderedAddCommGroupWithTop α] :
- LinearOrderedCommGroupWithZero (Multiplicative αᵒᵈ) :=
- { Multiplicative.divInvMonoid, instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual,
- Multiplicative.instNontrivial with
- inv_zero := @LinearOrderedAddCommGroupWithTop.neg_top _ (_)
- mul_inv_cancel := @LinearOrderedAddCommGroupWithTop.add_neg_cancel _ (_) }
-
-instance instLinearOrderedCommMonoidWithZeroWithZero [LinearOrderedCommMonoid α] :
- LinearOrderedCommMonoidWithZero (WithZero α) :=
- { WithZero.linearOrder, WithZero.commMonoidWithZero with
- mul_le_mul_left := fun _ _ ↦ mul_le_mul_left', zero_le_one := WithZero.zero_le _ }
-#align with_zero.linear_ordered_comm_monoid_with_zero instLinearOrderedCommMonoidWithZeroWithZero
+instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
+ [LinearOrderedCommMonoidWithZero α] : ZeroLEOneClass α :=
+ { ‹LinearOrderedCommMonoidWithZero α› with }
+#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
-instance [LinearOrderedCommGroup α] : LinearOrderedCommGroupWithZero (WithZero α) :=
- { instLinearOrderedCommMonoidWithZeroWithZero, WithZero.commGroupWithZero with }
+instance (priority := 100) canonicallyOrderedAddCommMonoid.toZeroLeOneClass
+ [CanonicallyOrderedAddCommMonoid α] [One α] : ZeroLEOneClass α :=
+ ⟨zero_le 1⟩
+#align canonically_ordered_add_monoid.to_zero_le_one_class canonicallyOrderedAddCommMonoid.toZeroLeOneClass
section LinearOrderedCommMonoidWithZero
-variable [LinearOrderedCommMonoidWithZero α] {n : ℕ}
+variable [LinearOrderedCommMonoidWithZero α] {a b c d x y z : α} {n : ℕ}
/-
The following facts are true more generally in a (linearly) ordered commutative monoid.
@@ -86,8 +74,8 @@ def Function.Injective.linearOrderedCommMonoidWithZero {β : Type*} [Zero β] [O
show f 0 ≤ f 1 by simp only [zero, one, LinearOrderedCommMonoidWithZero.zero_le_one] }
#align function.injective.linear_ordered_comm_monoid_with_zero Function.Injective.linearOrderedCommMonoidWithZero
-@[simp]
-theorem zero_le' : 0 ≤ a := by simpa only [mul_zero, mul_one] using mul_le_mul_left' zero_le_one a
+@[simp] lemma zero_le' : 0 ≤ a := by
+ simpa only [mul_zero, mul_one] using mul_le_mul_left' (zero_le_one' α) a
#align zero_le' zero_le'
@[simp]
@@ -122,7 +110,8 @@ lemma pow_pos_iff (hn : n ≠ 0) : 0 < a ^ n ↔ 0 < a := by simp_rw [zero_lt_if
end LinearOrderedCommMonoidWithZero
-variable [LinearOrderedCommGroupWithZero α] {m n : ℕ}
+section LinearOrderedCommGroupWithZero
+variable [LinearOrderedCommGroupWithZero α] {a b c d : α} {m n : ℕ}
-- TODO: Do we really need the following two?
/-- Alias of `mul_le_one'` for unification. -/
@@ -192,12 +181,12 @@ theorem mul_lt_mul₀ (hab : a < b) (hcd : c < d) : a * c < b * d :=
mul_lt_mul_of_lt_of_le₀ hab.le (ne_zero_of_lt hab) hcd
#align mul_lt_mul₀ mul_lt_mul₀
-theorem mul_inv_lt_of_lt_mul₀ (h : x < y * z) : x * z⁻¹ < y := by
+theorem mul_inv_lt_of_lt_mul₀ (h : a < b * c) : a * c⁻¹ < b := by
contrapose! h
simpa only [inv_inv] using mul_inv_le_of_le_mul h
#align mul_inv_lt_of_lt_mul₀ mul_inv_lt_of_lt_mul₀
-theorem inv_mul_lt_of_lt_mul₀ (h : x < y * z) : y⁻¹ * x < z := by
+theorem inv_mul_lt_of_lt_mul₀ (h : a < b * c) : b⁻¹ * a < c := by
rw [mul_comm] at *
exact mul_inv_lt_of_lt_mul₀ h
#align inv_mul_lt_of_lt_mul₀ inv_mul_lt_of_lt_mul₀
@@ -300,3 +289,181 @@ lemma pow_lt_pow_right₀ (ha : 1 < a) (hmn : m < n) : a ^ m < a ^ n := by
-- 2023-12-23
@[deprecated] alias pow_lt_pow₀ := pow_lt_pow_right₀
+
+end LinearOrderedCommGroupWithZero
+
+instance instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual
+ [LinearOrderedAddCommMonoidWithTop α] :
+ LinearOrderedCommMonoidWithZero (Multiplicative αᵒᵈ) :=
+ { Multiplicative.orderedCommMonoid, Multiplicative.linearOrder with
+ zero := Multiplicative.ofAdd (⊤ : α)
+ zero_mul := @top_add _ (_)
+ -- Porting note: Here and elsewhere in the file, just `zero_mul` worked in Lean 3. See
+ -- https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Type.20synonyms
+ mul_zero := @add_top _ (_)
+ zero_le_one := (le_top : (0 : α) ≤ ⊤) }
+#align multiplicative.linear_ordered_comm_monoid_with_zero instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual
+
+instance [LinearOrderedAddCommGroupWithTop α] :
+ LinearOrderedCommGroupWithZero (Multiplicative αᵒᵈ) :=
+ { Multiplicative.divInvMonoid, instLinearOrderedCommMonoidWithZeroMultiplicativeOrderDual,
+ Multiplicative.instNontrivial with
+ inv_zero := @LinearOrderedAddCommGroupWithTop.neg_top _ (_)
+ mul_inv_cancel := @LinearOrderedAddCommGroupWithTop.add_neg_cancel _ (_) }
+
+namespace WithZero
+section Preorder
+variable [Preorder α] {a b : α}
+
+instance preorder : Preorder (WithZero α) := WithBot.preorder
+instance orderBot : OrderBot (WithZero α) := WithBot.orderBot
+
+lemma zero_le (a : WithZero α) : 0 ≤ a := bot_le
+#align with_zero.zero_le WithZero.zero_le
+
+lemma zero_lt_coe (a : α) : (0 : WithZero α) < a := WithBot.bot_lt_coe a
+#align with_zero.zero_lt_coe WithZero.zero_lt_coe
+
+lemma zero_eq_bot : (0 : WithZero α) = ⊥ := rfl
+#align with_zero.zero_eq_bot WithZero.zero_eq_bot
+
+@[simp, norm_cast] lemma coe_lt_coe : (a : WithZero α) < b ↔ a < b := WithBot.coe_lt_coe
+#align with_zero.coe_lt_coe WithZero.coe_lt_coe
+
+@[simp, norm_cast] lemma coe_le_coe : (a : WithZero α) ≤ b ↔ a ≤ b := WithBot.coe_le_coe
+#align with_zero.coe_le_coe WithZero.coe_le_coe
+
+instance covariantClass_mul_le [Mul α] [CovariantClass α α (· * ·) (· ≤ ·)] :
+ CovariantClass (WithZero α) (WithZero α) (· * ·) (· ≤ ·) := by
+ refine ⟨fun a b c hbc => ?_⟩
+ induction a using WithZero.recZeroCoe; · exact zero_le _
+ induction b using WithZero.recZeroCoe; · exact zero_le _
+ rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
+ refine le_trans ?_ (le_of_eq <| coe_mul)
+ -- rw [← coe_mul, ← coe_mul, coe_le_coe]
+ -- Porting note: rewriting `coe_mul` here doesn't work because of some difference between
+ -- `coe` and `WithBot.some`, even though they're definitionally equal as shown by the `refine'`
+ rw [← coe_mul, coe_le_coe]
+ exact mul_le_mul_left' hbc' _
+#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
+
+-- Porting note: same issue as `covariantClass_mul_le`
+protected lemma covariantClass_add_le [AddZeroClass α] [CovariantClass α α (· + ·) (· ≤ ·)]
+ (h : ∀ a : α, 0 ≤ a) : CovariantClass (WithZero α) (WithZero α) (· + ·) (· ≤ ·) := by
+ refine ⟨fun a b c hbc => ?_⟩
+ induction a using WithZero.recZeroCoe
+ · rwa [zero_add, zero_add]
+ induction b using WithZero.recZeroCoe
+ · rw [add_zero]
+ induction c using WithZero.recZeroCoe
+ · rw [add_zero]
+ · rw [← coe_add, coe_le_coe]
+ exact le_add_of_nonneg_right (h _)
+ · rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
+ refine le_trans ?_ (le_of_eq <| coe_add _ _)
+ rw [← coe_add, coe_le_coe]
+ exact add_le_add_left hbc' _
+#align with_zero.covariant_class_add_le WithZero.covariantClass_add_le
+
+instance existsAddOfLE [Add α] [ExistsAddOfLE α] : ExistsAddOfLE (WithZero α) :=
+ ⟨fun {a b} => by
+ induction a using WithZero.cases_on
+ · exact fun _ => ⟨b, (zero_add b).symm⟩
+ induction b using WithZero.cases_on
+ · exact fun h => (WithBot.not_coe_le_bot _ h).elim
+ intro h
+ obtain ⟨c, rfl⟩ := exists_add_of_le (WithZero.coe_le_coe.1 h)
+ exact ⟨c, rfl⟩⟩
+#align with_zero.has_exists_add_of_le WithZero.existsAddOfLE
+
+end Preorder
+
+section PartialOrder
+variable [PartialOrder α]
+
+instance partialOrder : PartialOrder (WithZero α) := WithBot.partialOrder
+
+instance contravariantClass_mul_lt [Mul α] [ContravariantClass α α (· * ·) (· < ·)] :
+ ContravariantClass (WithZero α) (WithZero α) (· * ·) (· < ·) := by
+ refine ⟨fun a b c h => ?_⟩
+ have := ((zero_le _).trans_lt h).ne'
+ induction a using WithZero.recZeroCoe
+ · simp at this
+ induction c using WithZero.recZeroCoe
+ · simp at this
+ induction b using WithZero.recZeroCoe
+ exacts [zero_lt_coe _, coe_lt_coe.mpr (lt_of_mul_lt_mul_left' <| coe_lt_coe.mp h)]
+#align with_zero.contravariant_class_mul_lt WithZero.contravariantClass_mul_lt
+
+end PartialOrder
+
+instance lattice [Lattice α] : Lattice (WithZero α) := WithBot.lattice
+
+section LinearOrder
+variable [LinearOrder α] {a b c : α}
+
+instance linearOrder : LinearOrder (WithZero α) := WithBot.linearOrder
+
+-- Porting note (#10618): @[simp] can prove this
+protected lemma le_max_iff : (a : WithZero α) ≤ max (b : WithZero α) c ↔ a ≤ max b c := by
+ simp only [WithZero.coe_le_coe, le_max_iff]
+#align with_zero.le_max_iff WithZero.le_max_iff
+
+-- Porting note (#10618): @[simp] can prove this
+protected lemma min_le_iff : min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
+ simp only [WithZero.coe_le_coe, min_le_iff]
+#align with_zero.min_le_iff WithZero.min_le_iff
+
+end LinearOrder
+
+instance orderedCommMonoid [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
+ { WithZero.commMonoidWithZero.toCommMonoid, WithZero.partialOrder with
+ mul_le_mul_left := fun _ _ => mul_le_mul_left' }
+
+/-
+Note 1 : the below is not an instance because it requires `zero_le`. It seems
+like a rather pathological definition because α already has a zero.
+Note 2 : there is no multiplicative analogue because it does not seem necessary.
+Mathematicians might be more likely to use the order-dual version, where all
+elements are ≤ 1 and then 1 is the top element.
+-/
+/-- If `0` is the least element in `α`, then `WithZero α` is an `OrderedAddCommMonoid`. -/
+@[reducible] -- See note [reducible non-instances]
+protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a : α, 0 ≤ a) :
+ OrderedAddCommMonoid (WithZero α) :=
+ { WithZero.partialOrder, WithZero.addCommMonoid with
+ add_le_add_left := @add_le_add_left _ _ _ (WithZero.covariantClass_add_le zero_le).. }
+#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoid
+
+-- This instance looks absurd: a monoid already has a zero
+/-- Adding a new zero to a canonically ordered additive monoid produces another one. -/
+instance canonicallyOrderedAddCommMonoid [CanonicallyOrderedAddCommMonoid α] :
+ CanonicallyOrderedAddCommMonoid (WithZero α) :=
+ { WithZero.orderBot,
+ WithZero.orderedAddCommMonoid _root_.zero_le,
+ WithZero.existsAddOfLE with
+ le_self_add := fun a b => by
+ induction a using WithZero.cases_on
+ · exact bot_le
+ induction b using WithZero.cases_on
+ · exact le_rfl
+ · exact WithZero.coe_le_coe.2 le_self_add }
+#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddCommMonoid
+
+instance canonicallyLinearOrderedAddCommMonoid [CanonicallyLinearOrderedAddCommMonoid α] :
+ CanonicallyLinearOrderedAddCommMonoid (WithZero α) :=
+ { WithZero.canonicallyOrderedAddCommMonoid, WithZero.linearOrder with }
+#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddCommMonoid
+
+instance instLinearOrderedCommMonoidWithZero [LinearOrderedCommMonoid α] :
+ LinearOrderedCommMonoidWithZero (WithZero α) :=
+ { WithZero.linearOrder, WithZero.commMonoidWithZero with
+ mul_le_mul_left := fun _ _ ↦ mul_le_mul_left', zero_le_one := WithZero.zero_le _ }
+#align with_zero.linear_ordered_comm_monoid_with_zero WithZero.instLinearOrderedCommMonoidWithZero
+
+instance instLinearOrderedCommGroupWithZero [LinearOrderedCommGroup α] :
+ LinearOrderedCommGroupWithZero (WithZero α) where
+ __ := instLinearOrderedCommMonoidWithZero
+ __ := commGroupWithZero
+
+end WithZero
@@ -90,13 +90,13 @@ instance covariantClass_mul_le [Mul α] [Preorder α]
exact mul_le_mul_left' hbc' _
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
--- Porting note: @[simp] can prove this
+-- Porting note (#10618): @[simp] can prove this
nonrec theorem le_max_iff [LinearOrder α] {a b c : α} :
(a : WithZero α) ≤ max (b : WithZero α) c ↔ a ≤ max b c := by
simp only [WithZero.coe_le_coe, le_max_iff]
#align with_zero.le_max_iff WithZero.le_max_iff
--- Porting note: @[simp] can prove this
+-- Porting note (#10618): @[simp] can prove this
nonrec theorem min_le_iff [LinearOrder α] {a b c : α} :
min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
simp only [WithZero.coe_le_coe, min_le_iff]
WithOne
doesn't import rings (#10275)
Reorder the WithOne
material.
Algebra.Group.WithOne.Defs
was hiding a Ring
import! I credit Johan and Mario for https://github.com/leanprover-community/mathlib/pull/2707.WithBot
is not needed to define WithOne.unone
. It's simpler to redefine it by hand. In the future, we might want to have an Option
version (but not sure how much that's worth, since it would basically be Option.get
again).@@ -6,6 +6,7 @@ Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl
import Mathlib.Algebra.Group.WithOne.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.ZeroLEOne
+import Mathlib.Order.WithBot
#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"4dc134b97a3de65ef2ed881f3513d56260971562"
Renames:
CanonicallyOrderedMonoid
->
CanonicallyOrderedCommMonoid
CanonicallyOrderedAddMonoid
->
CanonicallyOrderedAddCommMonoid
CanonicallyLinearOrderedMonoid
->
CanonicallyLinearOrderedCommMonoid
CanonicallyLinearOrderedAddMonoid
->
CanonicallyLinearOrderedAddCommMonoid
@@ -30,10 +30,10 @@ instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
{ ‹LinearOrderedCommMonoidWithZero α› with }
#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
-instance (priority := 100) CanonicallyOrderedAddMonoid.toZeroLeOneClass
- [CanonicallyOrderedAddMonoid α] [One α] : ZeroLEOneClass α :=
+instance (priority := 100) canonicallyOrderedAddCommMonoid.toZeroLeOneClass
+ [CanonicallyOrderedAddCommMonoid α] [One α] : ZeroLEOneClass α :=
⟨zero_le 1⟩
-#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClass
+#align canonically_ordered_add_monoid.to_zero_le_one_class canonicallyOrderedAddCommMonoid.toZeroLeOneClass
namespace WithZero
@@ -143,7 +143,7 @@ protected def orderedAddCommMonoid [OrderedAddCommMonoid α] (zero_le : ∀ a :
add_le_add_left := @add_le_add_left _ _ _ (WithZero.covariantClass_add_le zero_le).. }
#align with_zero.ordered_add_comm_monoid WithZero.orderedAddCommMonoid
-section CanonicallyOrderedMonoid
+section CanonicallyOrderedCommMonoid
instance existsAddOfLE [Add α] [Preorder α] [ExistsAddOfLE α] :
ExistsAddOfLE (WithZero α) :=
@@ -159,8 +159,8 @@ instance existsAddOfLE [Add α] [Preorder α] [ExistsAddOfLE α] :
-- This instance looks absurd: a monoid already has a zero
/-- Adding a new zero to a canonically ordered additive monoid produces another one. -/
-instance canonicallyOrderedAddMonoid [CanonicallyOrderedAddMonoid α] :
- CanonicallyOrderedAddMonoid (WithZero α) :=
+instance canonicallyOrderedAddCommMonoid [CanonicallyOrderedAddCommMonoid α] :
+ CanonicallyOrderedAddCommMonoid (WithZero α) :=
{ WithZero.orderBot,
WithZero.orderedAddCommMonoid _root_.zero_le,
WithZero.existsAddOfLE with
@@ -170,17 +170,18 @@ instance canonicallyOrderedAddMonoid [CanonicallyOrderedAddMonoid α] :
induction b using WithZero.cases_on
· exact le_rfl
· exact WithZero.coe_le_coe.2 le_self_add }
-#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddMonoid
+#align with_zero.canonically_ordered_add_monoid WithZero.canonicallyOrderedAddCommMonoid
-end CanonicallyOrderedMonoid
+end CanonicallyOrderedCommMonoid
-section CanonicallyLinearOrderedMonoid
+section CanonicallyLinearOrderedCommMonoid
-instance canonicallyLinearOrderedAddMonoid (α : Type*)
- [CanonicallyLinearOrderedAddMonoid α] : CanonicallyLinearOrderedAddMonoid (WithZero α) :=
- { WithZero.canonicallyOrderedAddMonoid, WithZero.linearOrder with }
-#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddMonoid
+instance canonicallyLinearOrderedAddCommMonoid (α : Type*)
+ [CanonicallyLinearOrderedAddCommMonoid α] :
+ CanonicallyLinearOrderedAddCommMonoid (WithZero α) :=
+ { WithZero.canonicallyOrderedAddCommMonoid, WithZero.linearOrder with }
+#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddCommMonoid
-end CanonicallyLinearOrderedMonoid
+end CanonicallyLinearOrderedCommMonoid
end WithZero
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -19,7 +19,7 @@ universe u
variable {α : Type u}
/-- A linearly ordered commutative monoid with a zero element. -/
-class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMonoid α,
+class LinearOrderedCommMonoidWithZero (α : Type*) extends LinearOrderedCommMonoid α,
CommMonoidWithZero α where
/-- `0 ≤ 1` in any linearly ordered commutative monoid. -/
zero_le_one : (0 : α) ≤ 1
@@ -176,7 +176,7 @@ end CanonicallyOrderedMonoid
section CanonicallyLinearOrderedMonoid
-instance canonicallyLinearOrderedAddMonoid (α : Type _)
+instance canonicallyLinearOrderedAddMonoid (α : Type*)
[CanonicallyLinearOrderedAddMonoid α] : CanonicallyLinearOrderedAddMonoid (WithZero α) :=
{ WithZero.canonicallyOrderedAddMonoid, WithZero.linearOrder with }
#align with_zero.canonically_linear_ordered_add_monoid WithZero.canonicallyLinearOrderedAddMonoid
@@ -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.with_zero.defs
-! leanprover-community/mathlib commit 4dc134b97a3de65ef2ed881f3513d56260971562
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.WithOne.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.ZeroLEOne
+#align_import algebra.order.monoid.with_zero.defs from "leanprover-community/mathlib"@"4dc134b97a3de65ef2ed881f3513d56260971562"
+
/-!
# Adjoining a zero element to an ordered monoid.
-/
@@ -92,9 +92,17 @@ instance covariantClass_mul_le [Mul α] [Preorder α]
exact mul_le_mul_left' hbc' _
#align with_zero.covariant_class_mul_le WithZero.covariantClass_mul_le
--- Porting note: `simp` can prove these mathlib3 lemmas, so they are omitted.
-#noalign with_zero.le_max_iff
-#noalign with_zero.min_le_iff
+-- Porting note: @[simp] can prove this
+nonrec theorem le_max_iff [LinearOrder α] {a b c : α} :
+ (a : WithZero α) ≤ max (b : WithZero α) c ↔ a ≤ max b c := by
+ simp only [WithZero.coe_le_coe, le_max_iff]
+#align with_zero.le_max_iff WithZero.le_max_iff
+
+-- Porting note: @[simp] can prove this
+nonrec theorem min_le_iff [LinearOrder α] {a b c : α} :
+ min (a : WithZero α) b ≤ c ↔ min a b ≤ c := by
+ simp only [WithZero.coe_le_coe, min_le_iff]
+#align with_zero.min_le_iff WithZero.min_le_iff
instance orderedCommMonoid [OrderedCommMonoid α] : OrderedCommMonoid (WithZero α) :=
{ WithZero.commMonoidWithZero.toCommMonoid, WithZero.partialOrder with
@@ -31,14 +31,12 @@ class LinearOrderedCommMonoidWithZero (α : Type _) extends LinearOrderedCommMon
instance (priority := 100) LinearOrderedCommMonoidWithZero.toZeroLeOneClass
[LinearOrderedCommMonoidWithZero α] : ZeroLEOneClass α :=
{ ‹LinearOrderedCommMonoidWithZero α› with }
-#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class
- LinearOrderedCommMonoidWithZero.toZeroLeOneClass
+#align linear_ordered_comm_monoid_with_zero.to_zero_le_one_class LinearOrderedCommMonoidWithZero.toZeroLeOneClass
instance (priority := 100) CanonicallyOrderedAddMonoid.toZeroLeOneClass
[CanonicallyOrderedAddMonoid α] [One α] : ZeroLEOneClass α :=
⟨zero_le 1⟩
-#align
- canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClass
+#align canonically_ordered_add_monoid.to_zero_le_one_class CanonicallyOrderedAddMonoid.toZeroLeOneClass
namespace WithZero
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
@@ -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.with_zero.defs
+! leanprover-community/mathlib commit 4dc134b97a3de65ef2ed881f3513d56260971562
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.WithOne.Defs
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
All dependencies are ported!