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

Alternative dot notation #10728

Closed
YaelDillies opened this issue Dec 11, 2021 · 1 comment
Closed

Alternative dot notation #10728

YaelDillies opened this issue Dec 11, 2021 · 1 comment
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI

Comments

@YaelDillies
Copy link
Collaborator

Use of dot notation (aka projection) is currently restricted on two aspects:

  • It resolves linearly by unfolding definitions.
  • We can't use it on built-ins.

One way to solve both problems would be to introduce a command dot_alias which would declare aliases dot notation can resolve to.

For example, dot_alias function := a → b (syntax to be determined), means that h.comp could resolve to function.comp h where h : a → b. And similarly, we could add the aliases pi and imp for Π i, α i.

Note: I'm not sure whether this belongs here or in the Lean repo.

@YaelDillies YaelDillies added the feature-request This issue is a feature request, either for mathematics, tactics, or CI label Dec 11, 2021
@kmill
Copy link
Collaborator

kmill commented Aug 25, 2023

leanprover-community/lean#757 gave the ability to do h.comp using the function namespace.

We can't change how dot notation works from within mathlib, and I don't think we'll see any more development on dot notation for Lean 3, so I'll go ahead and close this.

@kmill kmill closed this as completed Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI
Projects
None yet
Development

No branches or pull requests

2 participants