Zulip Chat Archive

Stream: mathlib4

Topic: image_convexHull vs convexHull_image


Michael Rothgang (Mar 11 2024 at 15:38):

mathlib 's naming is inconsistent: it's docs#LinearMap.convexHull_image, but docs#AffineMap.image_convexHull. Is there any reason why these should be different? Which direction should be preferred?

Michael Rothgang (Mar 11 2024 at 15:41):

I've filed #11298, adapting the AffineMap lemma to the LinearMap version, but I'll be happy to change things the other way.

Patrick Massot (Mar 11 2024 at 15:41):

It’s not a naming issue. Both names are correct. The issue that those lemmas have different opinions about sides.

Michael Rothgang (Mar 11 2024 at 15:41):

Yes, I know!

Michael Rothgang (Mar 11 2024 at 15:41):

The question is, is there a good reason the lemmas have different sides? Or should one flip one of them to match the other?

Patrick Massot (Mar 11 2024 at 15:42):

And clearly this has to be fixed.

Patrick Massot (Mar 11 2024 at 15:42):

I’m sure this is an accident.

Patrick Massot (Mar 11 2024 at 15:42):

You can wait a bit to see whether someone has strong opinion but I guess picking one at random is fine.

Yaël Dillies (Mar 11 2024 at 20:28):

Yes, I have a strong opinion and in fact meant to fix it and forgot several months ago.

Yaël Dillies (Mar 11 2024 at 20:28):

It should be f '' convexHull _ _ = convexHull _ (f '' s), the same way we have docs#map_add

Michael Rothgang (Mar 11 2024 at 22:08):

Thank you for the input. I have now flipped both lemmas to match this convention.
The diff includes two lemmas, for which I'm wondering if they should be flipped as well.

Yaël Dillies (Mar 11 2024 at 22:56):

Might as well

Michael Rothgang (Mar 12 2024 at 07:47):

Sure, done.

Yaël Dillies (Mar 12 2024 at 09:05):

CI is not green. I will maintainer merge the PR when it is.

Michael Rothgang (Mar 12 2024 at 09:50):

CI is green now.


Last updated: May 02 2025 at 03:31 UTC