Vector.zipWith_comm: implicit function parameter
Open
Nobody has claimed this yet.
P-medium
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
In Lean-4.19 the function parameter f of Vector.zipWith_comm became implicit.
Now, I can no longer simply write
simp only [Vector.zipWith_comm g]
If I write
simp only [Vector.zipWith_comm]
instead, I run into an infinite loop, of course.
I know I can I write
simp only [@zipWith_comm (f := g)]
but it is cumbersome.
If the function parameter would be explicit I could still omit it in rewriting, e.g.
rw [zipWith_comm]
Thus I do not know what the implicitness of f actually buys us.
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
Start at the Vector.zipWith_comm declaration and reproduce the two simp examples in Lean 4.19. Compare the parameter's explicitness with the intended rewriting behavior, then verify that the preferred simp or rw form works without causing a loop.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100