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: long overdue delaborators #7633

Closed
wants to merge 4 commits into from

Conversation

PatrickMassot
Copy link
Member

This brings to Mathlib assorted delaborators written by @kmill for various projects including Mathematics in Lean. They mostly fix regressions compared to Lean 3.


Open in Gitpod

@PatrickMassot PatrickMassot added awaiting-review The author would like community review of the PR t-meta Tactics, attributes or user commands labels Oct 12, 2023
Note that this takes advantage of the fact that `(x : α) → p x` notation is
never used for propositions, so we can match on this result and rewrite it. -/
@[scoped delab forallE]
def delabPi : Delab := whenPPOption Lean.getPPNotation do
let stx ← delabForall
def delabPi' : Delab := whenPPOption Lean.getPPNotation do
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have two pi delaborators here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because some people actually like (x : α) → p x instead of Π (x : α), p x so the nice one is scoped.

@digama0
Copy link
Member

digama0 commented Oct 13, 2023

This looks good to me, modulo a plan to replace this code with something better eventually. There is no need to block on this now if people need these delaborators but I'm sure we can do better.

bors r+

@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 13, 2023
bors bot pushed a commit that referenced this pull request Oct 13, 2023
This brings to Mathlib assorted delaborators written by @kmill for various projects including Mathematics in Lean. They mostly fix regressions compared to Lean 3.



Co-authored-by: Mario Carneiro <mcarneir@andrew.cmu.edu>
@bors
Copy link

bors bot commented Oct 13, 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: long overdue delaborators [Merged by Bors] - feat: long overdue delaborators Oct 13, 2023
@bors bors bot closed this Oct 13, 2023
@bors bors bot deleted the pm_delab branch October 13, 2023 22:47
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

3 participants