Zulip Chat Archive
Stream: mathlib4
Topic: naming convention: bundled versions of functions
Yury G. Kudryashov (Oct 19 2024 at 05:09):
We have different ways to name bundled versions of unbundled functions. E.g., docs#RCLike.reCLM docs#PiLp.projₗ docs#DFinsupp.filterLinearMap docs#zpowGroupHom docs#Pi.monoidHom docs#Pi.evalMulHom docs#LinearMap.pi docs#LinearMap.snd
Yury G. Kudryashov (Oct 19 2024 at 05:09):
Also, AFAIR sometimes prod is used for fun x => (f x, g x) and sometimes for Prod.map f g.
Yury G. Kudryashov (Oct 19 2024 at 05:10):
Should we choose a naming scheme here and apply it everywhere?
Sébastien Gouëzel (Oct 19 2024 at 07:31):
Yes, I think it would be very good to have a coherent naming scheme for all of these.
Yury G. Kudryashov (Feb 17 2026 at 03:59):
Let me revive this old topic. We have, e.g., docs#Pi.monoidHom and docs#LinearMap.pi. Which naming convention should we use?
Yury G. Kudryashov (Feb 17 2026 at 04:11):
In this case, I would go with MyHom.pi for 2 reasons:
- it looks more like a constructor for
MyHomthan some function bundled asMyHom; IMHO, the same applies to bundled versions of simple functions likeProd.fst,Prod.map,Pi.map; - it enables the new-style dot notation.
P.S.: I've just found out that I'm responsible for the name pi.ring_hom introduced in !3#2133
Last updated: Feb 28 2026 at 14:05 UTC