-
Notifications
You must be signed in to change notification settings - Fork 459
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
feat: allow anonymous equality proofs in match
expressions
#6853
Conversation
Mathlib CI status (docs):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
|
||
theorem test_tactic (n : Nat) (h : n - 1 > 2) : n - 1 > 2 := by | ||
match _ : n - 1 with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work with ifs? Do they lower to match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure I understand, are you asking whether Lean supports something like if _ : some_decidable_prop then ... else ...
? If so, then yes, this was actually already supported; the purpose of this PR was to provide parity between match
and if
(see the example in #6759). Regarding whether if
elaborates to a match
: no, dependent if
expressions elaborate to an application of dite
, which is defined using the recursor for Decidable
directly.
This PR adds support for anonymous equality proofs in
match
expressions of the formmatch _ : e with ...
.Closes #6759.