leanprover-community / leanprover-community/mathlib4
`rwa` yields a confusing error when `rw` solves the goal
Open
Nobody has claimed this yet.
lean4-change-in-behaviour
- Dominant language
- Lean
- Stars
- 4.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
example (a b : Nat) (h : a = b) : a + 1 = b + 1 := by
rwa [h]
This errors with no goals to be solved and a red squiggly under rwa [h]
mathlib3 did not error here.
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
Reproduce the provided Lean 4 example, then inspect the behavior of rwa alongside rw to locate why a solved goal is reported as an error. Done means the example succeeds without the no goals to be solved diagnostic while preserving the expected rewrite behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100