leanprover / leanprover/lean4

`simp_all` makes further progress on second invocation

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

Nobody has claimed this yet.

bug P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Description

Sometimes simp_all makes further progress on a second invocation.

Context

I encountered this while doing simp lemma confluence testing with @nomeata's tool.

Steps to Reproduce
open List

@[simp] theorem range'_head (n : Nat) (h) : (range' s n).head h = s := by
  sorry

example (s n : Nat) (h : range' s n ≠ []) : s ≤ (List.range' s n).head h ∧ (List.range' s n).head h < s + n := by
  simp_all
  simp_all
  omega

Expected behavior:

The first simp_all should already have done what the second simp_all goes on to do, so the second simp_all should error.

Actual behavior:

Proof succeeds, making progress at both simp_alls

Versions

v4.11.0-rc2, and nightly-2024-08-19

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

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 running the provided simp_all reproduction on the reported Lean versions and compare the first and second invocations. Done means the first invocation makes all available progress so the second simp_all reports no further progress, while the proof's final omega step remains appropriate.

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
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.