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

[Merged by Bors] - feat: have notation3 use elaborator when generating matchers, add support for pi/lambda #6833

Closed
wants to merge 20 commits into from

Conversation

kmill
Copy link
Contributor

@kmill kmill commented Aug 28, 2023

notation3 was generating matchers directly from syntax, which included a half-baked implementation of a term elaborator. This switches to elaborating the term and then generating matchers from the elaborated term. This

  1. is more robust and consistent, since it uses the main elaborator and one can make use of other notations
  2. has the nice side effect of adding term info to expansions in the notation3 command
  3. can unfortunately generate matchers that are more restrictive than before since they also match against elaborated features such as implicit arguments.

We now also generate matchers for expansions that have pi types and lambda expressions.


Open in Gitpod

@kmill kmill added the awaiting-review The author would like community review of the PR label Aug 28, 2023
@kmill kmill requested a review from digama0 August 28, 2023 17:41
@kmill kmill added the t-meta Tactics, attributes or user commands label Aug 28, 2023
@kmill
Copy link
Contributor Author

kmill commented Aug 28, 2023

@digama0 Here's something you'd suggested during the review of the first implementation of the notation3 delaborator. I've spot-checked that notation3 notation still works with this, though there's one case involving Funlike.coe that generates a too-restrictive matcher (I've left a TODO).

Mathlib/Mathport/Notation.lean Outdated Show resolved Hide resolved
@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:26
@semorrison semorrison changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:11
Mathlib/Mathport/Notation.lean Outdated Show resolved Hide resolved
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Oct 4, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Oct 22, 2023
@PatrickMassot
Copy link
Member

Thanks a lot for all your work on this!
bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Oct 26, 2023
bors bot pushed a commit that referenced this pull request Oct 26, 2023
…upport for pi/lambda (#6833)

`notation3` was generating matchers directly from syntax, which included a half-baked implementation of a term elaborator. This switches to elaborating the term and then generating matchers from the elaborated term. This
1. is more robust and consistent, since it uses the main elaborator and one can make use of other notations
2. has the nice side effect of adding term info to expansions in the `notation3` command
3. can unfortunately generate matchers that are more restrictive than before since they also match against elaborated features such as implicit arguments.

We now also generate matchers for expansions that have pi types and lambda expressions.
@bors
Copy link

bors bot commented Oct 26, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: have notation3 use elaborator when generating matchers, add support for pi/lambda [Merged by Bors] - feat: have notation3 use elaborator when generating matchers, add support for pi/lambda Oct 26, 2023
@bors bors bot closed this Oct 26, 2023
@bors bors bot deleted the kmill_notation3_better_elab branch October 26, 2023 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants