Zulip Chat Archive
Stream: Is there code for X?
Topic: Is there One version Finsupp
hilbert (May 23 2025 at 03:16):
docs#Finsupp and docs#DFinsupp define for type class Zero. Is there a One version Finsupp?
Weiyi Wang (May 23 2025 at 04:13):
I literally had the exact same question just now. It seems there is none. There is even Finsupp.prod that still uses 0 as indicator even though it is a multiplicative concept
Yaël Dillies (May 23 2025 at 05:06):
No there isn't but there have been talks about generalising finsupps to an arbitrary element, eg @Sky Wilshaw needed this at some point
Yaël Dillies (May 23 2025 at 05:09):
IMO it's currently difficult to refactor things satisfactorily because DFinsupp isn't currently a special case, meaning that either you align the new FinsuppI/DFinsuppI on Finsupp/DFinsupp and duplicate yet again a huge amount of API, or you define FinsuppI in terms of DFinsuppI and now you need to decide whether to stick to the Finsupp or DFinsupp design
Yaël Dillies (May 23 2025 at 05:10):
I've been putting off making a decision here, so instead I've worked on making sure that the files that could become files about FinsuppI do not contain any arithmetic. See most recently #25002
Yaël Dillies (May 23 2025 at 05:10):
cc @Eric Wieser since you're probably tied with me for the prize of "most bothered by the current statu quo"
Jz Pan (May 23 2025 at 05:15):
Does Finsupp α (Additive M) help? It is cumbersome, though.
hilbert (May 23 2025 at 05:59):
Jz Pan said:
Does
Finsupp α (Additive M)help? It is cumbersome, though.
It's very inconvinient since I actually want a Multiplication version of docs#DirectSum .
Eric Wieser (May 23 2025 at 13:51):
How bad would it be to do everything with addition instead?
Last updated: Dec 20 2025 at 21:32 UTC