-
Notifications
You must be signed in to change notification settings - Fork 444
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
fix: make elabAsElim
aware of explicit motive arguments
#4817
Conversation
Just based off the PR description: did you consider the alternative of making all motives implicit? Or is there a good reason to make them explicit it some cases? |
Mathlib CI status (docs):
|
@nomeata Yes, and that's a good question that's worth discussing here. First, there's Leo's comment about how eliminators like |
Thanks, these are good points. Ah, and I should have followed the link to the issue to find it out myself :-) |
Some eliminators (such as `False.rec`) have an explicit motive argument. The `elabAsElim` elaborator assumed that all motives are implicit. Closes leanprover#4347
3d2d63d
to
5415c61
Compare
Some eliminators (such as
False.rec
) have an explicit motive argument. TheelabAsElim
elaborator assumed that all motives are implicit.If the explicit motive argument is
_
, then it uses the elab-as-elim procedure, and otherwise it falls back to the standard app elaborator.Furthermore, if an explicit elaborator is not provided, it falls back to treating the elaborator as being implicit, which is convenient for writing
h.rec
rather thanh.rec _
. Rationale: forFalse.rec
, this simulates it having an implicit motive, and also motives are generally not going to be available in the expected type.Closes #4347