Skip to content

feat: document the function application naming convention#886

Open
YaelDillies wants to merge 4 commits into
leanprover-community:lean4from
YaelDillies:map_apply
Open

feat: document the function application naming convention#886
YaelDillies wants to merge 4 commits into
leanprover-community:lean4from
YaelDillies:map_apply

Conversation

@YaelDillies

Copy link
Copy Markdown
Contributor

No description provided.

@b-mehta b-mehta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with the spirit of this convention, but I think the current phrasing is not very clear.

Comment thread templates/contribute/naming.md Outdated
Comment on lines +569 to +572
3. The application is denoted by the `map_` prefix when `f` is a free variable
or the coercion to function thereof, and `x` is a concrete argument.
Most lemmas of this form are about properties of a generic morphism.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your change is an improvement, but I think it's still a little ambiguous whether or not a + b is concrete or not... I wonder if it's easier to explain in terms of what's named. In all your examples, concrete and "is part of the name" coincide exactly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I am not sure. Beginners sometimes name their lemmas after free variables, no?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fair point, but I still think your phrasing doesn't sufficiently explain what happens to a + b

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've attempted something. I personally find it more confusing now, but you might disagree

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also note that I show below * as an example of a concrete function, so maybe there was no need to clarify in the first place?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually that was the reason it confused me, from your description I didn't think you intended it to be a concrete function, but your example included it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Aha ok 😆 I hope now the phrasing is clear enough?

Comment thread templates/contribute/naming.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants