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
"}
{"# NoZeroSMulDivisors
This file defines the NoZeroSMulDivisors class, and includes some tests
for the vanishing of elements (especially in modules over division rings).
","### NoZeroSMulDivisors
"}
NoZeroSMulDivisors
structure
(R M : Type*) [Zero R] [Zero M] [SMul R M]
/-- `NoZeroSMulDivisors R M` states that a scalar multiple is `0` only if either argument is `0`.
This is a version of saying that `M` is torsion free, without assuming `R` is zero-divisor free.
The main application of `NoZeroSMulDivisors R M`, when `M` is a module,
is the result `smul_eq_zero`: a scalar multiple is `0` iff either argument is `0`.
It is a generalization of the `NoZeroDivisors` class to heterogeneous multiplication.
-/
@[mk_iff]
class NoZeroSMulDivisors (R M : Type*) [Zero R] [Zero M] [SMul R M] : Prop where
/-- If scalar multiplication yields zero, either the scalar or the vector was zero. -/
eq_zero_or_eq_zero_of_smul_eq_zero : ∀ {c : R} {x : M}, c • x = 0 → c = 0 ∨ x = 0
Function.Injective.noZeroSMulDivisors
theorem
{R M N : Type*} [Zero R] [Zero M] [Zero N] [SMul R M] [SMul R N] [NoZeroSMulDivisors R N] (f : M → N)
(hf : Function.Injective f) (h0 : f 0 = 0) (hs : ∀ (c : R) (x : M), f (c • x) = c • f x) : NoZeroSMulDivisors R M
/-- Pullback a `NoZeroSMulDivisors` instance along an injective function. -/
theorem Function.Injective.noZeroSMulDivisors {R M N : Type*} [Zero R] [Zero M] [Zero N]
[SMul R M] [SMul R N] [NoZeroSMulDivisors R N] (f : M → N) (hf : Function.Injective f)
(h0 : f 0 = 0) (hs : ∀ (c : R) (x : M), f (c • x) = c • f x) : NoZeroSMulDivisors R M :=
⟨fun {_ _} h =>
Or.imp_right (@hf _ _) <| h0.symm ▸ eq_zero_or_eq_zero_of_smul_eq_zero (by rw [← hs, h, h0])⟩
NoZeroDivisors.toNoZeroSMulDivisors
instance
[Zero R] [Mul R] [NoZeroDivisors R] : NoZeroSMulDivisors R R
instance (priority := 100) NoZeroDivisors.toNoZeroSMulDivisors [Zero R] [Mul R]
[NoZeroDivisors R] : NoZeroSMulDivisors R R :=
⟨fun {_ _} => eq_zero_or_eq_zero_of_mul_eq_zero⟩
smul_ne_zero
theorem
[Zero R] [Zero M] [SMul R M] [NoZeroSMulDivisors R M] {c : R} {x : M} (hc : c ≠ 0) (hx : x ≠ 0) : c • x ≠ 0
theorem smul_ne_zero [Zero R] [Zero M] [SMul R M] [NoZeroSMulDivisors R M] {c : R} {x : M}
(hc : c ≠ 0) (hx : x ≠ 0) : c • x ≠ 0 := fun h =>
(eq_zero_or_eq_zero_of_smul_eq_zero h).elim hc hx
smul_eq_zero
theorem
: c • x = 0 ↔ c = 0 ∨ x = 0
smul_ne_zero_iff
theorem
: c • x ≠ 0 ↔ c ≠ 0 ∧ x ≠ 0
theorem smul_ne_zero_iff : c • x ≠ 0c • x ≠ 0 ↔ c ≠ 0 ∧ x ≠ 0 := by rw [Ne, smul_eq_zero, not_or]
smul_eq_zero_iff_left
theorem
(hx : x ≠ 0) : c • x = 0 ↔ c = 0
lemma smul_eq_zero_iff_left (hx : x ≠ 0) : c • x = 0 ↔ c = 0 := by simp [hx]
smul_eq_zero_iff_right
theorem
(hc : c ≠ 0) : c • x = 0 ↔ x = 0
lemma smul_eq_zero_iff_right (hc : c ≠ 0) : c • x = 0 ↔ x = 0 := by simp [hc]
smul_ne_zero_iff_left
theorem
(hx : x ≠ 0) : c • x ≠ 0 ↔ c ≠ 0
lemma smul_ne_zero_iff_left (hx : x ≠ 0) : c • x ≠ 0c • x ≠ 0 ↔ c ≠ 0 := by simp [hx]
smul_ne_zero_iff_right
theorem
(hc : c ≠ 0) : c • x ≠ 0 ↔ x ≠ 0
lemma smul_ne_zero_iff_right (hc : c ≠ 0) : c • x ≠ 0c • x ≠ 0 ↔ x ≠ 0 := by simp [hc]