aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success
diff options
context:
space:
mode:
authorGravatar bertot <bertot@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-06-07 06:48:00 +0000
committerGravatar bertot <bertot@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-06-07 06:48:00 +0000
commitf8e145511a9125fc0e74132e30280ae763b5ac86 (patch)
tree0396859809feac3ff126a7fbfb46c562045adfa7 /test-suite/success
parent77b37b73d711af9b0725f1d63f99ad3157486cbb (diff)
This example does not work in coq-7.3, but does in coq-7.2.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2766 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success')
-rw-r--r--test-suite/success/MatchFail.v23
1 files changed, 23 insertions, 0 deletions
diff --git a/test-suite/success/MatchFail.v b/test-suite/success/MatchFail.v
new file mode 100644
index 000000000..a62113d12
--- /dev/null
+++ b/test-suite/success/MatchFail.v
@@ -0,0 +1,23 @@
+Require Export ZArith.
+Require Export ZArithRing.
+
+Tactic Definition compute_POS :=
+ (Match Context With
+ | [|- [(POS (xI ?1))]] -> Let v = ?1 In
+ (Match v With
+ | [xH] ->
+ (Fail 1)
+ |_->
+ Rewrite (POS_xI v))
+ | [ |- [(POS (xO ?1))]] -> Let v = ?1 In
+ Match v With
+ |[xH]->
+ (Fail 1)
+ |[?]->
+ Rewrite (POS_xO v)).
+
+Goal (x:positive)(POS (xI (xI x)))=`4*(POS x)+3`.
+Intros.
+Repeat compute_POS.
+Ring.
+Qed.