leanprover / leanprover/lean4

`simp [...]` with a left arrow (`←`) on a simproc should error

Open Beginner friendly
#15,197 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Prerequisites
Description

The syntax of simp [...] allows prefixing an identifier with , but this doesn't affect simprocs and is silently ignored.

Steps to Reproduce
example : True := by
  simp [← seval]

example : 3 ∣ 9 := by
  simp [← Nat.reduceDvd]

Expected behavior: Log an error message " cannot be used on simprocs" or similar.

Actual behavior: No error messages are logged.

Versions
Lean 4.36.0-nightly-2026-09-16
Target: x86_64-unknown-linux-gnu Linux
Additional Information

I think this is the relevant code, where there's a boolean inv of whether a left arrow was specified, and then there's a match on the type of the argument, and inv is ignored in the case of simprocs.
It is also ignored for ext, so presumably simp sets have the same issue.

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 in src/Lean/Elab/Tactic/Simp.lean around lines 358-370, where the inv flag is matched against the argument type. Reproduce the examples with simp [← seval] and simp [← Nat.reduceDvd]. Done means a clear error such as "← cannot be used on simprocs" is reported instead of silently ignoring the arrow.

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
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.