Module docstring
{"# NoZeroSMulDivisors
This file defines the NoZeroSMulDivisors class, and includes some tests
for the vanishing of elements (especially in modules over division rings).
"}
{"# NoZeroSMulDivisors
This file defines the NoZeroSMulDivisors class, and includes some tests
for the vanishing of elements (especially in modules over division rings).
"}
Nat.noZeroSMulDivisors
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommMonoid M] [Module R M] [NoZeroSMulDivisors R M] : NoZeroSMulDivisors ℕ M
theorem Nat.noZeroSMulDivisors
(R) (M) [Semiring R] [CharZero R] [AddCommMonoid M] [Module R M] [NoZeroSMulDivisors R M] :
NoZeroSMulDivisors ℕ M where
eq_zero_or_eq_zero_of_smul_eq_zero {c x} := by rw [← Nat.cast_smul_eq_nsmul R, smul_eq_zero]; simp
two_nsmul_eq_zero
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommMonoid M] [Module R M] [NoZeroSMulDivisors R M] {v : M} : 2 • v = 0 ↔ v = 0
theorem two_nsmul_eq_zero
(R) (M) [Semiring R] [CharZero R] [AddCommMonoid M] [Module R M] [NoZeroSMulDivisors R M]
{v : M} : 2 • v = 0 ↔ v = 0 := by
haveI := Nat.noZeroSMulDivisors R M
simp [smul_eq_zero]
CharZero.of_module
theorem
(M) [AddCommMonoidWithOne M] [CharZero M] [Module R M] : CharZero R
/-- If `M` is an `R`-module with one and `M` has characteristic zero, then `R` has characteristic
zero as well. Usually `M` is an `R`-algebra. -/
theorem CharZero.of_module (M) [AddCommMonoidWithOne M] [CharZero M] [Module R M] : CharZero R := by
refine ⟨fun m n h => @Nat.cast_injective M _ _ _ _ ?_⟩
rw [← nsmul_one, ← nsmul_one, ← Nat.cast_smul_eq_nsmul R, ← Nat.cast_smul_eq_nsmul R, h]
smul_right_injective
theorem
[NoZeroSMulDivisors R M] {c : R} (hc : c ≠ 0) : Function.Injective (c • · : M → M)
theorem smul_right_injective [NoZeroSMulDivisors R M] {c : R} (hc : c ≠ 0) :
Function.Injective (c • · : M → M) :=
(injective_iff_map_eq_zero (smulAddHom R M c)).2 fun _ ha => (smul_eq_zero.mp ha).resolve_left hc
smul_right_inj
theorem
[NoZeroSMulDivisors R M] {c : R} (hc : c ≠ 0) {x y : M} : c • x = c • y ↔ x = y
theorem smul_right_inj [NoZeroSMulDivisors R M] {c : R} (hc : c ≠ 0) {x y : M} :
c • x = c • y ↔ x = y :=
(smul_right_injective M hc).eq_iff
self_eq_neg
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {v : M} : v = -v ↔ v = 0
theorem self_eq_neg
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
{v : M} : v = -v ↔ v = 0 := by
rw [← two_nsmul_eq_zero R M, two_smul, add_eq_zero_iff_eq_neg]
neg_eq_self
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {v : M} : -v = v ↔ v = 0
theorem neg_eq_self
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
{v : M} : -v = v ↔ v = 0 := by
rw [eq_comm, self_eq_neg R M]
self_ne_neg
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {v : M} : v ≠ -v ↔ v ≠ 0
theorem self_ne_neg
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
{v : M} : v ≠ -vv ≠ -v ↔ v ≠ 0 :=
(self_eq_neg R M).not
neg_ne_self
theorem
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {v : M} : -v ≠ v ↔ v ≠ 0
theorem neg_ne_self
(R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
{v : M} : -v ≠ v-v ≠ v ↔ v ≠ 0 :=
(neg_eq_self R M).not
smul_left_injective
theorem
{x : M} (hx : x ≠ 0) : Function.Injective fun c : R => c • x
theorem smul_left_injective {x : M} (hx : x ≠ 0) : Function.Injective fun c : R => c • x :=
fun c d h =>
sub_eq_zero.mp
((smul_eq_zero.mp
(calc
(c - d) • x = c • x - d • x := sub_smul c d x
_ = 0 := sub_eq_zero.mpr h
)).resolve_right
hx)
instNoZeroSMulDivisorsNatOfInt
instance
[NoZeroSMulDivisors ℤ M] : NoZeroSMulDivisors ℕ M
NoZeroSMulDivisors.int_of_charZero
theorem
(R) (M) [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [CharZero R] : NoZeroSMulDivisors ℤ M
theorem NoZeroSMulDivisors.int_of_charZero
(R) (M) [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [CharZero R] :
NoZeroSMulDivisors ℤ M :=
⟨fun {z x} h ↦ by simpa [← smul_one_smul R z x] using h⟩
CharZero.of_noZeroSMulDivisors
theorem
[Nontrivial M] [NoZeroSMulDivisors ℤ M] : CharZero R
/-- Only a ring of characteristic zero can have a non-trivial module without additive or
scalar torsion. -/
theorem CharZero.of_noZeroSMulDivisors [Nontrivial M] [NoZeroSMulDivisors ℤ M] : CharZero R := by
refine ⟨fun {n m h} ↦ ?_⟩
obtain ⟨x, hx⟩ := exists_ne (0 : M)
replace h : (n : ℤ) • x = (m : ℤ) • x := by simp [← Nat.cast_smul_eq_nsmul R, h]
simpa using smul_left_injective ℤ hx h
instNoZeroSMulDivisorsNatOfInt_1
instance
[AddCommGroup M] [NoZeroSMulDivisors ℤ M] : NoZeroSMulDivisors ℕ M
GroupWithZero.toNoZeroSMulDivisors
instance
: NoZeroSMulDivisors R M
/-- This instance applies to `DivisionSemiring`s, in particular `NNReal` and `NNRat`. -/
instance (priority := 100) GroupWithZero.toNoZeroSMulDivisors : NoZeroSMulDivisors R M :=
⟨fun {a _} h ↦ or_iff_not_imp_left.2 fun ha ↦ (smul_eq_zero_iff_eq <| Units.mk0 a ha).1 h⟩