Zulip Chat Archive

Stream: mathlib4

Topic: simp? failure


Sebastien Gouezel (Sep 15 2023 at 05:56):

simp? fails to take into account reverse directions:

import Mathlib.Data.Nat.Basic

def foo :    := sorry
theorem foo_eq_iff (z : ) : z = 17  foo z = 3 := sorry

theorem fail (z : ) (h : z = 17) : foo z = 3 := by
  simp? [ foo_eq_iff]
  exact h

The simp? works fine, but the suggestion is to use simp only [foo_eq_iff].

Sebastien Gouezel (Sep 15 2023 at 09:17):

Issue registered at https://github.com/leanprover-community/mathlib4/issues/7182

Alex J. Best (Sep 15 2023 at 13:24):

simp? is defined in Std so really this should best be reported there as

import Std
def foo : Nat  Nat := sorry
theorem foo_eq_iff (z : Nat) : z = 17  foo z = 3 := sorry
theorem fail (z : Nat) (h : z = 17) : foo z = 3 := by
  simp? [ foo_eq_iff]
  exact h

Sebastien Gouezel (Sep 15 2023 at 13:26):

Ah, I hadn't noticed it was in std. Let me port the issue there. Thanks!


Last updated: Dec 20 2023 at 11:08 UTC