algebra.regular.smul
⟷
Mathlib.Algebra.Regular.SMul
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)
(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.SmulWithZero
+import Algebra.SMulWithZero
import Algebra.Regular.Basic
#align_import algebra.regular.smul from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
@@ -180,7 +180,7 @@ theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
by
induction' n with n hn
· simp only [one, pow_zero]
- · rw [pow_succ]; exact (ra.smul_iff (a ^ n)).mpr hn
+ · rw [pow_succ']; exact (ra.smul_iff (a ^ n)).mpr hn
#align is_smul_regular.pow IsSMulRegular.pow
-/
@@ -189,7 +189,7 @@ theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a :=
by
refine' ⟨_, pow n⟩
- rw [← Nat.succ_pred_eq_of_pos n0, pow_succ', ← smul_eq_mul]
+ rw [← Nat.succ_pred_eq_of_pos n0, pow_succ, ← smul_eq_mul]
exact of_smul _
#align is_smul_regular.pow_iff IsSMulRegular.pow_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -124,7 +124,7 @@ theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulR
#print IsSMulRegular.of_mul /-
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
- by rw [← smul_eq_mul] at ab ; exact ab.of_smul _
+ by rw [← smul_eq_mul] at ab; exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
-/
@@ -161,7 +161,7 @@ variable (M)
#print IsSMulRegular.one /-
/-- One is `M`-regular always. -/
@[simp]
-theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
+theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
#align is_smul_regular.one IsSMulRegular.one
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +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 Mathbin.Algebra.SmulWithZero
-import Mathbin.Algebra.Regular.Basic
+import Algebra.SmulWithZero
+import Algebra.Regular.Basic
#align_import algebra.regular.smul from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
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.smul
-! leanprover-community/mathlib commit c3291da49cfa65f0d43b094750541c0731edc932
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.SmulWithZero
import Mathbin.Algebra.Regular.Basic
+#align_import algebra.regular.smul from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
+
/-!
# Action of regular elements on a module
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -80,24 +80,30 @@ section SMul
variable [SMul R M] [SMul R S] [SMul S M] [IsScalarTower R S M]
+#print IsSMulRegular.smul /-
/-- The product of `M`-regular elements is `M`-regular. -/
theorem smul (ra : IsSMulRegular M a) (rs : IsSMulRegular M s) : IsSMulRegular M (a • s) :=
fun a b ab => rs (ra ((smul_assoc _ _ _).symm.trans (ab.trans (smul_assoc _ _ _))))
#align is_smul_regular.smul IsSMulRegular.smul
+-/
+#print IsSMulRegular.of_smul /-
/-- If an element `b` becomes `M`-regular after multiplying it on the left by an `M`-regular
element, then `b` is `M`-regular. -/
theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s :=
@Function.Injective.of_comp _ _ _ (fun m : M => a • m) _ fun c d cd =>
ab (by rwa [smul_assoc, smul_assoc])
#align is_smul_regular.of_smul IsSMulRegular.of_smul
+-/
+#print IsSMulRegular.smul_iff /-
/-- An element is `M`-regular if and only if multiplying it on the left by an `M`-regular element
is `M`-regular. -/
@[simp]
theorem smul_iff (b : S) (ha : IsSMulRegular M a) : IsSMulRegular M (a • b) ↔ IsSMulRegular M b :=
⟨of_smul _, ha.smul⟩
#align is_smul_regular.smul_iff IsSMulRegular.smul_iff
+-/
#print IsSMulRegular.isLeftRegular /-
theorem isLeftRegular [Mul R] {a : R} (h : IsSMulRegular R a) : IsLeftRegular a :=
@@ -112,21 +118,28 @@ theorem isRightRegular [Mul R] {a : R} (h : IsSMulRegular R (MulOpposite.op a))
#align is_smul_regular.is_right_regular IsSMulRegular.isRightRegular
-/
+#print IsSMulRegular.mul /-
theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulRegular M b) :
IsSMulRegular M (a * b) :=
ra.smul rb
#align is_smul_regular.mul IsSMulRegular.mul
+-/
+#print IsSMulRegular.of_mul /-
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
by rw [← smul_eq_mul] at ab ; exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
+-/
+#print IsSMulRegular.mul_iff_right /-
@[simp]
theorem mul_iff_right [Mul R] [IsScalarTower R R M] (ha : IsSMulRegular M a) :
IsSMulRegular M (a * b) ↔ IsSMulRegular M b :=
⟨of_mul, ha.mul⟩
#align is_smul_regular.mul_iff_right IsSMulRegular.mul_iff_right
+-/
+#print IsSMulRegular.mul_and_mul_iff /-
/-- Two elements `a` and `b` are `M`-regular if and only if both products `a * b` and `b * a`
are `M`-regular. -/
theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] :
@@ -138,6 +151,7 @@ theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] :
· rintro ⟨ha, hb⟩
exact ⟨ha.mul hb, hb.mul ha⟩
#align is_smul_regular.mul_and_mul_iff IsSMulRegular.mul_and_mul_iff
+-/
end SMul
@@ -147,18 +161,23 @@ variable [Monoid R] [MulAction R M]
variable (M)
+#print IsSMulRegular.one /-
/-- One is `M`-regular always. -/
@[simp]
theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
#align is_smul_regular.one IsSMulRegular.one
+-/
variable {M}
+#print IsSMulRegular.of_mul_eq_one /-
/-- An element of `R` admitting a left inverse is `M`-regular. -/
theorem of_mul_eq_one (h : a * b = 1) : IsSMulRegular M b :=
of_mul (by rw [h]; exact one M)
#align is_smul_regular.of_mul_eq_one IsSMulRegular.of_mul_eq_one
+-/
+#print IsSMulRegular.pow /-
/-- Any power of an `M`-regular element is `M`-regular. -/
theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
by
@@ -166,7 +185,9 @@ theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
· simp only [one, pow_zero]
· rw [pow_succ]; exact (ra.smul_iff (a ^ n)).mpr hn
#align is_smul_regular.pow IsSMulRegular.pow
+-/
+#print IsSMulRegular.pow_iff /-
/-- An element `a` is `M`-regular if and only if a positive power of `a` is `M`-regular. -/
theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a :=
by
@@ -174,6 +195,7 @@ theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegul
rw [← Nat.succ_pred_eq_of_pos n0, pow_succ', ← smul_eq_mul]
exact of_smul _
#align is_smul_regular.pow_iff IsSMulRegular.pow_iff
+-/
end Monoid
@@ -181,10 +203,12 @@ section MonoidSmul
variable [Monoid S] [SMul R M] [SMul R S] [MulAction S M] [IsScalarTower R S M]
+#print IsSMulRegular.of_smul_eq_one /-
/-- An element of `S` admitting a left inverse in `R` is `M`-regular. -/
theorem of_smul_eq_one (h : a • s = 1) : IsSMulRegular M s :=
of_smul a (by rw [h]; exact one M)
#align is_smul_regular.of_smul_eq_one IsSMulRegular.of_smul_eq_one
+-/
end MonoidSmul
@@ -193,16 +217,21 @@ section MonoidWithZero
variable [MonoidWithZero R] [MonoidWithZero S] [Zero M] [MulActionWithZero R M]
[MulActionWithZero R S] [MulActionWithZero S M] [IsScalarTower R S M]
+#print IsSMulRegular.subsingleton /-
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
protected theorem subsingleton (h : IsSMulRegular M (0 : R)) : Subsingleton M :=
⟨fun a b => h (by repeat' rw [MulActionWithZero.zero_smul])⟩
#align is_smul_regular.subsingleton IsSMulRegular.subsingleton
+-/
+#print IsSMulRegular.zero_iff_subsingleton /-
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
theorem zero_iff_subsingleton : IsSMulRegular M (0 : R) ↔ Subsingleton M :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_smul_regular.zero_iff_subsingleton IsSMulRegular.zero_iff_subsingleton
+-/
+#print IsSMulRegular.not_zero_iff /-
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M :=
by
@@ -210,16 +239,21 @@ theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M :=
push_neg
exact Iff.rfl
#align is_smul_regular.not_zero_iff IsSMulRegular.not_zero_iff
+-/
+#print IsSMulRegular.zero /-
/-- The element `0` is `M`-regular when `M` is trivial. -/
theorem zero [sM : Subsingleton M] : IsSMulRegular M (0 : R) :=
zero_iff_subsingleton.mpr sM
#align is_smul_regular.zero IsSMulRegular.zero
+-/
+#print IsSMulRegular.not_zero /-
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero [nM : Nontrivial M] : ¬IsSMulRegular M (0 : R) :=
not_zero_iff.mpr nM
#align is_smul_regular.not_zero IsSMulRegular.not_zero
+-/
end MonoidWithZero
@@ -227,12 +261,14 @@ section CommSemigroup
variable [CommSemigroup R] [SMul R M] [IsScalarTower R R M]
+#print IsSMulRegular.mul_iff /-
/-- A product is `M`-regular if and only if the factors are. -/
theorem mul_iff : IsSMulRegular M (a * b) ↔ IsSMulRegular M a ∧ IsSMulRegular M b :=
by
rw [← mul_and_mul_iff]
exact ⟨fun ab => ⟨ab, by rwa [mul_comm]⟩, fun rab => rab.1⟩
#align is_smul_regular.mul_iff IsSMulRegular.mul_iff
+-/
end CommSemigroup
@@ -258,17 +294,21 @@ section Units
variable [Monoid R] [MulAction R M]
+#print Units.isSMulRegular /-
/-- Any element in `Rˣ` is `M`-regular. -/
theorem Units.isSMulRegular (a : Rˣ) : IsSMulRegular M (a : R) :=
IsSMulRegular.of_mul_eq_one a.inv_val
#align units.is_smul_regular Units.isSMulRegular
+-/
+#print IsUnit.isSMulRegular /-
/-- A unit is `M`-regular. -/
theorem IsUnit.isSMulRegular (ua : IsUnit a) : IsSMulRegular M a :=
by
rcases ua with ⟨a, rfl⟩
exact a.is_smul_regular M
#align is_unit.is_smul_regular IsUnit.isSMulRegular
+-/
end Units
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -118,7 +118,7 @@ theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulR
#align is_smul_regular.mul IsSMulRegular.mul
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
- by rw [← smul_eq_mul] at ab; exact ab.of_smul _
+ by rw [← smul_eq_mul] at ab ; exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
@[simp]
@@ -149,7 +149,7 @@ variable (M)
/-- One is `M`-regular always. -/
@[simp]
-theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
+theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
#align is_smul_regular.one IsSMulRegular.one
variable {M}
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -80,23 +80,11 @@ section SMul
variable [SMul R M] [SMul R S] [SMul S M] [IsScalarTower R S M]
-/- warning: is_smul_regular.smul -> IsSMulRegular.smul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} {M : Type.{u3}} {a : R} {s : S} [_inst_1 : SMul.{u1, u3} R M] [_inst_2 : SMul.{u1, u2} R S] [_inst_3 : SMul.{u2, u3} S M] [_inst_4 : IsScalarTower.{u1, u2, u3} R S M _inst_2 _inst_3 _inst_1], (IsSMulRegular.{u1, u3} R M _inst_1 a) -> (IsSMulRegular.{u2, u3} S M _inst_3 s) -> (IsSMulRegular.{u2, u3} S M _inst_3 (SMul.smul.{u1, u2} R S _inst_2 a s))
-but is expected to have type
- forall {R : Type.{u3}} {S : Type.{u1}} {M : Type.{u2}} {a : R} {s : S} [_inst_1 : SMul.{u3, u2} R M] [_inst_2 : SMul.{u3, u1} R S] [_inst_3 : SMul.{u1, u2} S M] [_inst_4 : IsScalarTower.{u3, u1, u2} R S M _inst_2 _inst_3 _inst_1], (IsSMulRegular.{u3, u2} R M _inst_1 a) -> (IsSMulRegular.{u1, u2} S M _inst_3 s) -> (IsSMulRegular.{u1, u2} S M _inst_3 (HSMul.hSMul.{u3, u1, u1} R S S (instHSMul.{u3, u1} R S _inst_2) a s))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.smul IsSMulRegular.smulₓ'. -/
/-- The product of `M`-regular elements is `M`-regular. -/
theorem smul (ra : IsSMulRegular M a) (rs : IsSMulRegular M s) : IsSMulRegular M (a • s) :=
fun a b ab => rs (ra ((smul_assoc _ _ _).symm.trans (ab.trans (smul_assoc _ _ _))))
#align is_smul_regular.smul IsSMulRegular.smul
-/- warning: is_smul_regular.of_smul -> IsSMulRegular.of_smul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} {M : Type.{u3}} {s : S} [_inst_1 : SMul.{u1, u3} R M] [_inst_2 : SMul.{u1, u2} R S] [_inst_3 : SMul.{u2, u3} S M] [_inst_4 : IsScalarTower.{u1, u2, u3} R S M _inst_2 _inst_3 _inst_1] (a : R), (IsSMulRegular.{u2, u3} S M _inst_3 (SMul.smul.{u1, u2} R S _inst_2 a s)) -> (IsSMulRegular.{u2, u3} S M _inst_3 s)
-but is expected to have type
- forall {R : Type.{u1}} {S : Type.{u3}} {M : Type.{u2}} {s : S} [_inst_1 : SMul.{u1, u2} R M] [_inst_2 : SMul.{u1, u3} R S] [_inst_3 : SMul.{u3, u2} S M] [_inst_4 : IsScalarTower.{u1, u3, u2} R S M _inst_2 _inst_3 _inst_1] (a : R), (IsSMulRegular.{u3, u2} S M _inst_3 (HSMul.hSMul.{u1, u3, u3} R S S (instHSMul.{u1, u3} R S _inst_2) a s)) -> (IsSMulRegular.{u3, u2} S M _inst_3 s)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_smul IsSMulRegular.of_smulₓ'. -/
/-- If an element `b` becomes `M`-regular after multiplying it on the left by an `M`-regular
element, then `b` is `M`-regular. -/
theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s :=
@@ -104,12 +92,6 @@ theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s :=
ab (by rwa [smul_assoc, smul_assoc])
#align is_smul_regular.of_smul IsSMulRegular.of_smul
-/- warning: is_smul_regular.smul_iff -> IsSMulRegular.smul_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} {M : Type.{u3}} {a : R} [_inst_1 : SMul.{u1, u3} R M] [_inst_2 : SMul.{u1, u2} R S] [_inst_3 : SMul.{u2, u3} S M] [_inst_4 : IsScalarTower.{u1, u2, u3} R S M _inst_2 _inst_3 _inst_1] (b : S), (IsSMulRegular.{u1, u3} R M _inst_1 a) -> (Iff (IsSMulRegular.{u2, u3} S M _inst_3 (SMul.smul.{u1, u2} R S _inst_2 a b)) (IsSMulRegular.{u2, u3} S M _inst_3 b))
-but is expected to have type
- forall {R : Type.{u3}} {S : Type.{u1}} {M : Type.{u2}} {a : R} [_inst_1 : SMul.{u3, u2} R M] [_inst_2 : SMul.{u3, u1} R S] [_inst_3 : SMul.{u1, u2} S M] [_inst_4 : IsScalarTower.{u3, u1, u2} R S M _inst_2 _inst_3 _inst_1] (b : S), (IsSMulRegular.{u3, u2} R M _inst_1 a) -> (Iff (IsSMulRegular.{u1, u2} S M _inst_3 (HSMul.hSMul.{u3, u1, u1} R S S (instHSMul.{u3, u1} R S _inst_2) a b)) (IsSMulRegular.{u1, u2} S M _inst_3 b))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.smul_iff IsSMulRegular.smul_iffₓ'. -/
/-- An element is `M`-regular if and only if multiplying it on the left by an `M`-regular element
is `M`-regular. -/
@[simp]
@@ -130,45 +112,21 @@ theorem isRightRegular [Mul R] {a : R} (h : IsSMulRegular R (MulOpposite.op a))
#align is_smul_regular.is_right_regular IsSMulRegular.isRightRegular
-/
-/- warning: is_smul_regular.mul -> IsSMulRegular.mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : SMul.{u1, u2} R M] [_inst_5 : Mul.{u1} R] [_inst_6 : IsScalarTower.{u1, u1, u2} R R M (Mul.toSMul.{u1} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u1, u2} R M _inst_1 a) -> (IsSMulRegular.{u1, u2} R M _inst_1 b) -> (IsSMulRegular.{u1, u2} R M _inst_1 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_5) a b))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : SMul.{u2, u1} R M] [_inst_5 : Mul.{u2} R] [_inst_6 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u2, u1} R M _inst_1 a) -> (IsSMulRegular.{u2, u1} R M _inst_1 b) -> (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) a b))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.mul IsSMulRegular.mulₓ'. -/
theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulRegular M b) :
IsSMulRegular M (a * b) :=
ra.smul rb
#align is_smul_regular.mul IsSMulRegular.mul
-/- warning: is_smul_regular.of_mul -> IsSMulRegular.of_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : SMul.{u1, u2} R M] [_inst_5 : Mul.{u1} R] [_inst_6 : IsScalarTower.{u1, u1, u2} R R M (Mul.toSMul.{u1} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u1, u2} R M _inst_1 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_5) a b)) -> (IsSMulRegular.{u1, u2} R M _inst_1 b)
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : SMul.{u2, u1} R M] [_inst_5 : Mul.{u2} R] [_inst_6 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) a b)) -> (IsSMulRegular.{u2, u1} R M _inst_1 b)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_mul IsSMulRegular.of_mulₓ'. -/
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
by rw [← smul_eq_mul] at ab; exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
-/- warning: is_smul_regular.mul_iff_right -> IsSMulRegular.mul_iff_right is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : SMul.{u1, u2} R M] [_inst_5 : Mul.{u1} R] [_inst_6 : IsScalarTower.{u1, u1, u2} R R M (Mul.toSMul.{u1} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u1, u2} R M _inst_1 a) -> (Iff (IsSMulRegular.{u1, u2} R M _inst_1 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_5) a b)) (IsSMulRegular.{u1, u2} R M _inst_1 b))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : SMul.{u2, u1} R M] [_inst_5 : Mul.{u2} R] [_inst_6 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u2, u1} R M _inst_1 a) -> (Iff (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) a b)) (IsSMulRegular.{u2, u1} R M _inst_1 b))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.mul_iff_right IsSMulRegular.mul_iff_rightₓ'. -/
@[simp]
theorem mul_iff_right [Mul R] [IsScalarTower R R M] (ha : IsSMulRegular M a) :
IsSMulRegular M (a * b) ↔ IsSMulRegular M b :=
⟨of_mul, ha.mul⟩
#align is_smul_regular.mul_iff_right IsSMulRegular.mul_iff_right
-/- warning: is_smul_regular.mul_and_mul_iff -> IsSMulRegular.mul_and_mul_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : SMul.{u1, u2} R M] [_inst_5 : Mul.{u1} R] [_inst_6 : IsScalarTower.{u1, u1, u2} R R M (Mul.toSMul.{u1} R _inst_5) _inst_1 _inst_1], Iff (And (IsSMulRegular.{u1, u2} R M _inst_1 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_5) a b)) (IsSMulRegular.{u1, u2} R M _inst_1 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_5) b a))) (And (IsSMulRegular.{u1, u2} R M _inst_1 a) (IsSMulRegular.{u1, u2} R M _inst_1 b))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : SMul.{u2, u1} R M] [_inst_5 : Mul.{u2} R] [_inst_6 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R _inst_5) _inst_1 _inst_1], Iff (And (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) a b)) (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) b a))) (And (IsSMulRegular.{u2, u1} R M _inst_1 a) (IsSMulRegular.{u2, u1} R M _inst_1 b))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.mul_and_mul_iff IsSMulRegular.mul_and_mul_iffₓ'. -/
/-- Two elements `a` and `b` are `M`-regular if and only if both products `a * b` and `b * a`
are `M`-regular. -/
theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] :
@@ -189,12 +147,6 @@ variable [Monoid R] [MulAction R M]
variable (M)
-/- warning: is_smul_regular.one -> IsSMulRegular.one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} (M : Type.{u2}) [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1], IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (MulOneClass.toHasOne.{u1} R (Monoid.toMulOneClass.{u1} R _inst_1)))))
-but is expected to have type
- forall {R : Type.{u2}} (M : Type.{u1}) [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1], IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) (OfNat.ofNat.{u2} R 1 (One.toOfNat1.{u2} R (Monoid.toOne.{u2} R _inst_1)))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.one IsSMulRegular.oneₓ'. -/
/-- One is `M`-regular always. -/
@[simp]
theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smul] at ab
@@ -202,23 +154,11 @@ theorem one : IsSMulRegular M (1 : R) := fun a b ab => by rwa [one_smul, one_smu
variable {M}
-/- warning: is_smul_regular.of_mul_eq_one -> IsSMulRegular.of_mul_eq_one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1], (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)))))) -> (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) b)
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1], (Eq.{succ u2} R (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (MulOneClass.toMul.{u2} R (Monoid.toMulOneClass.{u2} R _inst_1))) a b) (OfNat.ofNat.{u2} R 1 (One.toOfNat1.{u2} R (Monoid.toOne.{u2} R _inst_1)))) -> (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) b)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_mul_eq_one IsSMulRegular.of_mul_eq_oneₓ'. -/
/-- An element of `R` admitting a left inverse is `M`-regular. -/
theorem of_mul_eq_one (h : a * b = 1) : IsSMulRegular M b :=
of_mul (by rw [h]; exact one M)
#align is_smul_regular.of_mul_eq_one IsSMulRegular.of_mul_eq_one
-/- warning: is_smul_regular.pow -> IsSMulRegular.pow is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1] (n : Nat), (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) a) -> (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R _inst_1)) a n))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1] (n : Nat), (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) a) -> (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R _inst_1)) a n))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.pow IsSMulRegular.powₓ'. -/
/-- Any power of an `M`-regular element is `M`-regular. -/
theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
by
@@ -227,12 +167,6 @@ theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
· rw [pow_succ]; exact (ra.smul_iff (a ^ n)).mpr hn
#align is_smul_regular.pow IsSMulRegular.pow
-/- warning: is_smul_regular.pow_iff -> IsSMulRegular.pow_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1] {n : Nat}, (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Iff (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R _inst_1)) a n)) (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) a))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1] {n : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Iff (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R _inst_1)) a n)) (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) a))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.pow_iff IsSMulRegular.pow_iffₓ'. -/
/-- An element `a` is `M`-regular if and only if a positive power of `a` is `M`-regular. -/
theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a :=
by
@@ -247,12 +181,6 @@ section MonoidSmul
variable [Monoid S] [SMul R M] [SMul R S] [MulAction S M] [IsScalarTower R S M]
-/- warning: is_smul_regular.of_smul_eq_one -> IsSMulRegular.of_smul_eq_one is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {S : Type.{u2}} {M : Type.{u3}} {a : R} {s : S} [_inst_1 : Monoid.{u2} S] [_inst_2 : SMul.{u1, u3} R M] [_inst_3 : SMul.{u1, u2} R S] [_inst_4 : MulAction.{u2, u3} S M _inst_1] [_inst_5 : IsScalarTower.{u1, u2, u3} R S M _inst_3 (MulAction.toHasSmul.{u2, u3} S M _inst_1 _inst_4) _inst_2], (Eq.{succ u2} S (SMul.smul.{u1, u2} R S _inst_3 a s) (OfNat.ofNat.{u2} S 1 (OfNat.mk.{u2} S 1 (One.one.{u2} S (MulOneClass.toHasOne.{u2} S (Monoid.toMulOneClass.{u2} S _inst_1)))))) -> (IsSMulRegular.{u2, u3} S M (MulAction.toHasSmul.{u2, u3} S M _inst_1 _inst_4) s)
-but is expected to have type
- forall {R : Type.{u2}} {S : Type.{u3}} {M : Type.{u1}} {a : R} {s : S} [_inst_1 : Monoid.{u3} S] [_inst_2 : SMul.{u2, u1} R M] [_inst_3 : SMul.{u2, u3} R S] [_inst_4 : MulAction.{u3, u1} S M _inst_1] [_inst_5 : IsScalarTower.{u2, u3, u1} R S M _inst_3 (MulAction.toSMul.{u3, u1} S M _inst_1 _inst_4) _inst_2], (Eq.{succ u3} S (HSMul.hSMul.{u2, u3, u3} R S S (instHSMul.{u2, u3} R S _inst_3) a s) (OfNat.ofNat.{u3} S 1 (One.toOfNat1.{u3} S (Monoid.toOne.{u3} S _inst_1)))) -> (IsSMulRegular.{u3, u1} S M (MulAction.toSMul.{u3, u1} S M _inst_1 _inst_4) s)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_smul_eq_one IsSMulRegular.of_smul_eq_oneₓ'. -/
/-- An element of `S` admitting a left inverse in `R` is `M`-regular. -/
theorem of_smul_eq_one (h : a • s = 1) : IsSMulRegular M s :=
of_smul a (by rw [h]; exact one M)
@@ -265,34 +193,16 @@ section MonoidWithZero
variable [MonoidWithZero R] [MonoidWithZero S] [Zero M] [MulActionWithZero R M]
[MulActionWithZero R S] [MulActionWithZero S M] [IsScalarTower R S M]
-/- warning: is_smul_regular.subsingleton -> IsSMulRegular.subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3], (IsSMulRegular.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M _inst_3 (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R _inst_1))) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (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 _inst_1))))))) -> (Subsingleton.{succ u2} M)
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} [_inst_1 : MonoidWithZero.{u2} R] [_inst_3 : Zero.{u1} M] [_inst_4 : MulActionWithZero.{u2, u1} R M _inst_1 _inst_3], (IsSMulRegular.{u2, u1} R M (SMulZeroClass.toSMul.{u2, u1} R M _inst_3 (SMulWithZero.toSMulZeroClass.{u2, u1} R M (MonoidWithZero.toZero.{u2} R _inst_1) _inst_3 (MulActionWithZero.toSMulWithZero.{u2, u1} R M _inst_1 _inst_3 _inst_4))) (OfNat.ofNat.{u2} R 0 (Zero.toOfNat0.{u2} R (MonoidWithZero.toZero.{u2} R _inst_1)))) -> (Subsingleton.{succ u1} M)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.subsingleton IsSMulRegular.subsingletonₓ'. -/
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
protected theorem subsingleton (h : IsSMulRegular M (0 : R)) : Subsingleton M :=
⟨fun a b => h (by repeat' rw [MulActionWithZero.zero_smul])⟩
#align is_smul_regular.subsingleton IsSMulRegular.subsingleton
-/- warning: is_smul_regular.zero_iff_subsingleton -> IsSMulRegular.zero_iff_subsingleton is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3], Iff (IsSMulRegular.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M _inst_3 (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R _inst_1))) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (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 _inst_1))))))) (Subsingleton.{succ u2} M)
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} [_inst_1 : MonoidWithZero.{u2} R] [_inst_3 : Zero.{u1} M] [_inst_4 : MulActionWithZero.{u2, u1} R M _inst_1 _inst_3], Iff (IsSMulRegular.{u2, u1} R M (SMulZeroClass.toSMul.{u2, u1} R M _inst_3 (SMulWithZero.toSMulZeroClass.{u2, u1} R M (MonoidWithZero.toZero.{u2} R _inst_1) _inst_3 (MulActionWithZero.toSMulWithZero.{u2, u1} R M _inst_1 _inst_3 _inst_4))) (OfNat.ofNat.{u2} R 0 (Zero.toOfNat0.{u2} R (MonoidWithZero.toZero.{u2} R _inst_1)))) (Subsingleton.{succ u1} M)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.zero_iff_subsingleton IsSMulRegular.zero_iff_subsingletonₓ'. -/
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
theorem zero_iff_subsingleton : IsSMulRegular M (0 : R) ↔ Subsingleton M :=
⟨fun h => h.Subsingleton, fun H a b h => @Subsingleton.elim _ H a b⟩
#align is_smul_regular.zero_iff_subsingleton IsSMulRegular.zero_iff_subsingleton
-/- warning: is_smul_regular.not_zero_iff -> IsSMulRegular.not_zero_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3], Iff (Not (IsSMulRegular.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M _inst_3 (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R _inst_1))) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (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 _inst_1)))))))) (Nontrivial.{u2} M)
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} [_inst_1 : MonoidWithZero.{u2} R] [_inst_3 : Zero.{u1} M] [_inst_4 : MulActionWithZero.{u2, u1} R M _inst_1 _inst_3], Iff (Not (IsSMulRegular.{u2, u1} R M (SMulZeroClass.toSMul.{u2, u1} R M _inst_3 (SMulWithZero.toSMulZeroClass.{u2, u1} R M (MonoidWithZero.toZero.{u2} R _inst_1) _inst_3 (MulActionWithZero.toSMulWithZero.{u2, u1} R M _inst_1 _inst_3 _inst_4))) (OfNat.ofNat.{u2} R 0 (Zero.toOfNat0.{u2} R (MonoidWithZero.toZero.{u2} R _inst_1))))) (Nontrivial.{u1} M)
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.not_zero_iff IsSMulRegular.not_zero_iffₓ'. -/
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M :=
by
@@ -301,23 +211,11 @@ theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M :=
exact Iff.rfl
#align is_smul_regular.not_zero_iff IsSMulRegular.not_zero_iff
-/- warning: is_smul_regular.zero -> IsSMulRegular.zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3] [sM : Subsingleton.{succ u2} M], IsSMulRegular.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M _inst_3 (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R _inst_1))) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (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 _inst_1))))))
-but is expected to have type
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3] [sM : Subsingleton.{succ u2} M], IsSMulRegular.{u1, u2} R M (SMulZeroClass.toSMul.{u1, u2} R M _inst_3 (SMulWithZero.toSMulZeroClass.{u1, u2} R M (MonoidWithZero.toZero.{u1} R _inst_1) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MonoidWithZero.toZero.{u1} R _inst_1)))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.zero IsSMulRegular.zeroₓ'. -/
/-- The element `0` is `M`-regular when `M` is trivial. -/
theorem zero [sM : Subsingleton M] : IsSMulRegular M (0 : R) :=
zero_iff_subsingleton.mpr sM
#align is_smul_regular.zero IsSMulRegular.zero
-/- warning: is_smul_regular.not_zero -> IsSMulRegular.not_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3] [nM : Nontrivial.{u2} M], Not (IsSMulRegular.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M _inst_3 (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R _inst_1))) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (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 _inst_1)))))))
-but is expected to have type
- forall {R : Type.{u1}} {M : Type.{u2}} [_inst_1 : MonoidWithZero.{u1} R] [_inst_3 : Zero.{u2} M] [_inst_4 : MulActionWithZero.{u1, u2} R M _inst_1 _inst_3] [nM : Nontrivial.{u2} M], Not (IsSMulRegular.{u1, u2} R M (SMulZeroClass.toSMul.{u1, u2} R M _inst_3 (SMulWithZero.toSMulZeroClass.{u1, u2} R M (MonoidWithZero.toZero.{u1} R _inst_1) _inst_3 (MulActionWithZero.toSMulWithZero.{u1, u2} R M _inst_1 _inst_3 _inst_4))) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MonoidWithZero.toZero.{u1} R _inst_1))))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.not_zero IsSMulRegular.not_zeroₓ'. -/
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero [nM : Nontrivial M] : ¬IsSMulRegular M (0 : R) :=
not_zero_iff.mpr nM
@@ -329,12 +227,6 @@ section CommSemigroup
variable [CommSemigroup R] [SMul R M] [IsScalarTower R R M]
-/- warning: is_smul_regular.mul_iff -> IsSMulRegular.mul_iff is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {a : R} {b : R} [_inst_1 : CommSemigroup.{u1} R] [_inst_2 : SMul.{u1, u2} R M] [_inst_3 : IsScalarTower.{u1, u1, u2} R R M (Mul.toSMul.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1))) _inst_2 _inst_2], Iff (IsSMulRegular.{u1, u2} R M _inst_2 (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Semigroup.toHasMul.{u1} R (CommSemigroup.toSemigroup.{u1} R _inst_1))) a b)) (And (IsSMulRegular.{u1, u2} R M _inst_2 a) (IsSMulRegular.{u1, u2} R M _inst_2 b))
-but is expected to have type
- forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : CommSemigroup.{u2} R] [_inst_2 : SMul.{u2, u1} R M] [_inst_3 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R (Semigroup.toMul.{u2} R (CommSemigroup.toSemigroup.{u2} R _inst_1))) _inst_2 _inst_2], Iff (IsSMulRegular.{u2, u1} R M _inst_2 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R (Semigroup.toMul.{u2} R (CommSemigroup.toSemigroup.{u2} R _inst_1))) a b)) (And (IsSMulRegular.{u2, u1} R M _inst_2 a) (IsSMulRegular.{u2, u1} R M _inst_2 b))
-Case conversion may be inaccurate. Consider using '#align is_smul_regular.mul_iff IsSMulRegular.mul_iffₓ'. -/
/-- A product is `M`-regular if and only if the factors are. -/
theorem mul_iff : IsSMulRegular M (a * b) ↔ IsSMulRegular M a ∧ IsSMulRegular M b :=
by
@@ -366,23 +258,11 @@ section Units
variable [Monoid R] [MulAction R M]
-/- warning: units.is_smul_regular -> Units.isSMulRegular is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} (M : Type.{u2}) [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1] (a : Units.{u1} R _inst_1), IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) ((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.{u2}} (M : Type.{u1}) [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1] (a : Units.{u2} R _inst_1), IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) (Units.val.{u2} R _inst_1 a)
-Case conversion may be inaccurate. Consider using '#align units.is_smul_regular Units.isSMulRegularₓ'. -/
/-- Any element in `Rˣ` is `M`-regular. -/
theorem Units.isSMulRegular (a : Rˣ) : IsSMulRegular M (a : R) :=
IsSMulRegular.of_mul_eq_one a.inv_val
#align units.is_smul_regular Units.isSMulRegular
-/- warning: is_unit.is_smul_regular -> IsUnit.isSMulRegular is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} (M : Type.{u2}) {a : R} [_inst_1 : Monoid.{u1} R] [_inst_2 : MulAction.{u1, u2} R M _inst_1], (IsUnit.{u1} R _inst_1 a) -> (IsSMulRegular.{u1, u2} R M (MulAction.toHasSmul.{u1, u2} R M _inst_1 _inst_2) a)
-but is expected to have type
- forall {R : Type.{u2}} (M : Type.{u1}) {a : R} [_inst_1 : Monoid.{u2} R] [_inst_2 : MulAction.{u2, u1} R M _inst_1], (IsUnit.{u2} R _inst_1 a) -> (IsSMulRegular.{u2, u1} R M (MulAction.toSMul.{u2, u1} R M _inst_1 _inst_2) a)
-Case conversion may be inaccurate. Consider using '#align is_unit.is_smul_regular IsUnit.isSMulRegularₓ'. -/
/-- A unit is `M`-regular. -/
theorem IsUnit.isSMulRegular (ua : IsUnit a) : IsSMulRegular M a :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -148,9 +148,7 @@ but is expected to have type
forall {R : Type.{u2}} {M : Type.{u1}} {a : R} {b : R} [_inst_1 : SMul.{u2, u1} R M] [_inst_5 : Mul.{u2} R] [_inst_6 : IsScalarTower.{u2, u2, u1} R R M (Mul.toSMul.{u2} R _inst_5) _inst_1 _inst_1], (IsSMulRegular.{u2, u1} R M _inst_1 (HMul.hMul.{u2, u2, u2} R R R (instHMul.{u2} R _inst_5) a b)) -> (IsSMulRegular.{u2, u1} R M _inst_1 b)
Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_mul IsSMulRegular.of_mulₓ'. -/
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
- by
- rw [← smul_eq_mul] at ab
- exact ab.of_smul _
+ by rw [← smul_eq_mul] at ab; exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
/- warning: is_smul_regular.mul_iff_right -> IsSMulRegular.mul_iff_right is a dubious translation:
@@ -212,10 +210,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_mul_eq_one IsSMulRegular.of_mul_eq_oneₓ'. -/
/-- An element of `R` admitting a left inverse is `M`-regular. -/
theorem of_mul_eq_one (h : a * b = 1) : IsSMulRegular M b :=
- of_mul
- (by
- rw [h]
- exact one M)
+ of_mul (by rw [h]; exact one M)
#align is_smul_regular.of_mul_eq_one IsSMulRegular.of_mul_eq_one
/- warning: is_smul_regular.pow -> IsSMulRegular.pow is a dubious translation:
@@ -229,8 +224,7 @@ theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) :=
by
induction' n with n hn
· simp only [one, pow_zero]
- · rw [pow_succ]
- exact (ra.smul_iff (a ^ n)).mpr hn
+ · rw [pow_succ]; exact (ra.smul_iff (a ^ n)).mpr hn
#align is_smul_regular.pow IsSMulRegular.pow
/- warning: is_smul_regular.pow_iff -> IsSMulRegular.pow_iff is a dubious translation:
@@ -261,10 +255,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align is_smul_regular.of_smul_eq_one IsSMulRegular.of_smul_eq_oneₓ'. -/
/-- An element of `S` admitting a left inverse in `R` is `M`-regular. -/
theorem of_smul_eq_one (h : a • s = 1) : IsSMulRegular M s :=
- of_smul a
- (by
- rw [h]
- exact one M)
+ of_smul a (by rw [h]; exact one M)
#align is_smul_regular.of_smul_eq_one IsSMulRegular.of_smul_eq_one
end MonoidSmul
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -151,14 +151,14 @@ theorem of_mul_eq_one (h : a * b = 1) : IsSMulRegular M b :=
theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n) := by
induction' n with n hn
· rw [pow_zero]; simp only [one]
- · rw [pow_succ]
+ · rw [pow_succ']
exact (ra.smul_iff (a ^ n)).mpr hn
#align is_smul_regular.pow IsSMulRegular.pow
/-- An element `a` is `M`-regular if and only if a positive power of `a` is `M`-regular. -/
theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a := by
refine' ⟨_, pow n⟩
- rw [← Nat.succ_pred_eq_of_pos n0, pow_succ', ← smul_eq_mul]
+ rw [← Nat.succ_pred_eq_of_pos n0, pow_succ, ← smul_eq_mul]
exact of_smul _
#align is_smul_regular.pow_iff IsSMulRegular.pow_iff
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -127,7 +127,6 @@ end SMul
section Monoid
variable [Monoid R] [MulAction R M]
-
variable (M)
/-- One is always `M`-regular. -/
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.
@@ -117,7 +117,7 @@ theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] :
IsSMulRegular M (a * b) ∧ IsSMulRegular M (b * a) ↔ IsSMulRegular M a ∧ IsSMulRegular M b := by
refine' ⟨_, _⟩
· rintro ⟨ab, ba⟩
- refine' ⟨ba.of_mul, ab.of_mul⟩
+ exact ⟨ba.of_mul, ab.of_mul⟩
· rintro ⟨ha, hb⟩
exact ⟨ha.mul hb, hb.mul ha⟩
#align is_smul_regular.mul_and_mul_iff IsSMulRegular.mul_and_mul_iff
@@ -74,7 +74,7 @@ element, then `b` is `M`-regular. -/
theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s :=
@Function.Injective.of_comp _ _ _ (fun m : M => a • m) _ fun c d cd => by
dsimp only [Function.comp_def] at cd
- rw [←smul_assoc, ←smul_assoc] at cd
+ rw [← smul_assoc, ← smul_assoc] at cd
exact ab cd
#align is_smul_regular.of_smul IsSMulRegular.of_smul
This is the supremum of
along with some minor fixes from failures on nightly-testing as Mathlib master
is merged into it.
Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.
I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0
branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.
In particular this includes adjustments for the Lean PRs
We can get rid of all the
local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)
macros across Mathlib (and in any projects that want to write natural number powers of reals).
Changes the default behaviour of simp
to (config := {decide := false})
. This makes simp
(and consequentially norm_num
) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp
or norm_num
to decide
or rfl
, or adding (config := {decide := true})
.
This changed the behaviour of simp
so that simp [f]
will only unfold "fully applied" occurrences of f
. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true })
. We may in future add a syntax for this, e.g. simp [!f]
; please provide feedback! In the meantime, we have made the following changes:
(config := { unfoldPartialApp := true })
in some places, to recover the old behaviour@[eqns]
to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp
and Function.flip
.This change in Lean may require further changes down the line (e.g. adding the !f
syntax, and/or upstreaming the special treatment for Function.comp
and Function.flip
, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>
@@ -73,7 +73,7 @@ theorem smul (ra : IsSMulRegular M a) (rs : IsSMulRegular M s) : IsSMulRegular M
element, then `b` is `M`-regular. -/
theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s :=
@Function.Injective.of_comp _ _ _ (fun m : M => a • m) _ fun c d cd => by
- dsimp only [Function.comp] at cd
+ dsimp only [Function.comp_def] at cd
rw [←smul_assoc, ←smul_assoc] at cd
exact ab cd
#align is_smul_regular.of_smul IsSMulRegular.of_smul
@@ -133,7 +133,7 @@ variable (M)
/-- One is always `M`-regular. -/
@[simp]
theorem one : IsSMulRegular M (1 : R) := fun a b ab => by
- dsimp only [Function.comp] at ab
+ dsimp only [Function.comp_def] at ab
rw [one_smul, one_smul] at ab
assumption
#align is_smul_regular.one IsSMulRegular.one
@@ -186,7 +186,7 @@ variable [MonoidWithZero R] [MonoidWithZero S] [Zero M] [MulActionWithZero R M]
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
protected theorem subsingleton (h : IsSMulRegular M (0 : R)) : Subsingleton M :=
- ⟨fun a b => h (by dsimp only [Function.comp]; repeat' rw [MulActionWithZero.zero_smul])⟩
+ ⟨fun a b => h (by dsimp only [Function.comp_def]; repeat' rw [MulActionWithZero.zero_smul])⟩
#align is_smul_regular.subsingleton IsSMulRegular.subsingleton
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
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 @@ coincide.
-/
-variable {R S : Type _} (M : Type _) {a b : R} {s : S}
+variable {R S : Type*} (M : Type*) {a b : R} {s : S}
/-- An `M`-regular element is an element `c` such that multiplication on the left by `c` is an
injective map `M → M`. -/
@@ -229,7 +229,7 @@ end IsSMulRegular
section Group
-variable {G : Type _} [Group G]
+variable {G : Type*} [Group G]
/-- An element of a group acting on a Type is regular. This relies on the availability
of the inverse given by groups, since there is no `LeftCancelSMul` typeclass. -/
@@ -15,7 +15,7 @@ We introduce `M`-regular elements, in the context of an `R`-module `M`. The cor
predicate is called `IsSMulRegular`.
There are very limited typeclass assumptions on `R` and `M`, but the "mathematical" case of interest
-is a commutative ring `R` acting an a module `M`. Since the properties are "multiplicative", there
+is a commutative ring `R` acting on a module `M`. Since the properties are "multiplicative", there
is no actual requirement of having an addition, but there is a zero in both `R` and `M`.
SMultiplications involving `0` are, of course, all trivial.
@@ -2,15 +2,12 @@
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.smul
-! leanprover-community/mathlib commit 550b58538991c8977703fdeb7c9d51a5aa27df11
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.SMulWithZero
import Mathlib.Algebra.Regular.Basic
+#align_import algebra.regular.smul from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
+
/-!
# Action of regular elements on a module
@@ -194,7 +194,7 @@ protected theorem subsingleton (h : IsSMulRegular M (0 : R)) : Subsingleton M :=
/-- The element `0` is `M`-regular if and only if `M` is trivial. -/
theorem zero_iff_subsingleton : IsSMulRegular M (0 : R) ↔ Subsingleton M :=
- ⟨fun h => h.subsingleton, fun H a b _ => @Subsingleton.elim _ H a b⟩
+ ⟨fun h => h.subsingleton, fun H a b _ => @Subsingleton.elim _ H a b⟩
#align is_smul_regular.zero_iff_subsingleton IsSMulRegular.zero_iff_subsingleton
/-- The `0` element is not `M`-regular, on a non-trivial module. -/
congr!
and convert
(#2606)
congr!
, convert
, and convert_to
to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.congr!
now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.HEq
congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality ⊢ ⟨a, x⟩ = ⟨b, y⟩
of sigma types, congr!
turns this into goals ⊢ a = b
and ⊢ a = b → HEq x y
(note that congr!
will also auto-introduce a = b
for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.congr!
(and hence convert
) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr
was being abused to unfold definitions.set_option trace.congr! true
you can see what congr!
sees when it is deciding on congruence lemmas.convert_to
to do using 1
when there is no using
clause, to match its documentation.Note that congr!
is more capable than congr
at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using
clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs
option), which can help limit the depth automatically.
There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h
, that causes it to behave more like congr
, including using default transparency when unfolding.
@@ -238,7 +238,7 @@ variable {G : Type _} [Group G]
of the inverse given by groups, since there is no `LeftCancelSMul` typeclass. -/
theorem isSMulRegular_of_group [MulAction G R] (g : G) : IsSMulRegular R g := by
intro x y h
- convert congr_arg ((· • ·) g⁻¹) h using 1 <;> simp [← smul_assoc]
+ convert congr_arg (g⁻¹ • ·) h using 1 <;> simp [← smul_assoc]
#align is_smul_regular_of_group isSMulRegular_of_group
end Group
This was done semi-automatically with some regular expressions in vim in contrast to the fully automatic https://github.com/leanprover-community/mathlib4/pull/1523.
Co-authored-by: Moritz Firsching <firsching@google.com>
@@ -102,8 +102,8 @@ theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulR
ra.smul rb
#align is_smul_regular.mul IsSMulRegular.mul
-theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
- by
+theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) :
+ IsSMulRegular M b := by
rw [← smul_eq_mul] at ab
exact ab.of_smul _
#align is_smul_regular.of_mul IsSMulRegular.of_mul
Fix a lot of wrong casing mostly in the docstrings but also sometimes in def/theorem names. E.g. fin 2 --> Fin 2
, add_monoid_hom --> AddMonoidHom
Remove \n
from to_additive
docstrings that were inserted by mathport.
Move files and directories with Gcd
and Smul
to GCD
and SMul
@@ -8,7 +8,7 @@ Authors: Damiano Testa
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathlib.Algebra.SmulWithZero
+import Mathlib.Algebra.SMulWithZero
import Mathlib.Algebra.Regular.Basic
/-!
@@ -20,7 +20,7 @@ predicate is called `IsSMulRegular`.
There are very limited typeclass assumptions on `R` and `M`, but the "mathematical" case of interest
is a commutative ring `R` acting an a module `M`. Since the properties are "multiplicative", there
is no actual requirement of having an addition, but there is a zero in both `R` and `M`.
-Smultiplications involving `0` are, of course, all trivial.
+SMultiplications involving `0` are, of course, all trivial.
The defining property is that an element `a ∈ R` is `M`-regular if the smultiplication map
`M → M`, defined by `m ↦ a • m`, is injective.
@@ -63,7 +63,7 @@ namespace IsSMulRegular
variable {M}
-section HasSmul
+section SMul
variable [SMul R M] [SMul R S] [SMul S M] [IsScalarTower R S M]
@@ -125,7 +125,7 @@ theorem mul_and_mul_iff [Mul R] [IsScalarTower R R M] :
exact ⟨ha.mul hb, hb.mul ha⟩
#align is_smul_regular.mul_and_mul_iff IsSMulRegular.mul_and_mul_iff
-end HasSmul
+end SMul
section Monoid
@@ -168,7 +168,7 @@ theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegul
end Monoid
-section MonoidSmul
+section MonoidSMul
variable [Monoid S] [SMul R M] [SMul R S] [MulAction S M] [IsScalarTower R S M]
@@ -180,7 +180,7 @@ theorem of_smul_eq_one (h : a • s = 1) : IsSMulRegular M s :=
exact one M)
#align is_smul_regular.of_smul_eq_one IsSMulRegular.of_smul_eq_one
-end MonoidSmul
+end MonoidSMul
section MonoidWithZero
All dependencies are ported!