Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention that some fields are currently lowercase, not following the current conventions #440

Merged
merged 13 commits into from May 17, 2024

Conversation

faenuccio
Copy link
Contributor

@faenuccio faenuccio commented Feb 5, 2024

Modify the instructions in the naming convention file about LT vs lt and add a new example.

Add a sentence requiring to fork before creating a PR in the readme.md file

@@ -50,6 +50,10 @@ class HPow (α : Type u) (β : Type v) (γ : Type w) where
class LT (α : Type u) where
lt : α → α → Prop -- follows rule 4 and 6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to remove this example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, as I have amended rule 6.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@faenuccio
Copy link
Contributor Author

@fpvandoorn It seems to me this PR got somewhat stuck...

@YaelDillies
Copy link
Contributor

Could you split off the forking instructions to another PR and rename this one to something more evocative?

@faenuccio
Copy link
Contributor Author

Could you split off the forking instructions to another PR and rename this one to something more evocative?

Sure (although I am boarding a plane now and it won't be immediate). Can you just tell me if the forking instructions are OK or if they would at any rate be ignored "because they're so trivial" (something I often hear, but I would argue that a superfluous instruction makes no harm to those who know and can help those who don't)?

@faenuccio faenuccio changed the title Add instruction to fork Add more exceptions to the naming rules to adhere with the current conventions Apr 27, 2024
@faenuccio
Copy link
Contributor Author

Done (and opened #471 )

@fpvandoorn
Copy link
Member

fpvandoorn commented Apr 30, 2024

I think the issue here is that you're documenting exceptions as the rule.
The goal is to have propositions UpperCamelCased, with very few exceptions.
E.g. leanprover/lean4#1897 shows that we want to get rid of some of the exceptions, but just haven't gotten around to it yet.
The naming file is prescriptive, not descriptive. So even though currently we might not capitalize all propositional fields, we want to do that more. So I don't think we want to make a rule in the naming conventions that we lowercase certain fields.
Moreover, many fields that are propositions are capitalized: TopologicalSpace.IsOpen for example.

@faenuccio
Copy link
Contributor Author

I think the issue here is that you're documenting exceptions as the rule. The goal is to have propositions UpperCamelCased, with very few exceptions. E.g. leanprover/lean4#1897 shows that we want to get rid of some of the exceptions, but just haven't gotten around to it yet. The naming file is prescriptive, not descriptive. So even though currently we might not capitalize all propositional fields, we want to do that more. So I don't think we want to make a rule in the naming conventions that we lowercase certain fields. Moreover, many fields that are propositions are capitalized: TopologicalSpace.IsOpen for example.

I see your point, and agree. Yet I find it a bit frustrating (and I'm not alone, in view of recent LFTCM experience) that the library is full of exceptions. Would you agree if I modify my text explicitly mentioning that there are exception to the rule(s), but that these will hopefully eventually disappear and users should adhere to the rules rather than trying to mimic what they find in the library?

@fpvandoorn
Copy link
Member

Yes, I'm happy if you state the existence of exceptions.
My preference is that we remove the class LT example, since that itself is an exception.
If we keep it, we should explicitly write that this is an exception to the rule.

Aside: I haven't noticed the "uncapitalize projection fields" as a big naming issue myself. All lemmas are still correctly named, since a declaration CamelCase becomes camelCase when it is part of a lemma name.

And btw, please add more "trivial" steps to our Git instructions on the website. They are very hard for mathematicians to follow! Please incorporate the instructions from the Git tutorial at LFTCM that I gave into the website!

@faenuccio
Copy link
Contributor Author

I have added the LT exception and will add more GIT instructions as they come to mind. One thing that I would like to discuss (but completely outside this PR) is the confusion between the Lean and the Math community in the website: it is called "Lean Community" but basically only speaks about Mathlib. For instance, the GitHub link on the left points to mathlib (hence I would, a minima suggest that it becomes Mathlib repository or something).

faenuccio and others added 2 commits May 17, 2024 11:48
Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
Copy link
Member

@fpvandoorn fpvandoorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 wrongly spaced things (I'll fix them myself), otherwise, this looks good to me.

templates/contribute/naming.md Outdated Show resolved Hide resolved
templates/contribute/naming.md Outdated Show resolved Hide resolved
@fpvandoorn fpvandoorn changed the title Add more exceptions to the naming rules to adhere with the current conventions Mention that some fields are currently lowercase, not following the current conventions May 17, 2024
@fpvandoorn fpvandoorn merged commit 640c1e8 into leanprover-community:lean4 May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants