From 39d438f9c2b3d1484ae0e2afe33a19c2f654a8b0 Mon Sep 17 00:00:00 2001 From: James Pollard Date: Sun, 14 Jun 2020 15:27:37 +0100 Subject: Move some standard tactics to Coquplib. --- src/common/Coquplib.v | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/common') 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). *) -- cgit