fix: respect type reducibility when generating injectivity lemmas#2276
fix: respect type reducibility when generating injectivity lemmas#2276eric-wieser wants to merge 4 commits intoleanprover:masterfrom
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. |
| 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.
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.