Zulip Chat Archive
Stream: Is there code for X?
Topic: extending a finitely support function over a sigma?
Kim Morrison (Nov 21 2025 at 23:19):
Do we already have
import Mathlib
def Finsupp.embSigma {k : κ} (f : ι k →₀ R) : (Σ k, ι k) →₀ R :=
Finsupp.embDomain (Function.Embedding.sigmaMk k) f
somewhere, and hopefully its basic API?
Eric Wieser (Nov 22 2025 at 01:33):
I'd probably claim we don't need it, since the spelling is already pretty short:
import Mathlib
-- your example isn't a mwe without these
variable {κ} {ι : κ → Type*} [Zero R]
noncomputable def Finsupp.embSigma {k : κ} (f : ι k →₀ R) : (Σ k, ι k) →₀ R :=
f.embDomain <| .sigmaMk k
Eric Wieser (Nov 22 2025 at 01:33):
The argument that it's not needed is even more compelling if it's argued that your function should be called embDomainSigmaMk for clarity
Aaron Liu (Nov 22 2025 at 01:35):
Why do we need this? Does this combination come up a lot?
Kim Morrison (Nov 22 2025 at 02:25):
I'm using this in a proposed formalisation of abstract convex spaces, where it seems to work nicely.
Kim Morrison (Nov 22 2025 at 02:25):
I've made #31923 in the meantime.
Kim Morrison (Nov 22 2025 at 02:26):
I can try inlining the definition again there and see if it adds any pain.
Last updated: Dec 20 2025 at 21:32 UTC