Zulip Chat Archive
Stream: mathlib4
Topic: global notation for linear span of singleton
Aaron Liu (Jan 30 2026 at 17:21):
There is a global notation R ∙ x for Submodule.span R {x}. This was incredibly confusing to me looking on loogle and docgen for theorems I want because it resembles the a • b notation for HSMul.hSMul a b. Should this notation be scoped?
The notation is defined here in Mathlib.LinearAlgebra.Span.Defs. It has about 60 uses throughout mathlib. In contrast, span {_} has about 600 uses throughout mathlib.
Eric Wieser (Jan 30 2026 at 17:29):
Note there was previous discussion to make it use the same symbol as hSMul, but I assume that would have been even more confusing
Edward van de Meent (Jan 30 2026 at 18:49):
if it gets scoped, people looking at docgen won't be confused anymore :tear:
Edward van de Meent (Jan 30 2026 at 18:49):
not a bug, but a feature
Andrew Yang (Jan 31 2026 at 09:17):
I would vote to remove this notation.
Violeta Hernández (Jan 31 2026 at 09:20):
Not only does it resemble •, but it also resembles the notation (R · x) for partially applied functions. I also vote remove.
Snir Broshi (Jan 31 2026 at 12:52):
How about replacing it instead of removing? Perhaps adding a subscript s or sp for span?
Andrew Yang (Feb 01 2026 at 00:04):
I find the non-notation span R {x} already quite short and clear and closer to the paper maths than any notaton could be.
Yury G. Kudryashov (Feb 01 2026 at 00:06):
If we remove this notation, it would be nice to "deprecate" it first (make it issue a deprecation warning and don't generate a delaborator from it).
Eric Wieser (Feb 01 2026 at 05:32):
Violeta Hernández said:
Not only does it resemble •, but it also resembles the notation (R · x) for partially applied functions. I also vote remove.
Perhaps also worth mentioning that the span notation was invented before this function notation existed, and so this was not considered originally.
Eric Wieser (Feb 01 2026 at 05:33):
(by @Heather Macbeth in !3#5538, )
Patrick Massot (Feb 01 2026 at 13:38):
Andrew Yang said:
I find the non-notation
span R {x}already quite short and clear and closer to the paper maths than any notaton could be.
Have you already seen someone writing rather than ??
Patrick Massot (Feb 01 2026 at 13:39):
I’m not against scoping that notation of course, but I’m very puzzled by your assertion about paper maths here.
Michael Stoll (Feb 01 2026 at 13:39):
I usually write ...
Violeta Hernández (Feb 02 2026 at 04:49):
I've never seen anyone write ? I usually just write .
Violeta Hernández (Feb 02 2026 at 04:52):
I think it'd be nice to have notation ⟨a, b, c, ...⟩ that we could reuse for span-like objects, such as docs#Submodule.span or docs#Ideal.span or docs#Subgroup.closure. Not sure if that'd be feasible.
(using some other kind of angle brackets, since ⟨x⟩ already has a meaning in Lean)
Snir Broshi (Feb 02 2026 at 05:09):
Violeta Hernández said:
I've never seen anyone write ?
AFAIK is a pretty common notation for ZMod n, and the represents the span of n in . Though I guess that's rather than .
Also #new members > Stating the theorem that no ring isomorphism 2Z and 3Z is about the use of that notation in "Abstract Algebra by Dummit and Foote".
Violeta Hernández (Feb 02 2026 at 05:37):
Well, but that's rather than isn't it
Kevin Buzzard (Feb 02 2026 at 07:30):
is common in my neck of the woods
Johan Commelin (Feb 02 2026 at 08:03):
Violeta Hernández said:
I think it'd be nice to have notation ⟨a, b, c, ...⟩ that we could reuse for span-like objects, such as docs#Submodule.span or docs#Ideal.span or docs#Subgroup.closure. Not sure if that'd be feasible.
(using some other kind of angle brackets, since
⟨x⟩already has a meaning in Lean)
See also and the discussion below it.
Last updated: Feb 28 2026 at 14:05 UTC