Zulip Chat Archive

Stream: lean4

Topic: simp behaviour


Jakob von Raumer (May 05 2021 at 11:06):

When the goal depends on a hypothesis which we simplify, the old unsimplified version stays in the context and the goal still depends on the old version. Is that the desired behaviour?

inductive W : Nat  Prop where
| mk1 : W 5

example (w : W (5, 3).1) (β : {n : Nat}  W n  Type) : β w := by
  simp at w

Mario Carneiro (May 05 2021 at 11:08):

lean 3 does the same thing. This is unavoidable, given the way that simp works. dsimp should avoid this behavior

Jakob von Raumer (May 05 2021 at 11:11):

We don't have dsimp yet, do we?

Mario Carneiro (May 05 2021 at 11:11):

ah, well then

Mario Carneiro (May 05 2021 at 11:13):

a simple version of dsimp would be to call simp, then throw away the proof and change the hypothesis using revert/intro

Jakob von Raumer (May 05 2021 at 11:14):

We don't have change yet, either ^^

Mario Carneiro (May 05 2021 at 11:14):

it's called show now

Jakob von Raumer (May 05 2021 at 11:15):

Yes, and the Meta backend of it is trivial anyway

Mario Carneiro (May 05 2021 at 11:25):

Hi lean devs, can you make mkSimpContext, elabSimpLemmas, addSimpLemma, addDeclToUnfoldOrLemma in Lean.Elab.Tactic.Simp not private?


Last updated: Dec 20 2023 at 11:08 UTC