Stream: Coq users

Topic: in apply, discharge non-unifiable terms through equalities?


view this post on Zulip Jonas Oberhauser (Jul 30 2020 at 12:22):

Is there a variant of apply which can discharge non-unifiable terms through equalities? E.g.,

old state:
x, z : nat ; H : forall y, P x 5 y |- P z 5 z
awesome_apply H.
new state:
x, z : nat ; H : P x |- x = z

view this post on Zulip Simon Hudon (Jul 30 2020 at 18:36):

I haven't seen it in Coq but I've written a similar one in Lean. I can help you write awesome_apply. By the way, great naming there :)

view this post on Zulip Enrico Tassi (Jul 30 2020 at 21:11):

SSReflect's congr tactic does something like this

view this post on Zulip Jean-Christophe L├ęchenet (Aug 03 2020 at 12:27):

The file LibTactics.v distributed in Software Foundations defines a tactic called applys_eq that does this kind of thing, but you must manually specify the variables that should give an equation. In your case, this would give applys_eq H 1 3 (the variables are counted from the right).


Last updated: Jan 27 2023 at 02:04 UTC