-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat: In a ring, sets act on submodules #7140
Conversation
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
…r-community/mathlib4 into zjj/set_smul_submodule
I think in locale Pointwise this is even a MulAction. |
It is a distributive multicative action! Thanks for pointing this out. |
Thanks for confirming! If |
It is when using the SetSemiring alias |
I think we might already have a |
That's using union as addition, not pointwise addition inherited from addition on R.
I think yes (and loogle found Submodule.moduleSubmodule). (Should we restrict to CommSemiring?) |
Should I re-implement this in terms of span composing with soul then? |
I suspect this has the same problem as you remarked about for the case of non-commutative rings |
Do you actually care about the non-commutative case? |
No,not really. But we should have it work for noncomm cases in case other people care about them right? |
|
Let `s ⊆ R` be a set and `N ≤ M` be a submodule, then `s • N` is the smallest submodule containing | ||
all `r • n` where `r ∈ s` and `n ∈ N`. | ||
-/ | ||
protected def pointwiseSetSMul : SMul (Set R) (Submodule R M) where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generalizes to
protected def pointwiseSetSMul : SMul (Set R) (Submodule R M) where | |
protected def pointwiseSetSMul : SMul (Set S) (Submodule R M) where |
right? How may of the other results also generalize for free?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is S
here? Is it another ring of which M
is a module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; or more generally, a monoid for which it is a distribMulAction
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything upto induction principal should work mutatis mutandis. My hunch is that if we further assume [SMulCommClass R S M]
then everything should work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the generalized principal is this
variable {s N} in
@[elab_as_elim]
lemma set_smul_inductionOn {motive : (x : M) → (_ : x ∈ s • N) → Prop}
(x : M)
(hx : x ∈ s • N)
(smul₀ : ∀ ⦃r : S⦄ ⦃n : M⦄ (mem₁ : r ∈ s) (mem₂ : n ∈ N),
motive (r • n) (mem_set_smul_of_mem_mem mem₁ mem₂))
(smul₁ : ∀ (r : R) ⦃m : M⦄ (mem : m ∈ s • N) ,
motive m mem → motive (r • m) (Submodule.smul_mem _ r mem)) --
(add : ∀ ⦃m₁ m₂ : M⦄ (mem₁: m₁ ∈ s • N) (mem₂ : m₂ ∈ s • N),
motive m₁ mem₁ → motive m₂ mem₂ → motive (m₁ + m₂) (Submodule.add_mem _ mem₁ mem₂))
(zero : motive 0 (Submodule.zero_mem _)) :
motive x hx :=
let ⟨_, h⟩ := set_smul_le s N
{ carrier := { m | ∃ (mem : m ∈ s • N), motive m mem },
zero_mem' := ⟨Submodule.zero_mem _, zero⟩
add_mem' := fun ⟨mem, h⟩ ⟨mem', h'⟩ ↦ ⟨_, add mem mem' h h'⟩
smul_mem' := fun r x ⟨mem, h⟩ ↦ ⟨_, smul₁ r mem h⟩ }
(fun _ _ mem mem' ↦ ⟨mem_set_smul_of_mem_mem mem mem', smul₀ mem mem'⟩) hx
h
But to change the next lemma
lemma set_smul_eq_map [SMulCommClass R R N] [Module S N] [SMulCommClass S R N] :
s • N =
Submodule.map
(N.subtype.comp (Finsupp.lsum R <| DistribMulAction.toLinearMap _ _))
(Finsupp.supported N R s) := by
I need N
to be both a R
-submodule and S
-submodule, so I included [Module S N]
, can I somehow say this module structure is restricted from [Module S M]
, or should I just I added some assumption like \forall s \in S, n \in N, s \bu n \in N
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is perhaps Subbimodule
relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would just leave this one ungeneralized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we generalize so that r • N
makes sense for all r : S
, then Submodule.singleton_set_smul
and Submodule.singleton_set_smul
can be generalized as well. We can prove x ∈ ({r} : Set S) • N ↔ ∃ (m : M), m ∈ N ∧ x = r • m
but we can't say ({r} : Set R) • N = r • N
LGTM modulo the minor comment above |
🚀 Pull request has been placed on the maintainer queue by erdOne. |
Co-authored-by: Johan Commelin <johan@commelin.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
If $M$ is an $R$-module, $N$ a submodule and $S$ a subset of $R$. Then we can define $S \cdot N$ to be the smallest submodule containing all $s \cdot n$ where $s \in S$ and $n \in N$ Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Pull request successfully merged into master. Build succeeded: |
If$M$ is an $R$ -module, $N$ a submodule and $S$ a subset of $R$ . Then we can define $S \cdot N$ to be the smallest submodule containing all $s \cdot n$ where $s \in S$ and $n \in N$