Module docstring
{"# Pointwise instances on Submodules
This file provides:
Submodule.pointwiseNeg
and the actions
Submodule.pointwiseDistribMulActionSubmodule.pointwiseMulActionWithZero
which matches the action of Set.mulActionSet.
This file also provides:
* Submodule.pointwiseSetSMulSubmodule: for R-module M, a s : Set R can act on
  N : Submodule R M by defining s • N to be the smallest submodule containing all a • n
  where a ∈ s and n ∈ N.
These actions are available in the Pointwise locale.
Implementation notes
For an R-module M, the action of a subset of R acting on a submodule of M introduced in
section set_acting_on_submodules does not have a counterpart in the files
Mathlib.Algebra.Group.Submonoid.Pointwise and Mathlib.Algebra.GroupWithZero.Submonoid.Pointwise.
Other than section set_acting_on_submodules, most of the lemmas in this file are direct copies of
lemmas from the file Mathlib.Algebra.Group.Submonoid.Pointwise.
","### Sets acting on Submodules
Let R be a (semi)ring and M an R-module. Let S be a monoid which acts on M distributively,
then subsets of S can act on submodules of M.
For subset s ⊆ S and submodule N ≤ M, we define s • N to be the smallest submodule containing
all r • n where r ∈ s and n ∈ N.
Results
For arbitrary monoids S acting distributively on M, there is an induction principle for s • N:
To prove P holds for all s • N, it is enough
to prove:
- for all r ∈ s and n ∈ N, P (r • n);
- for all r and m ∈ s • N, P (r • n);
- for all m₁, m₂, P m₁ and P m₂ implies P (m₁ + m₂);
- P 0.
To invoke this induction principle, use induction x, hx using Submodule.set_smul_inductionOn where
x : M and hx : x ∈ s • N
When we consider subset of R acting on M
- Submodule.pointwiseSetDistribMulAction : the action described above is distributive.
- Submodule.mem_set_smul : x ∈ s • N iff x can be written as r₀ n₀ + ... + rₖ nₖ where
  rᵢ ∈ s and nᵢ ∈ N.
- Submodule.coe_span_smul: s • N is the same as ⟨s⟩ • N where ⟨s⟩ is the ideal spanned
  by s.
Notes
- If we assume the addition on subsets of 
Ris the⊔and subtraction⊓i.e. useSetSemiring, then this action actually gives a module structure on submodules ofMover subsets ofR. - If we generalize so that 
r • Nmakes sense for allr : S, thenSubmodule.singleton_set_smulandSubmodule.singleton_set_smulcan be generalized as well. "}