diff options
author | James Pollard <james@pollard.dev> | 2020-06-14 15:27:37 +0100 |
---|---|---|
committer | James Pollard <james@pollard.dev> | 2020-06-14 15:27:37 +0100 |
commit | 39d438f9c2b3d1484ae0e2afe33a19c2f654a8b0 (patch) | |
tree | 75456b06b2e60a8e00ab69b9acc262524769859e | |
parent | 21ae45cd03f7d38b1ef12270307274a9ee370e17 (diff) | |
download | vericert-kvx-39d438f9c2b3d1484ae0e2afe33a19c2f654a8b0.tar.gz vericert-kvx-39d438f9c2b3d1484ae0e2afe33a19c2f654a8b0.zip |
Move some standard tactics to Coquplib.
-rw-r--r-- | src/common/Coquplib.v | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/Coquplib.v b/src/common/Coquplib.v index 47360d6..fd0987b 100644 --- a/src/common/Coquplib.v +++ b/src/common/Coquplib.v @@ -41,6 +41,16 @@ Ltac solve_by_inverts n := Ltac solve_by_invert := solve_by_inverts 1. +Ltac invert x := inversion x; subst; clear x. + +Ltac clear_obvious := + repeat match goal with + | [ H : ex _ |- _ ] => invert H + | [ H : ?C _ = ?C _ |- _ ] => invert H + end. + +Ltac simplify := simpl in *; clear_obvious; simpl in *; try discriminate. + (* Definition const (A B : Type) (a : A) (b : B) : A := a. Definition compose (A B C : Type) (f : B -> C) (g : A -> B) (x : A) : C := f (g x). *) |