Zulip Chat Archive
Stream: mathlib4
Topic: Naming Conventions for Predicates
Colin Jones ⚛️ (Jul 08 2024 at 01:39):
I am editing a pull request now that formalizes deficient, abundant, and weird numbers in Lean (#14269). My reviewer and I ran into an issue with the styling convention. Apparently, definitions like def Deficient should instead be written as def IsDeficient. However, Prime and Nat.Perfect do not follow this convention. Does anyone know what the right convention should be?
Yaël Dillies (Jul 08 2024 at 05:08):
See
Kevin Buzzard said:
When reviewing a PR adding things like abundant numbers I suggested they be called
IsAbundantbut then I realised that we hadPrimeandPerfect. I'd definitely be in favour of enforcing Is for Props, I think it makes for better understanding (for example it helps when trying to figure out how to make things like integral domains)
Kyle Miller (Jul 08 2024 at 06:03):
Clarification for myself: I think Yael is meaning to link to a thread with today's discussion about this, rather than saying that Kevin is saying what the convention is (that's still not exactly sorted out).
Kevin Buzzard (Jul 08 2024 at 08:53):
Yes there's at least one active discussion going on about this somewhere on this site (in a hurry and on mobile, sorry no link, but you can search for the quote above)
Yaël Dillies (Jul 08 2024 at 10:13):
Kyle is perfectly right. And in fact I agree more with Kyle than with Kevin in the aforementioned discussion.
Yaël Dillies (Jul 08 2024 at 10:13):
My internet connection is currently on and off, so don't expect my messages to always make sense
Last updated: May 02 2025 at 03:31 UTC