leanprover-community / leanprover-community/lean

Repeat tactic does not terminate instead of giving an error or functioning as it should.

Open
#584 1 comment 0 reactions 0 assignees View on GitHub

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.
    • Reduced the issue to a self-contained, reproducible test case.
Description

Repeat tactic does not terminate instead of giving an error or functioning as it should.

Steps to Reproduce

theorem add_left_cancel (t a b : nat) : t + a = t + b → a = b :=
begin
  intro h,
  repeat {rw nat.add_comm at h},
end

Expected behavior:

Either give out an error or change the goals to


1 goal
tab: ℕ
h: a + t = b + t
⊢ a = b

Actual behavior:
Does not terminate and the Infoview shows

Loading...

Reproduces how often:
All the time.

Versions

Lean (version 3.30.0, commit a5822ea47ebc, Release)
Windows 10 Home Edition

Additional Information

None.

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

Start by reproducing the theorem with repeat {rw nat.add_comm at h} in Lean 3.30.0 and observe the Infoview's nontermination. The payload names no source file or test path; done means the tactic either reports an error or reaches the expected single goal instead of remaining on “Loading...”.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.