-
Notifications
You must be signed in to change notification settings - Fork 455
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: respect type reducibility when generating injectivity lemmas #2276
base: master
Are you sure you want to change the base?
Conversation
The CI failure seems to be a simple matter of reordered messages; do we agree on the general change? |
I don't look at PRs until it is green. We should make it clear to all PR submitters that this is a requirement.
The change is not properly motivated. A link to another thread is not an acceptable. We should also make it clear on the contribution guidelines that a clear and short motivation for unsolicited PRs is a requirement. |
@@ -101,6 +101,7 @@ static optional<environment> mk_no_confusion_type(environment const & env, name | |||
expr rhs_type = lctx.get_type(rhs); | |||
level l = sort_level(type_checker(env, lctx).ensure_type(lhs_type)); | |||
expr h_type; | |||
// TODO: this should respect reducibility |
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.
In lean 3, this was possible with type_context_old ctx(env, transparency_mode::Reducible);
; but type_context_old
no longer exists.
I think the issue here is that mk_no_confusion_type
is using the kernel, when it should be using the elaborator; but fixing that is a large refactor.
The relevant test case is:
The diff due to this PR is intended to be
This forward-ports leanprover-community/lean#812.
For now, I am just creating this to see if it passes CI, since CI appears not to run on my branch in a fork.