Skip to content

Commit

Permalink
feat (algebra/module): lemma about submodules (#3466)
Browse files Browse the repository at this point in the history
Add a 3-line lemma saying that a linear combination of elements of a submodule is still in that submodule.
  • Loading branch information
smorel394 committed Jul 20, 2020
1 parent a400adb commit 4dc0814
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/algebra/module.lean
Expand Up @@ -501,6 +501,10 @@ lemma smul_mem (r : R) (h : x ∈ p) : r • x ∈ p := p.smul_mem' r h
lemma sum_mem {t : finset ι} {f : ι → M} : (∀c∈t, f c ∈ p) → (∑ i in t, f i) ∈ p :=
p.to_add_submonoid.sum_mem

lemma sum_smul_mem {t : finset ι} {f : ι → M} (r : ι → R)
(hyp : ∀ c ∈ t, f c ∈ p) : (∑ i in t, r i • f i) ∈ p :=
submodule.sum_mem _ (λ i hi, submodule.smul_mem _ _ (hyp i hi))

@[simp] lemma smul_mem_iff' (u : units R) : (u:R) • x ∈ p ↔ x ∈ p :=
⟨λ h, by simpa only [smul_smul, u.inv_mul, one_smul] using p.smul_mem ↑u⁻¹ h, p.smul_mem u⟩

Expand Down

0 comments on commit 4dc0814

Please sign in to comment.