leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
4.75k stars 427 forks source link

`simp?` does not work in `conv` mode #6164

Open MichaelStollBayreuth opened 1 week ago

MichaelStollBayreuth commented 1 week ago

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

Trying to use simp? in conv mode gives an error "unexpected identifier; expected command".

Context

simp and simp only are valid tactics in conv mode. So it would be natural if simp? would also work (and allow to replace simp calls by simp only calls for efficiency).

See the discussion on Zulip.

Steps to Reproduce

MWE:

example (n : Nat) : 123 + 2 * n = 123 + (n + n) := by
  conv =>
    enter [1, 2]
    simp? -- error

Expected behavior:

simp? should work in conv mode in the same way as it does normally.

Actual behavior:

simp? in conv mode results in an error.

Versions

Lean 4.15.0-nightly-2024-11-21 Target: x86_64-unknown-linux-gnu

Impact

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

kim-em commented 1 week ago

I think this would not be too hard to implement. If anyone would like to submit a PR we would surely review it!