Zulip Chat Archive

Stream: new members

Topic: simp? message unhelpful in some case " Try this: simp only"


Nicolas Rolland (Nov 11 2023 at 10:52):

I am wondering why there is no indication in the second case below.
(I tried with 4.0 and 4.3.0-rc1 it seems the same)

import Mathlib

def MySet2 : Set  := {1,2}
example : 1  MySet2 := by
  rw [MySet2]
  simp?  -- Try this: simp only [Set.mem_singleton_iff, Set.mem_insert_iff]

example : 1  MySet2 := by
  rw [MySet2]
  rw [@Set.mem_insert_iff]
  simp? -- Try this: simp only

Ruben Van de Velde (Nov 11 2023 at 11:30):

Well, simp only seems to solve it?

Nicolas Rolland (Nov 11 2023 at 12:13):

Yes, but I imagined it would tell me by which lemma, just like in the other case.

isn't simp only [lemma, lemma'm ..] supposed to restrict simp. I imagine simp only without anything just does simp

https://leanprover-community.github.io/extras/simp.html

Patrick Massot (Nov 11 2023 at 14:29):

No, it does simp only with an empty list.

Eric Wieser (Nov 11 2023 at 16:34):

simp? (config := {decide := false}) gives you a list of lemmas

Eric Wieser (Nov 11 2023 at 16:34):

(this will be the default in the next lean release)

Mauricio Collares (Nov 11 2023 at 16:45):

This is probably clear from Eric's message, but just to be sure: simp only is not the same as simp, but in the current version of Lean both simp only and simp try to use decidability instances. Since decide closes your goal, so does simp only. simp (config := {decide := false}) only does not close your goal.


Last updated: Dec 20 2023 at 11:08 UTC