diff options
author | 2008-01-05 19:10:06 +0000 | |
---|---|---|
committer | 2008-01-05 19:10:06 +0000 | |
commit | a8d50dd372fc9365d3f6f21551567f05937d93ef (patch) | |
tree | e4b4a93cf6ed3ed7f873c1bdb469207db90cd97a /theories/Classes/SetoidTactics.v | |
parent | bd9dc4089bdf76437a358d8c1a282f67558905be (diff) |
Fix a naming bug reported by Arnaud Spiwack, allow instance search to create evars and try to solve them too.
Finally, rework tactics on setoids and design a saturating tactic to help solve goals on any setoid.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10428 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes/SetoidTactics.v')
-rw-r--r-- | theories/Classes/SetoidTactics.v | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/theories/Classes/SetoidTactics.v b/theories/Classes/SetoidTactics.v index 4832f1d72..7be514169 100644 --- a/theories/Classes/SetoidTactics.v +++ b/theories/Classes/SetoidTactics.v @@ -35,3 +35,31 @@ Ltac setoideq := [ |- @eq ?A ?X ?Y ] => apply (setoideq_eq (a:=A) X Y) end. +Ltac setoid_tactic := + match goal with + | [ H : ?eq ?x ?y |- ?eq ?y ?x ] => sym ; apply H + | [ |- ?eq ?x ?x ] => refl + | [ H : ?eq ?x ?y, H' : ?eq ?y ?z |- ?eq' ?x ?z ] => trans y ; [ apply H | apply H' ] + | [ H : ?eq ?x ?y, H' : ?eq ?z ?y |- ?eq' ?x ?z ] => trans y ; [ apply H | sym ; apply H' ] + | [ H : ?eq ?y ?x, H' : ?eq ?z ?y |- ?eq' ?x ?z ] => trans y ; [ sym ; apply H | sym ; apply H' ] + | [ H : ?eq ?y ?x, H' : ?eq ?y ?z |- ?eq' ?x ?z ] => trans y ; [ sym ; apply H | apply H' ] + + | [ H : ?eq ?x ?y |- @equiv _ _ _ ?y ?x ] => sym ; apply H + | [ |- @equiv _ _ _ ?x ?x ] => refl + | [ H : ?eq ?x ?y, H' : ?eq ?y ?z |- @equiv _ _ _ ?x ?z ] => trans y ; [ apply H | apply H' ] + | [ H : ?eq ?x ?y, H' : ?eq ?z ?y |- @equiv _ _ _ ?x ?z ] => trans y ; [ apply H | sym ; apply H' ] + | [ H : ?eq ?y ?x, H' : ?eq ?z ?y |- @equiv _ _ _ ?x ?z ] => trans y ; [ sym ; apply H | sym ; apply H' ] + | [ H : ?eq ?y ?x, H' : ?eq ?y ?z |- @equiv _ _ _ ?x ?z ] => trans y ; [ sym ; apply H | apply H' ] + + | [ H : @equiv ?A ?R ?s ?x ?y |- @equiv _ _ _ ?y ?x ] => sym ; apply H + | [ |- @equiv _ _ _ ?x ?x ] => refl + | [ H : @equiv ?A ?R ?s ?x ?y, H' : @equiv ?A ?R ?s ?y ?z |- @equiv _ _ _ ?x ?z ] => trans y ; [ apply H | apply H' ] + | [ H : @equiv ?A ?R ?s ?x ?y, H' : @equiv ?A ?R ?s ?z ?y |- @equiv _ _ _ ?x ?z ] => trans y ; [ apply H | sym ; apply H' ] + | [ H : @equiv ?A ?R ?s ?y ?x, H' : @equiv ?A ?R ?s ?z ?y |- @equiv _ _ _ ?x ?z ] => trans y ; [ sym ; apply H | sym ; apply H' ] + | [ H : @equiv ?A ?R ?s ?y ?x, H' : @equiv ?A ?R ?s ?y ?z |- @equiv _ _ _ ?x ?z ] => trans y ; [ sym ; apply H | apply H' ] + + | [ H : not (@equiv ?A ?R ?s ?X ?X) |- _ ] => elim H ; refl + | [ H : not (@equiv ?A ?R ?s ?X ?Y), H' : @equiv ?A ?R ?s ?Y ?X |- _ ] => elim H ; sym ; apply H + | [ H : not (@equiv ?A ?R ?s ?X ?Y), H' : ?R ?Y ?X |- _ ] => elim H ; sym ; apply H + | [ H : not (@equiv ?A ?R ?s ?X ?Y) |- False ] => elim H ; clear H ; setoid_tac + end. |