leanprover-community / leanprover-community/lean
invalid synthesis of `reflected` instances
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 434
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Checked that your issue isn't already filed.
- Specifically, check out the wishlist, open RFCs,
or feature requests.
- Specifically, check out the wishlist, open RFCs,
- Reduced the issue to a self-contained, reproducible test case.
- Checked that your issue isn't already filed.
Description
The following code:
meta example {α β : Type} (a : α) (γ : α → β → Type)
[reflected γ] [reflected a] : reflected (γ a) :=
by apply_instance
produces the error
type expected at
α
term has type
1
under the second α on the first line
Steps to Reproduce
- Make a blank file containing only the above
- Observe the error message
Expected behavior: Lean should construct an instance using `(γ).subst `(a)
Actual behavior: Lean spits out the nonsense error message above
Reproduces how often: Every time
Versions
Lean 3.43.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Create a blank Lean file containing the reproduction in the issue and run it under Lean 3.43.0 to confirm the reported error. Investigate instance synthesis for reflected γ and reflected a; done means the example constructs the expected reflected (γ a) instance using the stated substitution behavior without producing the type error.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100