Debian Codegraph @

src/Util/Tactics/Revert.v

raw
1 (** Like [Coq.Program.Tactics.revert_last], but only for non-dependent hypotheses *)
2 Ltac revert_last_nondep :=
3 match goal with
4 | [ H : _ |- _ ]
5 => lazymatch goal with
6 | [ H' : context[H] |- _ ] => fail
7 | [ |- context[H] ] => fail
8 | _ => idtac
9 end;
10 revert H
11 end.
12
13 Ltac reverse_nondep := repeat revert_last_nondep.