Zulip Chat Archive

Stream: mathlib4

Topic: map_nonneg


Yury G. Kudryashov (Feb 13 2024 at 02:42):

We have docs#map_nonneg (about docs#OrderAddMonoidHomClass) and docs#NonnegHomClass.map_nonneg (exported to the root namespace). #10472 changes imports so that both are available in many files. Which one should stay in the root namespace?

Yaël Dillies (Feb 13 2024 at 07:32):

One of them could be map_nonneg while the other one could be apply_nonneg?

Yury G. Kudryashov (Feb 13 2024 at 07:46):

One can be map_nonneg, another can be map_nonneg_of_nonneg...

Yaël Dillies (Feb 13 2024 at 07:47):

What I mean is that one of them "maps" the nonnegativity assumption, the other one creates it.

Yury G. Kudryashov (Feb 13 2024 at 15:17):

So, should I rename NonnegHomClass.map_nonneg to apply_nonneg and mention it in the map_nonneg docstring?

Yaël Dillies (Feb 13 2024 at 15:19):

Sounds good

Yury G. Kudryashov (Feb 13 2024 at 18:04):

#10507


Last updated: May 02 2025 at 03:31 UTC