algebra.regular.basic
⟷
Mathlib.Algebra.Regular.Basic
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -3,7 +3,7 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
-import Algebra.Group.Commute
+import Algebra.Group.Commute.Defs
import Algebra.Order.Monoid.Lemmas
import Algebra.GroupWithZero.Basic
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -408,37 +408,35 @@ theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a :=
end Monoid
-#print isLeftRegular_of_leftCancelSemigroup /-
+#print IsLeftRegular.all /-
/-- Elements of a left cancel semigroup are left regular. -/
@[to_additive "Elements of an add left cancel semigroup are add-left-regular."]
-theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R] (g : R) : IsLeftRegular g :=
+theorem IsLeftRegular.all [LeftCancelSemigroup R] (g : R) : IsLeftRegular g :=
mul_right_injective g
-#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroup
-#align is_add_left_regular_of_left_cancel_add_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
+#align is_left_regular_of_left_cancel_semigroup IsLeftRegular.all
+#align is_add_left_regular_of_left_cancel_add_semigroup IsAddLeftRegular.all
-/
-#print isRightRegular_of_rightCancelSemigroup /-
+#print IsRightRegular.all /-
/-- Elements of a right cancel semigroup are right regular. -/
@[to_additive "Elements of an add right cancel semigroup are add-right-regular"]
-theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R] (g : R) :
- IsRightRegular g :=
+theorem IsRightRegular.all [RightCancelSemigroup R] (g : R) : IsRightRegular g :=
mul_left_injective g
-#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroup
-#align is_add_right_regular_of_right_cancel_add_semigroup isAddRightRegular_of_addRightCancelSemigroup
+#align is_right_regular_of_right_cancel_semigroup IsRightRegular.all
-/
section CancelMonoid
variable [CancelMonoid R]
-#print isRegular_of_cancelMonoid /-
+#print IsRegular.all /-
/-- Elements of a cancel monoid are regular. Cancel semigroups do not appear to exist. -/
@[to_additive
"Elements of an add cancel monoid are regular. Add cancel semigroups do not appear to exist."]
-theorem isRegular_of_cancelMonoid (g : R) : IsRegular g :=
+theorem IsRegular.all (g : R) : IsRegular g :=
⟨mul_right_injective g, mul_left_injective g⟩
-#align is_regular_of_cancel_monoid isRegular_of_cancelMonoid
-#align is_add_regular_of_cancel_add_monoid isAddRegular_of_addCancelMonoid
+#align is_regular_of_cancel_monoid IsRegular.all
+#align is_add_regular_of_cancel_add_monoid IsAddRegular.all
-/
end CancelMonoid
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
-import Mathbin.Algebra.Group.Commute
-import Mathbin.Algebra.Order.Monoid.Lemmas
-import Mathbin.Algebra.GroupWithZero.Basic
+import Algebra.Group.Commute
+import Algebra.Order.Monoid.Lemmas
+import Algebra.GroupWithZero.Basic
#align_import algebra.regular.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-
-! This file was ported from Lean 3 source module algebra.regular.basic
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Group.Commute
import Mathbin.Algebra.Order.Monoid.Lemmas
import Mathbin.Algebra.GroupWithZero.Basic
+#align_import algebra.regular.basic from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
/-!
# Regular elements
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -109,13 +109,16 @@ section Semigroup
variable [Semigroup R] {a b : R}
+#print IsLeftRegular.mul /-
/-- In a semigroup, the product of left-regular elements is left-regular. -/
@[to_additive "In an additive semigroup, the sum of add-left-regular elements is add-left.regular."]
theorem IsLeftRegular.mul (lra : IsLeftRegular a) (lrb : IsLeftRegular b) : IsLeftRegular (a * b) :=
show Function.Injective ((· * ·) (a * b)) from comp_mul_left a b ▸ lra.comp lrb
#align is_left_regular.mul IsLeftRegular.mul
#align is_add_left_regular.add IsAddLeftRegular.add
+-/
+#print IsRightRegular.mul /-
/-- In a semigroup, the product of right-regular elements is right-regular. -/
@[to_additive
"In an additive semigroup, the sum of add-right-regular elements is add-right-regular."]
@@ -124,7 +127,9 @@ theorem IsRightRegular.mul (rra : IsRightRegular a) (rrb : IsRightRegular b) :
show Function.Injective (· * (a * b)) from comp_mul_right b a ▸ rrb.comp rra
#align is_right_regular.mul IsRightRegular.mul
#align is_add_right_regular.add IsAddRightRegular.add
+-/
+#print IsLeftRegular.of_mul /-
/-- If an element `b` becomes left-regular after multiplying it on the left by a left-regular
element, then `b` is left-regular. -/
@[to_additive
@@ -133,7 +138,9 @@ theorem IsLeftRegular.of_mul (ab : IsLeftRegular (a * b)) : IsLeftRegular b :=
Function.Injective.of_comp (by rwa [comp_mul_left a b])
#align is_left_regular.of_mul IsLeftRegular.of_mul
#align is_add_left_regular.of_add IsAddLeftRegular.of_add
+-/
+#print mul_isLeftRegular_iff /-
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[simp,
@@ -144,7 +151,9 @@ theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
⟨fun ab => IsLeftRegular.of_mul ab, fun ab => IsLeftRegular.mul ha ab⟩
#align mul_is_left_regular_iff mul_isLeftRegular_iff
#align add_is_add_left_regular_iff add_isAddLeftRegular_iff
+-/
+#print IsRightRegular.of_mul /-
/-- If an element `b` becomes right-regular after multiplying it on the right by a right-regular
element, then `b` is right-regular. -/
@[to_additive
@@ -156,7 +165,9 @@ theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b :
exact congr_fun (congr_arg (· * ·) xy) a
#align is_right_regular.of_mul IsRightRegular.of_mul
#align is_add_right_regular.of_add IsAddRightRegular.of_add
+-/
+#print mul_isRightRegular_iff /-
/-- An element is right-regular if and only if multiplying it on the right with a right-regular
element is right-regular. -/
@[simp,
@@ -167,7 +178,9 @@ theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
⟨fun ab => IsRightRegular.of_mul ab, fun ab => IsRightRegular.mul ab ha⟩
#align mul_is_right_regular_iff mul_isRightRegular_iff
#align add_is_add_right_regular_iff add_isAddRightRegular_iff
+-/
+#print isRegular_mul_and_mul_iff /-
/-- Two elements `a` and `b` are regular if and only if both products `a * b` and `b * a`
are regular. -/
@[to_additive
@@ -188,7 +201,9 @@ theorem isRegular_mul_and_mul_iff :
(mul_isRightRegular_iff _ ha.right).mpr hb.right⟩⟩
#align is_regular_mul_and_mul_iff isRegular_mul_and_mul_iff
#align is_add_regular_add_and_add_iff isAddRegular_add_and_add_iff
+-/
+#print IsRegular.and_of_mul_of_mul /-
/-- The "most used" implication of `mul_and_mul_iff`, with split hypotheses, instead of `∧`. -/
@[to_additive
"The \"most used\" implication of `add_and_add_iff`, with split hypotheses,\ninstead of `∧`."]
@@ -197,6 +212,7 @@ theorem IsRegular.and_of_mul_of_mul (ab : IsRegular (a * b)) (ba : IsRegular (b
isRegular_mul_and_mul_iff.mp ⟨ab, ba⟩
#align is_regular.and_of_mul_of_mul IsRegular.and_of_mul_of_mul
#align is_add_regular.and_of_add_of_add IsAddRegular.and_of_add_of_add
+-/
end Semigroup
@@ -204,26 +220,35 @@ section MulZeroClass
variable [MulZeroClass R] {a b : R}
+#print IsLeftRegular.subsingleton /-
/-- The element `0` is left-regular if and only if `R` is trivial. -/
theorem IsLeftRegular.subsingleton (h : IsLeftRegular (0 : R)) : Subsingleton R :=
⟨fun a b => h <| Eq.trans (MulZeroClass.zero_mul a) (MulZeroClass.zero_mul b).symm⟩
#align is_left_regular.subsingleton IsLeftRegular.subsingleton
+-/
+#print IsRightRegular.subsingleton /-
/-- The element `0` is right-regular if and only if `R` is trivial. -/
theorem IsRightRegular.subsingleton (h : IsRightRegular (0 : R)) : Subsingleton R :=
⟨fun a b => h <| Eq.trans (MulZeroClass.mul_zero a) (MulZeroClass.mul_zero b).symm⟩
#align is_right_regular.subsingleton IsRightRegular.subsingleton
+-/
+#print IsRegular.subsingleton /-
/-- The element `0` is regular if and only if `R` is trivial. -/
theorem IsRegular.subsingleton (h : IsRegular (0 : R)) : Subsingleton R :=
h.left.Subsingleton
#align is_regular.subsingleton IsRegular.subsingleton
+-/
+#print isLeftRegular_zero_iff_subsingleton /-
/-- The element `0` is left-regular if and only if `R` is trivial. -/
theorem isLeftRegular_zero_iff_subsingleton : IsLeftRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_left_regular_zero_iff_subsingleton isLeftRegular_zero_iff_subsingleton
+-/
+#print not_isLeftRegular_zero_iff /-
/-- In a non-trivial `mul_zero_class`, the `0` element is not left-regular. -/
theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R :=
by
@@ -231,12 +256,16 @@ theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R :=
push_neg
exact Iff.rfl
#align not_is_left_regular_zero_iff not_isLeftRegular_zero_iff
+-/
+#print isRightRegular_zero_iff_subsingleton /-
/-- The element `0` is right-regular if and only if `R` is trivial. -/
theorem isRightRegular_zero_iff_subsingleton : IsRightRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_right_regular_zero_iff_subsingleton isRightRegular_zero_iff_subsingleton
+-/
+#print not_isRightRegular_zero_iff /-
/-- In a non-trivial `mul_zero_class`, the `0` element is not right-regular. -/
theorem not_isRightRegular_zero_iff : ¬IsRightRegular (0 : R) ↔ Nontrivial R :=
by
@@ -244,13 +273,17 @@ theorem not_isRightRegular_zero_iff : ¬IsRightRegular (0 : R) ↔ Nontrivial R
push_neg
exact Iff.rfl
#align not_is_right_regular_zero_iff not_isRightRegular_zero_iff
+-/
+#print isRegular_iff_subsingleton /-
/-- The element `0` is regular if and only if `R` is trivial. -/
theorem isRegular_iff_subsingleton : IsRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.left.Subsingleton, fun h =>
⟨isLeftRegular_zero_iff_subsingleton.mpr h, isRightRegular_zero_iff_subsingleton.mpr h⟩⟩
#align is_regular_iff_subsingleton isRegular_iff_subsingleton
+-/
+#print IsLeftRegular.ne_zero /-
/-- A left-regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsLeftRegular.ne_zero [Nontrivial R] (la : IsLeftRegular a) : a ≠ 0 :=
by
@@ -259,7 +292,9 @@ theorem IsLeftRegular.ne_zero [Nontrivial R] (la : IsLeftRegular a) : a ≠ 0 :=
refine' xy (la _)
rw [MulZeroClass.zero_mul, MulZeroClass.zero_mul]
#align is_left_regular.ne_zero IsLeftRegular.ne_zero
+-/
+#print IsRightRegular.ne_zero /-
/-- A right-regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsRightRegular.ne_zero [Nontrivial R] (ra : IsRightRegular a) : a ≠ 0 :=
by
@@ -268,25 +303,34 @@ theorem IsRightRegular.ne_zero [Nontrivial R] (ra : IsRightRegular a) : a ≠ 0
refine' xy (ra (_ : x * 0 = y * 0))
rw [MulZeroClass.mul_zero, MulZeroClass.mul_zero]
#align is_right_regular.ne_zero IsRightRegular.ne_zero
+-/
+#print IsRegular.ne_zero /-
/-- A regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsRegular.ne_zero [Nontrivial R] (la : IsRegular a) : a ≠ 0 :=
la.left.NeZero
#align is_regular.ne_zero IsRegular.ne_zero
+-/
+#print not_isLeftRegular_zero /-
/-- In a non-trivial ring, the element `0` is not left-regular -- with typeclasses. -/
theorem not_isLeftRegular_zero [nR : Nontrivial R] : ¬IsLeftRegular (0 : R) :=
not_isLeftRegular_zero_iff.mpr nR
#align not_is_left_regular_zero not_isLeftRegular_zero
+-/
+#print not_isRightRegular_zero /-
/-- In a non-trivial ring, the element `0` is not right-regular -- with typeclasses. -/
theorem not_isRightRegular_zero [nR : Nontrivial R] : ¬IsRightRegular (0 : R) :=
not_isRightRegular_zero_iff.mpr nR
#align not_is_right_regular_zero not_isRightRegular_zero
+-/
+#print not_isRegular_zero /-
/-- In a non-trivial ring, the element `0` is not regular -- with typeclasses. -/
theorem not_isRegular_zero [Nontrivial R] : ¬IsRegular (0 : R) := fun h => IsRegular.ne_zero h rfl
#align not_is_regular_zero not_isRegular_zero
+-/
end MulZeroClass
@@ -294,6 +338,7 @@ section MulOneClass
variable [MulOneClass R]
+#print isRegular_one /-
/-- If multiplying by `1` on either side is the identity, `1` is regular. -/
@[to_additive "If adding `0` on either side is the identity, `0` is regular."]
theorem isRegular_one : IsRegular (1 : R) :=
@@ -301,6 +346,7 @@ theorem isRegular_one : IsRegular (1 : R) :=
(mul_one a).symm.trans (Eq.trans ab (mul_one b))⟩
#align is_regular_one isRegular_one
#align is_add_regular_zero isAddRegular_zero
+-/
end MulOneClass
@@ -308,6 +354,7 @@ section CommSemigroup
variable [CommSemigroup R] {a b : R}
+#print isRegular_mul_iff /-
/-- A product is regular if and only if the factors are. -/
@[to_additive "A sum is add-regular if and only if the summands are."]
theorem isRegular_mul_iff : IsRegular (a * b) ↔ IsRegular a ∧ IsRegular b :=
@@ -316,6 +363,7 @@ theorem isRegular_mul_iff : IsRegular (a * b) ↔ IsRegular a ∧ IsRegular b :=
refine' ⟨fun ab => ⟨ab, by rwa [mul_comm]⟩, fun rab => rab.1⟩
#align is_regular_mul_iff isRegular_mul_iff
#align is_add_regular_add_iff isAddRegular_add_iff
+-/
end CommSemigroup
@@ -323,27 +371,34 @@ section Monoid
variable [Monoid R] {a b : R}
+#print isLeftRegular_of_mul_eq_one /-
/-- An element admitting a left inverse is left-regular. -/
@[to_additive "An element admitting a left additive opposite is add-left-regular."]
theorem isLeftRegular_of_mul_eq_one (h : b * a = 1) : IsLeftRegular a :=
@IsLeftRegular.of_mul R _ _ _ (by rw [h]; exact is_regular_one.left)
#align is_left_regular_of_mul_eq_one isLeftRegular_of_mul_eq_one
#align is_add_left_regular_of_add_eq_zero isAddLeftRegular_of_add_eq_zero
+-/
+#print isRightRegular_of_mul_eq_one /-
/-- An element admitting a right inverse is right-regular. -/
@[to_additive "An element admitting a right additive opposite is add-right-regular."]
theorem isRightRegular_of_mul_eq_one (h : a * b = 1) : IsRightRegular a :=
IsRightRegular.of_mul (by rw [h]; exact is_regular_one.right)
#align is_right_regular_of_mul_eq_one isRightRegular_of_mul_eq_one
#align is_add_right_regular_of_add_eq_zero isAddRightRegular_of_add_eq_zero
+-/
+#print Units.isRegular /-
/-- If `R` is a monoid, an element in `Rˣ` is regular. -/
@[to_additive "If `R` is an additive monoid, an element in `add_units R` is add-regular."]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R) :=
⟨isLeftRegular_of_mul_eq_one a.inv_mul, isRightRegular_of_mul_eq_one a.mul_inv⟩
#align units.is_regular Units.isRegular
#align add_units.is_add_regular AddUnits.isAddRegular
+-/
+#print IsUnit.isRegular /-
/-- A unit in a monoid is regular. -/
@[to_additive "An additive unit in an additive monoid is add-regular."]
theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a :=
@@ -352,16 +407,20 @@ theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a :=
exact Units.isRegular a
#align is_unit.is_regular IsUnit.isRegular
#align is_add_unit.is_add_regular IsAddUnit.isAddRegular
+-/
end Monoid
+#print isLeftRegular_of_leftCancelSemigroup /-
/-- Elements of a left cancel semigroup are left regular. -/
@[to_additive "Elements of an add left cancel semigroup are add-left-regular."]
theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R] (g : R) : IsLeftRegular g :=
mul_right_injective g
#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroup
#align is_add_left_regular_of_left_cancel_add_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
+-/
+#print isRightRegular_of_rightCancelSemigroup /-
/-- Elements of a right cancel semigroup are right regular. -/
@[to_additive "Elements of an add right cancel semigroup are add-right-regular"]
theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R] (g : R) :
@@ -369,11 +428,13 @@ theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R] (g : R)
mul_left_injective g
#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroup
#align is_add_right_regular_of_right_cancel_add_semigroup isAddRightRegular_of_addRightCancelSemigroup
+-/
section CancelMonoid
variable [CancelMonoid R]
+#print isRegular_of_cancelMonoid /-
/-- Elements of a cancel monoid are regular. Cancel semigroups do not appear to exist. -/
@[to_additive
"Elements of an add cancel monoid are regular. Add cancel semigroups do not appear to exist."]
@@ -381,6 +442,7 @@ theorem isRegular_of_cancelMonoid (g : R) : IsRegular g :=
⟨mul_right_injective g, mul_left_injective g⟩
#align is_regular_of_cancel_monoid isRegular_of_cancelMonoid
#align is_add_regular_of_cancel_add_monoid isAddRegular_of_addCancelMonoid
+-/
end CancelMonoid
@@ -388,15 +450,19 @@ section CancelMonoidWithZero
variable [CancelMonoidWithZero R] {a : R}
+#print isRegular_of_ne_zero /-
/-- Non-zero elements of an integral domain are regular. -/
theorem isRegular_of_ne_zero (a0 : a ≠ 0) : IsRegular a :=
⟨fun b c => (mul_right_inj' a0).mp, fun b c => (mul_left_inj' a0).mp⟩
#align is_regular_of_ne_zero isRegular_of_ne_zero
+-/
+#print isRegular_iff_ne_zero /-
/-- In a non-trivial integral domain, an element is regular iff it is non-zero. -/
theorem isRegular_iff_ne_zero [Nontrivial R] : IsRegular a ↔ a ≠ 0 :=
⟨IsRegular.ne_zero, isRegular_of_ne_zero⟩
#align is_regular_iff_ne_zero isRegular_iff_ne_zero
+-/
end CancelMonoidWithZero
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -82,12 +82,14 @@ structure IsRegular (c : R) : Prop where
attribute [to_additive] IsRegular
+#print MulLECancellable.isLeftRegular /-
@[to_additive]
protected theorem MulLECancellable.isLeftRegular [PartialOrder R] {a : R}
(ha : MulLECancellable a) : IsLeftRegular a :=
ha.Injective
#align mul_le_cancellable.is_left_regular MulLECancellable.isLeftRegular
#align add_le_cancellable.is_add_left_regular AddLECancellable.isAddLeftRegular
+-/
#print IsLeftRegular.right_of_commute /-
theorem IsLeftRegular.right_of_commute {a : R} (ca : ∀ b, Commute a b) (h : IsLeftRegular a) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -82,12 +82,6 @@ structure IsRegular (c : R) : Prop where
attribute [to_additive] IsRegular
-/- warning: mul_le_cancellable.is_left_regular -> MulLECancellable.isLeftRegular is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Mul.{u1} R] [_inst_2 : PartialOrder.{u1} R] {a : R}, (MulLECancellable.{u1} R _inst_1 (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R _inst_2)) a) -> (IsLeftRegular.{u1} R _inst_1 a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Mul.{u1} R] [_inst_2 : PartialOrder.{u1} R] {a : R}, (MulLECancellable.{u1} R _inst_1 (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R _inst_2)) a) -> (IsLeftRegular.{u1} R _inst_1 a)
-Case conversion may be inaccurate. Consider using '#align mul_le_cancellable.is_left_regular MulLECancellable.isLeftRegularₓ'. -/
@[to_additive]
protected theorem MulLECancellable.isLeftRegular [PartialOrder R] {a : R}
(ha : MulLECancellable a) : IsLeftRegular a :=
@@ -113,12 +107,6 @@ section Semigroup
variable [Semigroup R] {a b : R}
-/- warning: is_left_regular.mul -> IsLeftRegular.mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) -> (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b) -> (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) -> (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b) -> (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align is_left_regular.mul IsLeftRegular.mulₓ'. -/
/-- In a semigroup, the product of left-regular elements is left-regular. -/
@[to_additive "In an additive semigroup, the sum of add-left-regular elements is add-left.regular."]
theorem IsLeftRegular.mul (lra : IsLeftRegular a) (lrb : IsLeftRegular b) : IsLeftRegular (a * b) :=
@@ -126,12 +114,6 @@ theorem IsLeftRegular.mul (lra : IsLeftRegular a) (lrb : IsLeftRegular b) : IsLe
#align is_left_regular.mul IsLeftRegular.mul
#align is_add_left_regular.add IsAddLeftRegular.add
-/- warning: is_right_regular.mul -> IsRightRegular.mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) -> (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b) -> (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) -> (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b) -> (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b))
-Case conversion may be inaccurate. Consider using '#align is_right_regular.mul IsRightRegular.mulₓ'. -/
/-- In a semigroup, the product of right-regular elements is right-regular. -/
@[to_additive
"In an additive semigroup, the sum of add-right-regular elements is add-right-regular."]
@@ -141,12 +123,6 @@ theorem IsRightRegular.mul (rra : IsRightRegular a) (rrb : IsRightRegular b) :
#align is_right_regular.mul IsRightRegular.mul
#align is_add_right_regular.add IsAddRightRegular.add
-/- warning: is_left_regular.of_mul -> IsLeftRegular.of_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b)) -> (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b)) -> (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b)
-Case conversion may be inaccurate. Consider using '#align is_left_regular.of_mul IsLeftRegular.of_mulₓ'. -/
/-- If an element `b` becomes left-regular after multiplying it on the left by a left-regular
element, then `b` is left-regular. -/
@[to_additive
@@ -156,12 +132,6 @@ theorem IsLeftRegular.of_mul (ab : IsLeftRegular (a * b)) : IsLeftRegular b :=
#align is_left_regular.of_mul IsLeftRegular.of_mul
#align is_add_left_regular.of_add IsAddLeftRegular.of_add
-/- warning: mul_is_left_regular_iff -> mul_isLeftRegular_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} (b : R), (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) -> (Iff (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b)) (IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} (b : R), (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) -> (Iff (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b)) (IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align mul_is_left_regular_iff mul_isLeftRegular_iffₓ'. -/
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[simp,
@@ -173,12 +143,6 @@ theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
#align mul_is_left_regular_iff mul_isLeftRegular_iff
#align add_is_add_left_regular_iff add_isAddLeftRegular_iff
-/- warning: is_right_regular.of_mul -> IsRightRegular.of_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) b a)) -> (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) b a)) -> (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b)
-Case conversion may be inaccurate. Consider using '#align is_right_regular.of_mul IsRightRegular.of_mulₓ'. -/
/-- If an element `b` becomes right-regular after multiplying it on the right by a right-regular
element, then `b` is right-regular. -/
@[to_additive
@@ -191,12 +155,6 @@ theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b :
#align is_right_regular.of_mul IsRightRegular.of_mul
#align is_add_right_regular.of_add IsAddRightRegular.of_add
-/- warning: mul_is_right_regular_iff -> mul_isRightRegular_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} (b : R), (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) -> (Iff (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) b a)) (IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} (b : R), (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) -> (Iff (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) b a)) (IsRightRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align mul_is_right_regular_iff mul_isRightRegular_iffₓ'. -/
/-- An element is right-regular if and only if multiplying it on the right with a right-regular
element is right-regular. -/
@[simp,
@@ -208,12 +166,6 @@ theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
#align mul_is_right_regular_iff mul_isRightRegular_iff
#align add_is_add_right_regular_iff add_isAddRightRegular_iff
-/- warning: is_regular_mul_and_mul_iff -> isRegular_mul_and_mul_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, Iff (And (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b)) (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) b a))) (And (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, Iff (And (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b)) (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) b a))) (And (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align is_regular_mul_and_mul_iff isRegular_mul_and_mul_iffₓ'. -/
/-- Two elements `a` and `b` are regular if and only if both products `a * b` and `b * a`
are regular. -/
@[to_additive
@@ -235,12 +187,6 @@ theorem isRegular_mul_and_mul_iff :
#align is_regular_mul_and_mul_iff isRegular_mul_and_mul_iff
#align is_add_regular_add_and_add_iff isAddRegular_add_and_add_iff
-/- warning: is_regular.and_of_mul_of_mul -> IsRegular.and_of_mul_of_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) a b)) -> (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R _inst_1)) b a)) -> (And (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) a) (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R _inst_1) b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Semigroup.{u1} R] {a : R} {b : R}, (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) a b)) -> (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R _inst_1)) b a)) -> (And (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) a) (IsRegular.{u1} R (Semigroup.toMul.{u1} R _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align is_regular.and_of_mul_of_mul IsRegular.and_of_mul_of_mulₓ'. -/
/-- The "most used" implication of `mul_and_mul_iff`, with split hypotheses, instead of `∧`. -/
@[to_additive
"The \"most used\" implication of `add_and_add_iff`, with split hypotheses,\ninstead of `∧`."]
@@ -256,56 +202,26 @@ section MulZeroClass
variable [MulZeroClass R] {a b : R}
-/- warning: is_left_regular.subsingleton -> IsLeftRegular.subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsLeftRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) -> (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsLeftRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) -> (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_left_regular.subsingleton IsLeftRegular.subsingletonₓ'. -/
/-- The element `0` is left-regular if and only if `R` is trivial. -/
theorem IsLeftRegular.subsingleton (h : IsLeftRegular (0 : R)) : Subsingleton R :=
⟨fun a b => h <| Eq.trans (MulZeroClass.zero_mul a) (MulZeroClass.zero_mul b).symm⟩
#align is_left_regular.subsingleton IsLeftRegular.subsingleton
-/- warning: is_right_regular.subsingleton -> IsRightRegular.subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsRightRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) -> (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsRightRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) -> (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_right_regular.subsingleton IsRightRegular.subsingletonₓ'. -/
/-- The element `0` is right-regular if and only if `R` is trivial. -/
theorem IsRightRegular.subsingleton (h : IsRightRegular (0 : R)) : Subsingleton R :=
⟨fun a b => h <| Eq.trans (MulZeroClass.mul_zero a) (MulZeroClass.mul_zero b).symm⟩
#align is_right_regular.subsingleton IsRightRegular.subsingleton
-/- warning: is_regular.subsingleton -> IsRegular.subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) -> (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) -> (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_regular.subsingleton IsRegular.subsingletonₓ'. -/
/-- The element `0` is regular if and only if `R` is trivial. -/
theorem IsRegular.subsingleton (h : IsRegular (0 : R)) : Subsingleton R :=
h.left.Subsingleton
#align is_regular.subsingleton IsRegular.subsingleton
-/- warning: is_left_regular_zero_iff_subsingleton -> isLeftRegular_zero_iff_subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsLeftRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsLeftRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_left_regular_zero_iff_subsingleton isLeftRegular_zero_iff_subsingletonₓ'. -/
/-- The element `0` is left-regular if and only if `R` is trivial. -/
theorem isLeftRegular_zero_iff_subsingleton : IsLeftRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_left_regular_zero_iff_subsingleton isLeftRegular_zero_iff_subsingleton
-/- warning: not_is_left_regular_zero_iff -> not_isLeftRegular_zero_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (Not (IsLeftRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))) (Nontrivial.{u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (Not (IsLeftRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))) (Nontrivial.{u1} R)
-Case conversion may be inaccurate. Consider using '#align not_is_left_regular_zero_iff not_isLeftRegular_zero_iffₓ'. -/
/-- In a non-trivial `mul_zero_class`, the `0` element is not left-regular. -/
theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R :=
by
@@ -314,23 +230,11 @@ theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R :=
exact Iff.rfl
#align not_is_left_regular_zero_iff not_isLeftRegular_zero_iff
-/- warning: is_right_regular_zero_iff_subsingleton -> isRightRegular_zero_iff_subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsRightRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsRightRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_right_regular_zero_iff_subsingleton isRightRegular_zero_iff_subsingletonₓ'. -/
/-- The element `0` is right-regular if and only if `R` is trivial. -/
theorem isRightRegular_zero_iff_subsingleton : IsRightRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_right_regular_zero_iff_subsingleton isRightRegular_zero_iff_subsingleton
-/- warning: not_is_right_regular_zero_iff -> not_isRightRegular_zero_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (Not (IsRightRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))) (Nontrivial.{u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (Not (IsRightRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))) (Nontrivial.{u1} R)
-Case conversion may be inaccurate. Consider using '#align not_is_right_regular_zero_iff not_isRightRegular_zero_iffₓ'. -/
/-- In a non-trivial `mul_zero_class`, the `0` element is not right-regular. -/
theorem not_isRightRegular_zero_iff : ¬IsRightRegular (0 : R) ↔ Nontrivial R :=
by
@@ -339,24 +243,12 @@ theorem not_isRightRegular_zero_iff : ¬IsRightRegular (0 : R) ↔ Nontrivial R
exact Iff.rfl
#align not_is_right_regular_zero_iff not_isRightRegular_zero_iff
-/- warning: is_regular_iff_subsingleton -> isRegular_iff_subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1))))) (Subsingleton.{succ u1} R)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R], Iff (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1)))) (Subsingleton.{succ u1} R)
-Case conversion may be inaccurate. Consider using '#align is_regular_iff_subsingleton isRegular_iff_subsingletonₓ'. -/
/-- The element `0` is regular if and only if `R` is trivial. -/
theorem isRegular_iff_subsingleton : IsRegular (0 : R) ↔ Subsingleton R :=
⟨fun h => h.left.Subsingleton, fun h =>
⟨isLeftRegular_zero_iff_subsingleton.mpr h, isRightRegular_zero_iff_subsingleton.mpr h⟩⟩
#align is_regular_iff_subsingleton isRegular_iff_subsingleton
-/- warning: is_left_regular.ne_zero -> IsLeftRegular.ne_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsLeftRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsLeftRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align is_left_regular.ne_zero IsLeftRegular.ne_zeroₓ'. -/
/-- A left-regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsLeftRegular.ne_zero [Nontrivial R] (la : IsLeftRegular a) : a ≠ 0 :=
by
@@ -366,12 +258,6 @@ theorem IsLeftRegular.ne_zero [Nontrivial R] (la : IsLeftRegular a) : a ≠ 0 :=
rw [MulZeroClass.zero_mul, MulZeroClass.zero_mul]
#align is_left_regular.ne_zero IsLeftRegular.ne_zero
-/- warning: is_right_regular.ne_zero -> IsRightRegular.ne_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsRightRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsRightRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align is_right_regular.ne_zero IsRightRegular.ne_zeroₓ'. -/
/-- A right-regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsRightRegular.ne_zero [Nontrivial R] (ra : IsRightRegular a) : a ≠ 0 :=
by
@@ -381,45 +267,21 @@ theorem IsRightRegular.ne_zero [Nontrivial R] (ra : IsRightRegular a) : a ≠ 0
rw [MulZeroClass.mul_zero, MulZeroClass.mul_zero]
#align is_right_regular.ne_zero IsRightRegular.ne_zero
-/- warning: is_regular.ne_zero -> IsRegular.ne_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) a) -> (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align is_regular.ne_zero IsRegular.ne_zeroₓ'. -/
/-- A regular element of a `nontrivial` `mul_zero_class` is non-zero. -/
theorem IsRegular.ne_zero [Nontrivial R] (la : IsRegular a) : a ≠ 0 :=
la.left.NeZero
#align is_regular.ne_zero IsRegular.ne_zero
-/- warning: not_is_left_regular_zero -> not_isLeftRegular_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [nR : Nontrivial.{u1} R], Not (IsLeftRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [nR : Nontrivial.{u1} R], Not (IsLeftRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align not_is_left_regular_zero not_isLeftRegular_zeroₓ'. -/
/-- In a non-trivial ring, the element `0` is not left-regular -- with typeclasses. -/
theorem not_isLeftRegular_zero [nR : Nontrivial R] : ¬IsLeftRegular (0 : R) :=
not_isLeftRegular_zero_iff.mpr nR
#align not_is_left_regular_zero not_isLeftRegular_zero
-/- warning: not_is_right_regular_zero -> not_isRightRegular_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [nR : Nontrivial.{u1} R], Not (IsRightRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [nR : Nontrivial.{u1} R], Not (IsRightRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align not_is_right_regular_zero not_isRightRegular_zeroₓ'. -/
/-- In a non-trivial ring, the element `0` is not right-regular -- with typeclasses. -/
theorem not_isRightRegular_zero [nR : Nontrivial R] : ¬IsRightRegular (0 : R) :=
not_isRightRegular_zero_iff.mpr nR
#align not_is_right_regular_zero not_isRightRegular_zero
-/- warning: not_is_regular_zero -> not_isRegular_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [_inst_2 : Nontrivial.{u1} R], Not (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulZeroClass.{u1} R] [_inst_2 : Nontrivial.{u1} R], Not (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MulZeroClass.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align not_is_regular_zero not_isRegular_zeroₓ'. -/
/-- In a non-trivial ring, the element `0` is not regular -- with typeclasses. -/
theorem not_isRegular_zero [Nontrivial R] : ¬IsRegular (0 : R) := fun h => IsRegular.ne_zero h rfl
#align not_is_regular_zero not_isRegular_zero
@@ -430,12 +292,6 @@ section MulOneClass
variable [MulOneClass R]
-/- warning: is_regular_one -> isRegular_one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : MulOneClass.{u1} R], IsRegular.{u1} R (MulOneClass.toHasMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (MulOneClass.toHasOne.{u1} R _inst_1))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : MulOneClass.{u1} R], IsRegular.{u1} R (MulOneClass.toMul.{u1} R _inst_1) (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (MulOneClass.toOne.{u1} R _inst_1)))
-Case conversion may be inaccurate. Consider using '#align is_regular_one isRegular_oneₓ'. -/
/-- If multiplying by `1` on either side is the identity, `1` is regular. -/
@[to_additive "If adding `0` on either side is the identity, `0` is regular."]
theorem isRegular_one : IsRegular (1 : R) :=
@@ -450,12 +306,6 @@ section CommSemigroup
variable [CommSemigroup R] {a b : R}
-/- warning: is_regular_mul_iff -> isRegular_mul_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CommSemigroup.{u1} R] {a : R} {b : R}, Iff (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1))) a b)) (And (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) a) (IsRegular.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) b))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CommSemigroup.{u1} R] {a : R} {b : R}, Iff (IsRegular.{u1} R (Semigroup.toMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1))) a b)) (And (IsRegular.{u1} R (Semigroup.toMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) a) (IsRegular.{u1} R (Semigroup.toMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1)) b))
-Case conversion may be inaccurate. Consider using '#align is_regular_mul_iff isRegular_mul_iffₓ'. -/
/-- A product is regular if and only if the factors are. -/
@[to_additive "A sum is add-regular if and only if the summands are."]
theorem isRegular_mul_iff : IsRegular (a * b) ↔ IsRegular a ∧ IsRegular b :=
@@ -471,12 +321,6 @@ section Monoid
variable [Monoid R] {a b : R}
-/- warning: is_left_regular_of_mul_eq_one -> isLeftRegular_of_mul_eq_one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R} {b : R}, (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1))) b a) (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (MulOneClass.toHasOne.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)))))) -> (IsLeftRegular.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R} {b : R}, (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1))) b a) (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Monoid.toOne.{u1} R _inst_1)))) -> (IsLeftRegular.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-Case conversion may be inaccurate. Consider using '#align is_left_regular_of_mul_eq_one isLeftRegular_of_mul_eq_oneₓ'. -/
/-- An element admitting a left inverse is left-regular. -/
@[to_additive "An element admitting a left additive opposite is add-left-regular."]
theorem isLeftRegular_of_mul_eq_one (h : b * a = 1) : IsLeftRegular a :=
@@ -484,12 +328,6 @@ theorem isLeftRegular_of_mul_eq_one (h : b * a = 1) : IsLeftRegular a :=
#align is_left_regular_of_mul_eq_one isLeftRegular_of_mul_eq_one
#align is_add_left_regular_of_add_eq_zero isAddLeftRegular_of_add_eq_zero
-/- warning: is_right_regular_of_mul_eq_one -> isRightRegular_of_mul_eq_one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R} {b : R}, (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1))) a b) (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (MulOneClass.toHasOne.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)))))) -> (IsRightRegular.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R} {b : R}, (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1))) a b) (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Monoid.toOne.{u1} R _inst_1)))) -> (IsRightRegular.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-Case conversion may be inaccurate. Consider using '#align is_right_regular_of_mul_eq_one isRightRegular_of_mul_eq_oneₓ'. -/
/-- An element admitting a right inverse is right-regular. -/
@[to_additive "An element admitting a right additive opposite is add-right-regular."]
theorem isRightRegular_of_mul_eq_one (h : a * b = 1) : IsRightRegular a :=
@@ -497,12 +335,6 @@ theorem isRightRegular_of_mul_eq_one (h : a * b = 1) : IsRightRegular a :=
#align is_right_regular_of_mul_eq_one isRightRegular_of_mul_eq_one
#align is_add_right_regular_of_add_eq_zero isAddRightRegular_of_add_eq_zero
-/- warning: units.is_regular -> Units.isRegular is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] (a : Units.{u1} R _inst_1), IsRegular.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Units.{u1} R _inst_1) R (HasLiftT.mk.{succ u1, succ u1} (Units.{u1} R _inst_1) R (CoeTCₓ.coe.{succ u1, succ u1} (Units.{u1} R _inst_1) R (coeBase.{succ u1, succ u1} (Units.{u1} R _inst_1) R (Units.hasCoe.{u1} R _inst_1)))) a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] (a : Units.{u1} R _inst_1), IsRegular.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) (Units.val.{u1} R _inst_1 a)
-Case conversion may be inaccurate. Consider using '#align units.is_regular Units.isRegularₓ'. -/
/-- If `R` is a monoid, an element in `Rˣ` is regular. -/
@[to_additive "If `R` is an additive monoid, an element in `add_units R` is add-regular."]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R) :=
@@ -510,12 +342,6 @@ theorem Units.isRegular (a : Rˣ) : IsRegular (a : R) :=
#align units.is_regular Units.isRegular
#align add_units.is_add_regular AddUnits.isAddRegular
-/- warning: is_unit.is_regular -> IsUnit.isRegular is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R}, (IsUnit.{u1} R _inst_1 a) -> (IsRegular.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : Monoid.{u1} R] {a : R}, (IsUnit.{u1} R _inst_1 a) -> (IsRegular.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)) a)
-Case conversion may be inaccurate. Consider using '#align is_unit.is_regular IsUnit.isRegularₓ'. -/
/-- A unit in a monoid is regular. -/
@[to_additive "An additive unit in an additive monoid is add-regular."]
theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a :=
@@ -527,12 +353,6 @@ theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a :=
end Monoid
-/- warning: is_left_regular_of_left_cancel_semigroup -> isLeftRegular_of_leftCancelSemigroup is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : LeftCancelSemigroup.{u1} R] (g : R), IsLeftRegular.{u1} R (Semigroup.toHasMul.{u1} R (LeftCancelSemigroup.toSemigroup.{u1} R _inst_1)) g
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : LeftCancelSemigroup.{u1} R] (g : R), IsLeftRegular.{u1} R (Semigroup.toMul.{u1} R (LeftCancelSemigroup.toSemigroup.{u1} R _inst_1)) g
-Case conversion may be inaccurate. Consider using '#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroupₓ'. -/
/-- Elements of a left cancel semigroup are left regular. -/
@[to_additive "Elements of an add left cancel semigroup are add-left-regular."]
theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R] (g : R) : IsLeftRegular g :=
@@ -540,12 +360,6 @@ theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R] (g : R) : I
#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroup
#align is_add_left_regular_of_left_cancel_add_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
-/- warning: is_right_regular_of_right_cancel_semigroup -> isRightRegular_of_rightCancelSemigroup is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : RightCancelSemigroup.{u1} R] (g : R), IsRightRegular.{u1} R (Semigroup.toHasMul.{u1} R (RightCancelSemigroup.toSemigroup.{u1} R _inst_1)) g
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : RightCancelSemigroup.{u1} R] (g : R), IsRightRegular.{u1} R (Semigroup.toMul.{u1} R (RightCancelSemigroup.toSemigroup.{u1} R _inst_1)) g
-Case conversion may be inaccurate. Consider using '#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroupₓ'. -/
/-- Elements of a right cancel semigroup are right regular. -/
@[to_additive "Elements of an add right cancel semigroup are add-right-regular"]
theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R] (g : R) :
@@ -558,12 +372,6 @@ section CancelMonoid
variable [CancelMonoid R]
-/- warning: is_regular_of_cancel_monoid -> isRegular_of_cancelMonoid is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CancelMonoid.{u1} R] (g : R), IsRegular.{u1} R (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R (RightCancelMonoid.toMonoid.{u1} R (CancelMonoid.toRightCancelMonoid.{u1} R _inst_1)))) g
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CancelMonoid.{u1} R] (g : R), IsRegular.{u1} R (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R (RightCancelMonoid.toMonoid.{u1} R (CancelMonoid.toRightCancelMonoid.{u1} R _inst_1)))) g
-Case conversion may be inaccurate. Consider using '#align is_regular_of_cancel_monoid isRegular_of_cancelMonoidₓ'. -/
/-- Elements of a cancel monoid are regular. Cancel semigroups do not appear to exist. -/
@[to_additive
"Elements of an add cancel monoid are regular. Add cancel semigroups do not appear to exist."]
@@ -578,23 +386,11 @@ section CancelMonoidWithZero
variable [CancelMonoidWithZero R] {a : R}
-/- warning: is_regular_of_ne_zero -> isRegular_of_ne_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} R] {a : R}, (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))))))) -> (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))) a)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} R] {a : R}, (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MonoidWithZero.toZero.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1))))) -> (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))) a)
-Case conversion may be inaccurate. Consider using '#align is_regular_of_ne_zero isRegular_of_ne_zeroₓ'. -/
/-- Non-zero elements of an integral domain are regular. -/
theorem isRegular_of_ne_zero (a0 : a ≠ 0) : IsRegular a :=
⟨fun b c => (mul_right_inj' a0).mp, fun b c => (mul_left_inj' a0).mp⟩
#align is_regular_of_ne_zero isRegular_of_ne_zero
-/- warning: is_regular_iff_ne_zero -> isRegular_iff_ne_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], Iff (IsRegular.{u1} R (MulZeroClass.toHasMul.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))) a) (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1))))))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} R] {a : R} [_inst_2 : Nontrivial.{u1} R], Iff (IsRegular.{u1} R (MulZeroClass.toMul.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))) a) (Ne.{succ u1} R a (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MonoidWithZero.toZero.{u1} R (CancelMonoidWithZero.toMonoidWithZero.{u1} R _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align is_regular_iff_ne_zero isRegular_iff_ne_zeroₓ'. -/
/-- In a non-trivial integral domain, an element is regular iff it is non-zero. -/
theorem isRegular_iff_ne_zero [Nontrivial R] : IsRegular a ↔ a ≠ 0 :=
⟨IsRegular.ne_zero, isRegular_of_ne_zero⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -480,10 +480,7 @@ Case conversion may be inaccurate. Consider using '#align is_left_regular_of_mul
/-- An element admitting a left inverse is left-regular. -/
@[to_additive "An element admitting a left additive opposite is add-left-regular."]
theorem isLeftRegular_of_mul_eq_one (h : b * a = 1) : IsLeftRegular a :=
- @IsLeftRegular.of_mul R _ _ _
- (by
- rw [h]
- exact is_regular_one.left)
+ @IsLeftRegular.of_mul R _ _ _ (by rw [h]; exact is_regular_one.left)
#align is_left_regular_of_mul_eq_one isLeftRegular_of_mul_eq_one
#align is_add_left_regular_of_add_eq_zero isAddLeftRegular_of_add_eq_zero
@@ -496,10 +493,7 @@ Case conversion may be inaccurate. Consider using '#align is_right_regular_of_mu
/-- An element admitting a right inverse is right-regular. -/
@[to_additive "An element admitting a right additive opposite is add-right-regular."]
theorem isRightRegular_of_mul_eq_one (h : a * b = 1) : IsRightRegular a :=
- IsRightRegular.of_mul
- (by
- rw [h]
- exact is_regular_one.right)
+ IsRightRegular.of_mul (by rw [h]; exact is_regular_one.right)
#align is_right_regular_of_mul_eq_one isRightRegular_of_mul_eq_one
#align is_add_right_regular_of_add_eq_zero isAddRightRegular_of_add_eq_zero
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -82,14 +82,18 @@ structure IsRegular (c : R) : Prop where
attribute [to_additive] IsRegular
-#print MulLECancellable.isLeftRegular /-
+/- warning: mul_le_cancellable.is_left_regular -> MulLECancellable.isLeftRegular is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} [_inst_1 : Mul.{u1} R] [_inst_2 : PartialOrder.{u1} R] {a : R}, (MulLECancellable.{u1} R _inst_1 (Preorder.toHasLe.{u1} R (PartialOrder.toPreorder.{u1} R _inst_2)) a) -> (IsLeftRegular.{u1} R _inst_1 a)
+but is expected to have type
+ forall {R : Type.{u1}} [_inst_1 : Mul.{u1} R] [_inst_2 : PartialOrder.{u1} R] {a : R}, (MulLECancellable.{u1} R _inst_1 (Preorder.toLE.{u1} R (PartialOrder.toPreorder.{u1} R _inst_2)) a) -> (IsLeftRegular.{u1} R _inst_1 a)
+Case conversion may be inaccurate. Consider using '#align mul_le_cancellable.is_left_regular MulLECancellable.isLeftRegularₓ'. -/
@[to_additive]
protected theorem MulLECancellable.isLeftRegular [PartialOrder R] {a : R}
(ha : MulLECancellable a) : IsLeftRegular a :=
ha.Injective
#align mul_le_cancellable.is_left_regular MulLECancellable.isLeftRegular
#align add_le_cancellable.is_add_left_regular AddLECancellable.isAddLeftRegular
--/
#print IsLeftRegular.right_of_commute /-
theorem IsLeftRegular.right_of_commute {a : R} (ca : ∀ b, Commute a b) (h : IsLeftRegular a) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -260,7 +260,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align is_left_regular.subsingleton IsLeftRegular.subsingletonₓ'. -/
/-- The element `0` is left-regular if and only if `R` is trivial. -/
theorem IsLeftRegular.subsingleton (h : IsLeftRegular (0 : R)) : Subsingleton R :=
- ⟨fun a b => h <| Eq.trans (zero_mul a) (zero_mul b).symm⟩
+ ⟨fun a b => h <| Eq.trans (MulZeroClass.zero_mul a) (MulZeroClass.zero_mul b).symm⟩
#align is_left_regular.subsingleton IsLeftRegular.subsingleton
/- warning: is_right_regular.subsingleton -> IsRightRegular.subsingleton is a dubious translation:
@@ -271,7 +271,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align is_right_regular.subsingleton IsRightRegular.subsingletonₓ'. -/
/-- The element `0` is right-regular if and only if `R` is trivial. -/
theorem IsRightRegular.subsingleton (h : IsRightRegular (0 : R)) : Subsingleton R :=
- ⟨fun a b => h <| Eq.trans (mul_zero a) (mul_zero b).symm⟩
+ ⟨fun a b => h <| Eq.trans (MulZeroClass.mul_zero a) (MulZeroClass.mul_zero b).symm⟩
#align is_right_regular.subsingleton IsRightRegular.subsingleton
/- warning: is_regular.subsingleton -> IsRegular.subsingleton is a dubious translation:
@@ -359,7 +359,7 @@ theorem IsLeftRegular.ne_zero [Nontrivial R] (la : IsLeftRegular a) : a ≠ 0 :=
rintro rfl
rcases exists_pair_ne R with ⟨x, y, xy⟩
refine' xy (la _)
- rw [zero_mul, zero_mul]
+ rw [MulZeroClass.zero_mul, MulZeroClass.zero_mul]
#align is_left_regular.ne_zero IsLeftRegular.ne_zero
/- warning: is_right_regular.ne_zero -> IsRightRegular.ne_zero is a dubious translation:
@@ -374,7 +374,7 @@ theorem IsRightRegular.ne_zero [Nontrivial R] (ra : IsRightRegular a) : a ≠ 0
rintro rfl
rcases exists_pair_ne R with ⟨x, y, xy⟩
refine' xy (ra (_ : x * 0 = y * 0))
- rw [mul_zero, mul_zero]
+ rw [MulZeroClass.mul_zero, MulZeroClass.mul_zero]
#align is_right_regular.ne_zero IsRightRegular.ne_zero
/- warning: is_regular.ne_zero -> IsRegular.ne_zero is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -310,7 +310,7 @@ variable [CommSemigroup R] {a b : R}
@[to_additive "A sum is add-regular if and only if the summands are."]
theorem isRegular_mul_iff : IsRegular (a * b) ↔ IsRegular a ∧ IsRegular b := by
refine' Iff.trans _ isRegular_mul_and_mul_iff
- refine' ⟨fun ab => ⟨ab, by rwa [mul_comm]⟩, fun rab => rab.1⟩
+ exact ⟨fun ab => ⟨ab, by rwa [mul_comm]⟩, fun rab => rab.1⟩
#align is_regular_mul_iff isRegular_mul_iff
#align is_add_regular_add_iff isAddRegular_add_iff
@@ -280,11 +280,11 @@ theorem not_isRegular_zero [Nontrivial R] : ¬IsRegular (0 : R) := fun h => IsRe
@[simp] lemma IsLeftRegular.mul_left_eq_zero_iff (hb : IsLeftRegular b) : b * a = 0 ↔ a = 0 := by
nth_rw 1 [← mul_zero b]
- exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha, mul_zero]⟩
+ exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha]⟩
@[simp] lemma IsRightRegular.mul_right_eq_zero_iff (hb : IsRightRegular b) : a * b = 0 ↔ a = 0 := by
nth_rw 1 [← zero_mul b]
- exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha, zero_mul]⟩
+ exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha]⟩
end MulZeroClass
@@ -6,7 +6,6 @@ Authors: Damiano Testa
import Mathlib.Algebra.Group.Commute.Defs
import Mathlib.Algebra.Group.Units
import Mathlib.Algebra.Order.Monoid.Lemmas
-import Mathlib.Algebra.GroupWithZero.Basic
import Mathlib.Tactic.NthRewrite
#align_import algebra.regular.basic from "leanprover-community/mathlib"@"5cd3c25312f210fec96ba1edb2aebfb2ccf2010f"
A couple of lemmas on RightRegular that could be useful for future work on Localization
@@ -88,6 +88,15 @@ theorem IsLeftRegular.right_of_commute {a : R}
fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm
#align is_left_regular.right_of_commute IsLeftRegular.right_of_commute
+theorem IsRightRegular.left_of_commute {a : R}
+ (ca : ∀ b, Commute a b) (h : IsRightRegular a) : IsLeftRegular a := by
+ simp_rw [@Commute.symm_iff R _ a] at ca
+ exact fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm
+
+theorem Commute.isRightRegular_iff {a : R} (ca : ∀ b, Commute a b) :
+ IsRightRegular a ↔ IsLeftRegular a :=
+ ⟨IsRightRegular.left_of_commute ca, IsLeftRegular.right_of_commute ca⟩
+
theorem Commute.isRegular_iff {a : R} (ca : ∀ b, Commute a b) : IsRegular a ↔ IsLeftRegular a :=
⟨fun h => h.left, fun h => ⟨h, h.right_of_commute ca⟩⟩
#align commute.is_regular_iff Commute.isRegular_iff
(· op ·) a
by (a op ·)
(#8843)
I used the regex \(\(· (.) ·\) (.)\)
, replacing with ($2 $1 ·)
.
@@ -140,7 +140,7 @@ an add-right-regular element, then `b` is add-right-regular."]
theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b := by
refine' fun x y xy => ab (_ : x * (b * a) = y * (b * a))
rw [← mul_assoc, ← mul_assoc]
- exact congr_fun (congr_arg (· * ·) xy) a
+ exact congr_arg (· * a) xy
#align is_right_regular.of_mul IsRightRegular.of_mul
#align is_add_right_regular.of_add IsAddRightRegular.of_add
IsCancelMul
(#8428)
This lets lemmas about cancellative monoids work for cancellative semigroups
Some docstrings have been rewritten, as adjusting the wording was too awkward.
The new .all
names are intended to match Commute.all
.
@@ -343,35 +343,26 @@ theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a := by
end Monoid
-/-- Elements of a left cancel semigroup are left regular. -/
-@[to_additive "Elements of an add left cancel semigroup are add-left-regular."]
-theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R]
- (g : R) : IsLeftRegular g :=
+/-- If all multiplications cancel on the left then every element is left-regular. -/
+@[to_additive "If all additions cancel on the left then every element is add-left-regular."]
+theorem IsLeftRegular.all [Mul R] [IsLeftCancelMul R] (g : R) : IsLeftRegular g :=
mul_right_injective g
-#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroup
-#align is_add_left_regular_of_left_cancel_add_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
+#align is_left_regular_of_left_cancel_semigroup IsLeftRegular.all
+#align is_add_left_regular_of_left_cancel_add_semigroup IsAddLeftRegular.all
-/-- Elements of a right cancel semigroup are right regular. -/
-@[to_additive "Elements of an add right cancel semigroup are add-right-regular"]
-theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R]
- (g : R) : IsRightRegular g :=
+/-- If all multiplications cancel on the right then every element is right-regular. -/
+@[to_additive "If all additions cancel on the right then every element is add-right-regular."]
+theorem IsRightRegular.all [Mul R] [IsRightCancelMul R] (g : R) : IsRightRegular g :=
mul_left_injective g
-#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroup
-#align is_add_right_regular_of_right_cancel_add_semigroup isAddRightRegular_of_addRightCancelSemigroup
+#align is_right_regular_of_right_cancel_semigroup IsRightRegular.all
+#align is_add_right_regular_of_right_cancel_add_semigroup IsLeftRegular.all
-section CancelMonoid
-
-variable [CancelMonoid R]
-
-/-- Elements of a cancel monoid are regular. Cancel semigroups do not appear to exist. -/
-@[to_additive "Elements of an add cancel monoid are regular.
-Add cancel semigroups do not appear to exist."]
-theorem isRegular_of_cancelMonoid (g : R) : IsRegular g :=
+/-- If all multiplications cancel then every element is regular. -/
+@[to_additive "If all additions cancel then every element is add-regular."]
+theorem IsRegular.all [Mul R] [IsCancelMul R] (g : R) : IsRegular g :=
⟨mul_right_injective g, mul_left_injective g⟩
-#align is_regular_of_cancel_monoid isRegular_of_cancelMonoid
-#align is_add_regular_of_cancel_add_monoid isAddRegular_of_addCancelMonoid
-
-end CancelMonoid
+#align is_regular_of_cancel_monoid IsRegular.all
+#align is_add_regular_of_cancel_add_monoid IsAddRegular.all
section CancelMonoidWithZero
@@ -3,7 +3,8 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
-import Mathlib.Algebra.Group.Commute
+import Mathlib.Algebra.Group.Commute.Defs
+import Mathlib.Algebra.Group.Units
import Mathlib.Algebra.Order.Monoid.Lemmas
import Mathlib.Algebra.GroupWithZero.Basic
import Mathlib.Tactic.NthRewrite
I know that this is contrary to what we've done previously, but:
norm_num
/ ring
/ linarith
)(Oh
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -6,6 +6,7 @@ Authors: Damiano Testa
import Mathlib.Algebra.Group.Commute
import Mathlib.Algebra.Order.Monoid.Lemmas
import Mathlib.Algebra.GroupWithZero.Basic
+import Mathlib.Tactic.NthRewrite
#align_import algebra.regular.basic from "leanprover-community/mathlib"@"5cd3c25312f210fec96ba1edb2aebfb2ccf2010f"
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -28,7 +28,7 @@ The final goal is to develop part of the API to prove, eventually, results about
-/
-variable {R : Type _}
+variable {R : Type*}
section Mul
@@ -54,7 +54,7 @@ def IsRightRegular (c : R) :=
/-- An add-regular element is an element `c` such that addition by `c` both on the left and
on the right is injective. -/
-structure IsAddRegular {R : Type _} [Add R] (c : R) : Prop where
+structure IsAddRegular {R : Type*} [Add R] (c : R) : Prop where
/-- An add-regular element `c` is left-regular -/
left : IsAddLeftRegular c -- Porting note: It seems like to_additive is misbehaving
/-- An add-regular element `c` is right-regular -/
@@ -70,6 +70,8 @@ structure IsRegular (c : R) : Prop where
right : IsRightRegular c
#align is_regular IsRegular
+attribute [simp] IsRegular.left IsRegular.right
+
attribute [to_additive] IsRegular
@[to_additive]
@@ -266,6 +268,14 @@ theorem not_isRightRegular_zero [nR : Nontrivial R] : ¬IsRightRegular (0 : R) :
theorem not_isRegular_zero [Nontrivial R] : ¬IsRegular (0 : R) := fun h => IsRegular.ne_zero h rfl
#align not_is_regular_zero not_isRegular_zero
+@[simp] lemma IsLeftRegular.mul_left_eq_zero_iff (hb : IsLeftRegular b) : b * a = 0 ↔ a = 0 := by
+ nth_rw 1 [← mul_zero b]
+ exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha, mul_zero]⟩
+
+@[simp] lemma IsRightRegular.mul_right_eq_zero_iff (hb : IsRightRegular b) : a * b = 0 ↔ a = 0 := by
+ nth_rw 1 [← zero_mul b]
+ exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha, zero_mul]⟩
+
end MulZeroClass
section MulOneClass
@@ -2,16 +2,13 @@
Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-
-! This file was ported from Lean 3 source module algebra.regular.basic
-! leanprover-community/mathlib commit 5cd3c25312f210fec96ba1edb2aebfb2ccf2010f
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.Commute
import Mathlib.Algebra.Order.Monoid.Lemmas
import Mathlib.Algebra.GroupWithZero.Basic
+#align_import algebra.regular.basic from "leanprover-community/mathlib"@"5cd3c25312f210fec96ba1edb2aebfb2ccf2010f"
+
/-!
# Regular elements
@@ -116,7 +116,7 @@ theorem IsRightRegular.mul (rra : IsRightRegular a) (rrb : IsRightRegular b) :
/-- If an element `b` becomes left-regular after multiplying it on the left by a left-regular
element, then `b` is left-regular. -/
@[to_additive "If an element `b` becomes add-left-regular after adding to it on the left
-a add-left-regular element, then `b` is add-left-regular."]
+an add-left-regular element, then `b` is add-left-regular."]
theorem IsLeftRegular.of_mul (ab : IsLeftRegular (a * b)) : IsLeftRegular b :=
Function.Injective.of_comp (by rwa [comp_mul_left a b])
#align is_left_regular.of_mul IsLeftRegular.of_mul
@@ -125,7 +125,7 @@ theorem IsLeftRegular.of_mul (ab : IsLeftRegular (a * b)) : IsLeftRegular b :=
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[to_additive (attr := simp) "An element is add-left-regular if and only if adding to it on the left
-a add-left-regular element is add-left-regular."]
+an add-left-regular element is add-left-regular."]
theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
IsLeftRegular (a * b) ↔ IsLeftRegular b :=
⟨fun ab => IsLeftRegular.of_mul ab, fun ab => IsLeftRegular.mul ha ab⟩
@@ -135,7 +135,7 @@ theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
/-- If an element `b` becomes right-regular after multiplying it on the right by a right-regular
element, then `b` is right-regular. -/
@[to_additive "If an element `b` becomes add-right-regular after adding to it on the right
-a add-right-regular element, then `b` is add-right-regular."]
+an add-right-regular element, then `b` is add-right-regular."]
theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b := by
refine' fun x y xy => ab (_ : x * (b * a) = y * (b * a))
rw [← mul_assoc, ← mul_assoc]
@@ -147,7 +147,7 @@ theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b :
element is right-regular. -/
@[to_additive (attr := simp)
"An element is add-right-regular if and only if adding it on the right to
-a add-right-regular element is add-right-regular."]
+an add-right-regular element is add-right-regular."]
theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
IsRightRegular (b * a) ↔ IsRightRegular b :=
⟨fun ab => IsRightRegular.of_mul ab, fun ab => IsRightRegular.mul ab ha⟩
@@ -340,7 +340,7 @@ theorem isLeftRegular_of_leftCancelSemigroup [LeftCancelSemigroup R]
(g : R) : IsLeftRegular g :=
mul_right_injective g
#align is_left_regular_of_left_cancel_semigroup isLeftRegular_of_leftCancelSemigroup
-#align is_add_left_regular_of_add_left_cancel_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
+#align is_add_left_regular_of_left_cancel_add_semigroup isAddLeftRegular_of_addLeftCancelSemigroup
/-- Elements of a right cancel semigroup are right regular. -/
@[to_additive "Elements of an add right cancel semigroup are add-right-regular"]
@@ -348,7 +348,7 @@ theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R]
(g : R) : IsRightRegular g :=
mul_left_injective g
#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroup
-#align is_add_right_regular_of_add_right_cancel_semigroup isAddRightRegular_of_addRightCancelSemigroup
+#align is_add_right_regular_of_right_cancel_add_semigroup isAddRightRegular_of_addRightCancelSemigroup
section CancelMonoid
@@ -360,7 +360,7 @@ Add cancel semigroups do not appear to exist."]
theorem isRegular_of_cancelMonoid (g : R) : IsRegular g :=
⟨mul_right_injective g, mul_left_injective g⟩
#align is_regular_of_cancel_monoid isRegular_of_cancelMonoid
-#align is_add_regular_of_add_cancel_monoid isAddRegular_of_addCancelMonoid
+#align is_add_regular_of_cancel_add_monoid isAddRegular_of_addCancelMonoid
end CancelMonoid
@@ -348,8 +348,7 @@ theorem isRightRegular_of_rightCancelSemigroup [RightCancelSemigroup R]
(g : R) : IsRightRegular g :=
mul_left_injective g
#align is_right_regular_of_right_cancel_semigroup isRightRegular_of_rightCancelSemigroup
-#align is_add_right_regular_of_add_right_cancel_semigroup
- isAddRightRegular_of_addRightCancelSemigroup
+#align is_add_right_regular_of_add_right_cancel_semigroup isAddRightRegular_of_addRightCancelSemigroup
section CancelMonoid
to_additive
is @[to_additive (attrs := simp, ext, simps)]
simp
and simps
attributes to the to_additive
-dictionary.simp
-attributes). In particular it's possible that norm_cast
might generate some auxiliary declarations.to_additive
and simps
from the Simps
file to the toAdditive
file for uniformity.@[reassoc]
Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -124,7 +124,7 @@ theorem IsLeftRegular.of_mul (ab : IsLeftRegular (a * b)) : IsLeftRegular b :=
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
-@[simp, to_additive "An element is add-left-regular if and only if adding to it on the left
+@[to_additive (attr := simp) "An element is add-left-regular if and only if adding to it on the left
a add-left-regular element is add-left-regular."]
theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
IsLeftRegular (a * b) ↔ IsLeftRegular b :=
@@ -145,7 +145,8 @@ theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b :
/-- An element is right-regular if and only if multiplying it on the right with a right-regular
element is right-regular. -/
-@[simp, to_additive "An element is add-right-regular if and only if adding it on the right to
+@[to_additive (attr := simp)
+"An element is add-right-regular if and only if adding it on the right to
a add-right-regular element is add-right-regular."]
theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
IsRightRegular (b * a) ↔ IsRightRegular b :=
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) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
+
+! This file was ported from Lean 3 source module algebra.regular.basic
+! leanprover-community/mathlib commit 5cd3c25312f210fec96ba1edb2aebfb2ccf2010f
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
-/
import Mathlib.Algebra.Group.Commute
import Mathlib.Algebra.Order.Monoid.Lemmas
All dependencies are ported!