Zulip Chat Archive
Stream: new members
Topic: Tactic to deconstruct monadic syntax
McCoy R. Becker (Dec 28 2023 at 19:54):
I'm working on a proof, and I have a hypothesis of the form:
h_eval : (do
let t_eval ← none
pure (Term.Abs t_eval)) =
some t'
I'd like to collapse this to show a contradiction, but I'm not quite sure what to apply here. I tried simp at h_eval
, but that made no progress.
McCoy R. Becker (Dec 28 2023 at 23:33):
Related -- is there an easy way to apply cases
to syntax of this form (for e.g. t1_eval
):
h_eval : (do
let t1_eval ← eval n✝ [] a✝¹
let t2_eval ← eval n✝ [] a✝
eval n✝ [] (Term.App t1_eval t2_eval)) =
some t'
Mario Carneiro (Dec 28 2023 at 23:38):
There is a simp lemma for this but it is hidden by bind
. Try simp [bind]
McCoy R. Becker (Dec 28 2023 at 23:39):
No progress, unfortunately
Mario Carneiro (Dec 28 2023 at 23:39):
import Std
?
McCoy R. Becker (Dec 28 2023 at 23:39):
ah, sorry -- simp [bind] at h_eval
Mario Carneiro (Dec 28 2023 at 23:39):
McCoy R. Becker (Dec 28 2023 at 23:40):
I think I got it by applying simp [bind]
to the hypothesis.
McCoy R. Becker (Dec 28 2023 at 23:41):
thanks for the MWE tip! I'll play around with the web editor later so I can be more helpful when asking Qs
Last updated: May 02 2025 at 03:31 UTC