leanprover-community / leanprover-community/mathlib4

`rwa` yields a confusing error when `rw` solves the goal

Open
#5,073 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.