aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMichalis Pardalos <m.pardalos@gmail.com>2021-05-10 17:25:02 +0100
committerMichalis Pardalos <m.pardalos@gmail.com>2021-05-10 17:25:02 +0100
commit8503a79715fb2d3766bc2cd6e102481f9fec61cd (patch)
tree2974e1307e30b9cac56b7697742b2538b2212094 /src/common
parent12a8b9d3cf31b35dcaff13b9e7c2d38fbf432403 (diff)
downloadvericert-8503a79715fb2d3766bc2cd6e102481f9fec61cd.tar.gz
vericert-8503a79715fb2d3766bc2cd6e102481f9fec61cd.zip
Get entire HTLgenspec proof passing
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Vericertlib.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/Vericertlib.v b/src/common/Vericertlib.v
index ef4a10b..33ddb71 100644
--- a/src/common/Vericertlib.v
+++ b/src/common/Vericertlib.v
@@ -84,6 +84,16 @@ Ltac solve_by_invert := solve_by_inverts 1.
Ltac invert x := inversion x; subst; clear x.
+(** For a hypothesis of a forall-type, instantiate every variable to a fresh existential *)
+Ltac insterU H :=
+ repeat match type of H with
+ | forall x : ?T, _ =>
+ let x := fresh "x" in
+ evar (x : T);
+ let x' := eval unfold x in x in
+ clear x; specialize (H x')
+ end.
+
Ltac destruct_match :=
match goal with
| [ |- context[match ?x with | _ => _ end ] ] => destruct x eqn:?