Zulip Chat Archive

Stream: mathlib4

Topic: Prod, product, sprod


Yury G. Kudryashov (Sep 27 2024 at 16:21):

I suggest that we rename lemmas about _ ×ˢ _ to *_sprod_* (creating lots of deprecated aliases). Currently, lemmas for sets, subgroups etc use prod while lemmas for Finset use product to avoid conflict with Finset.prod.

Yaël Dillies (Sep 27 2024 at 16:22):

Maybe cartProd instead?

Yury G. Kudryashov (Sep 27 2024 at 16:23):

What does it stand for?

Yaël Dillies (Sep 27 2024 at 16:24):

"cartesian product"

Yury G. Kudryashov (Sep 27 2024 at 16:24):

Then we should rename docs#SProd too.

Yury G. Kudryashov (Sep 27 2024 at 16:25):

But Prod is a cartesian product too, so it doesn't help to disambiguate.

Yaël Dillies (Sep 27 2024 at 16:27):

Is there any need to disambiguate from docs#Prod ?

Eric Wieser (Sep 27 2024 at 22:33):

We could rename Finset.prod to Finset.iMul, with the reasoning sup : iSup :: mul : iMul

Eric Wieser (Sep 27 2024 at 22:35):

More seriously, it's tempting to let the things about Prod claim the prod name, and rename the nary multiplication, with product being the least controversial option I can think of

Yury G. Kudryashov (Sep 27 2024 at 22:36):

And what about docs#SProd ?

Eric Wieser (Sep 27 2024 at 22:36):

We have things like LinearMap.prod (as in Prod) to consider too

Yury G. Kudryashov (Sep 27 2024 at 22:37):

IMHO, we should rename lemmas/defs like docs#LinearMap.prod to prodMk

Yury G. Kudryashov (Sep 27 2024 at 22:38):

With prodMap docs#Prod.map being another contestant for the name prod here.

Eric Wieser (Sep 27 2024 at 22:39):

Whoops, prodMap is the one I meant to suggest

Yury G. Kudryashov (Sep 27 2024 at 22:40):

So, it's not clear from the which one docs#LinearMap.prod is, which is a good reason to rename it.

Eric Wieser (Sep 27 2024 at 22:40):

If you take the "sets are functions" view, then SProd and prodMap are really the same operation

Yury G. Kudryashov (Sep 27 2024 at 22:41):

Also, it would be nice to have a common API for these constructions but my attempt at creating a common data structure for *FunLike failed.

Yury G. Kudryashov (Sep 27 2024 at 23:27):

E.g., it would be nice to have a generic lemma in place of docs#Submonoid.gc_map_comap etc


Last updated: May 02 2025 at 03:31 UTC