Zulip Chat Archive

Stream: Is there code for X?

Topic: submodule span of a subset is finite linear combinations


Kevin Buzzard (May 04 2021 at 10:00):

Let RR be a commutative ring, let MM be an RR-module, and let SMS\subseteq M be a subset. The submodule submodule.span R S, a.k.a. the RR-span of SS within MM can be defined abstractly as the intersection of all the submodules of MM containing SS. Occasionally we get people asking how to prove the standard "formula" for the span known and loved by mathematicians the world over, namely that an element of the span is simply a finite RR-linear combination of elements of SS. Whenever this question comes up, me or someone else usually says "whatever you think you need this for, you might find it easier to just prove what you want using submodule.span_induction."

Today I've run into a situation where I can't figure out how to use submodule.span_induction, so my question is whether we actually do have anything of the following form (I'm flexible with the exact form, below is two examples):

import linear_algebra.basic

variables (R : Type*) [comm_ring R] [M : Type*] [add_comm_group M] [module R M]

lemma submodule.mem_span_iff_finset_sum (S : set M) (m : M) :
  m  submodule.span R S 
   (F : finset S) (φ : S  R), F.sum (λ s, φ s  s.1) = m :=
begin
  sorry
end

lemma submodule.mem_span_iff_finset_sum' (S : set M) (m : M) :
  m  submodule.span R S 
   (F : finset M) (φ : M  R), (F : set M)  S  F.sum (λ s, φ s  s) = m :=
begin
  sorry
end

I could certainly prove them myself (using submodule.span_induction), I just want to check they're not there already.


The reason I need them is the following. Say RR is an internally graded ring, i.e. RR has subgroups RaR_a indexed by a : A with A an add_comm_group such that R=aRaR=\bigoplus_a R_a (this is mathematician's == a.k.a. internal direct sum), with the axioms 1R01\in R_0 and RaRbRa+bR_aR_b\subseteq R_{a+b}. One checks easily that R0R_0 is a subring and RaR_a is an R0R_0-submodule of RR. My claim is that if MRaM\subseteq R_a is a sub-R0R_0-module then RMRa=MRM\cap R_a=M (here RMRM is the RR-span of MM), and the \subseteq inclusion can be proved by writing an element of the left hand side as irimi\sum_i r_im_i, then taking the $$a$$th graded piece (which doesn't change the element) and observing that the sum collapses to i(ri)0miR0M=M\sum_i (r_i)_0 m_i\in R_0M=M.

Johan Commelin (May 04 2021 at 10:06):

There is finsupp.total or whatever it is called.

Johan Commelin (May 04 2021 at 10:07):

That's what you're supposed to use when you want to get your hands on a linear combination, I think.

Eric Wieser (May 04 2021 at 10:08):

Right, the lemma will almost certainly have docs#finsupp.total on the RHS

Eric Wieser (May 04 2021 at 10:09):

docs#finsupp.mem_span_iff_total ?

Kevin Buzzard (May 04 2021 at 10:09):

Aah wonderful, thanks! I was looking in the wrong namespace.

Eric Wieser (May 04 2021 at 10:11):

Perhaps if that's "the standard "formula" for the span known and loved by mathematicians" we should reference that lemma from the span docstring

Kevin Buzzard (May 04 2021 at 10:24):

I would reckon that in an undergraduate lecture introducing the span, the chances are that the definition given would be finite linear combinations. Certainly I remember in UG ring theory being told that the definition of the product of two ideals IJIJ was finite sums of elements ijij and spending some time thinking about it afterwards (convincing myself, for example, that the set {ij:iI,jJ}\{ij:i\in I, j\in J\} was not in general an ideal).

Anne Baanen (May 04 2021 at 10:28):

You have to squint a bit, but that definition corresponds to docs#finsupp.span_eq_map_total: finsupp.supported R R s is the set of all finite coefficients indexed by s, and finsupp.total turns a family of coefficients into a linear combination.

Scott Morrison (May 04 2021 at 10:29):

I've always found finsupp.total does not fit well in the existing linear algebra slots in my brain, and I struggle to understand any statement involving it. :-(

Scott Morrison (May 04 2021 at 10:29):

I guess I have to squint harder...

Anne Baanen (May 04 2021 at 10:30):

It's not (yet?) intuitive for me either :(

Mario Carneiro (May 04 2021 at 10:31):

The definition of linear combinations and linear independence used to be a lot more complicated. Once I understood finsupp.total and the free module it was a real eye opener, so many things are easier to state using it. It's like filters in topology

Anne Baanen (May 04 2021 at 10:32):

By the way, I am considering that we could redefine span as the set of all linear combinations. If we instantiate it early enough, the galois insertion with set should allow us to derive the complete lattice structure on submodules for free.

Mario Carneiro (May 04 2021 at 10:33):

Isn't span currently using the "easy" definition using the lattice structure already?

Anne Baanen (May 04 2021 at 10:34):

Yes

Anne Baanen (May 04 2021 at 10:34):

But we could also have the lattice structure derive from span

Mario Carneiro (May 04 2021 at 10:35):

how is it defined now?

Anne Baanen (May 04 2021 at 10:35):

first docs#submodule.has_inf and docs#submodule.has_Inf, then constructing all fields from those: https://github.com/leanprover-community/mathlib/blob/5a91d05e3b457aac6f656f8b02acb893f96341fa/src/algebra/module/submodule_lattice.lean#L106

Mario Carneiro (May 04 2021 at 10:35):

we probably want to retain the definitions for top, bot and inf since those are easy, but we can do without the others

Mario Carneiro (May 04 2021 at 10:36):

It looks like the general principle being used here is that a moore algebra aka closure system is a complete lattice

Anne Baanen (May 04 2021 at 10:37):

OTOH, deriving them from the galois insertion should give us a full API on how they combine with span

Mario Carneiro (May 04 2021 at 10:38):

I don't see linear combinations coming up in that definition at all though, so I don't think that a definition of span using linear combinations will make span + complete lattice structure easier on the whole

David Wärn (May 04 2021 at 10:38):

finsupp.total is 'just' one direction of HomR(RA,M)MA\textup{Hom}_R( R^{\oplus A}, M) \cong M^A right?

Anne Baanen (May 04 2021 at 10:39):

We had a thread a couple days ago about this topic, btw: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Closure.20operators

Kevin Buzzard (May 04 2021 at 10:49):

For what it's worth, I just seem to have spent 15 minutes changing my m \in submodule.span R [thing] to m \in submodule.span R (set.image thing thing) so I could rewrite with this lemma :-)

Eric Wieser (May 04 2021 at 11:03):

Just take the image by id ;)

Kevin Buzzard (May 04 2021 at 11:54):

If that's the right answer then I claim that that finsupp.span_eq_map_total is not correctly stated, or at least there should be another version where one doesn't have to do this? I didn't do this anyway, I was taking the span of something which could reasonably be re-interpreted as an image after some kerfuffle.

Eric Wieser (May 04 2021 at 12:20):

I think the docs#finsupp.mem_span_iff_total lemma should probably be called finsupp.mem_span_image_iff_total

Eric Wieser (May 04 2021 at 12:20):

And then we can take the original name for the version when v = id


Last updated: Dec 20 2023 at 11:08 UTC