aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-10-27 17:43:25 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-10-27 17:43:25 +0000
commit95a66e52524b899cdfe3765c4b85296b82aa5416 (patch)
tree6e1b34108ccebb0ec89ba545ffe9b02faaa68380 /test-suite
parenta467cd39586159fa660e5f5dc557efaad03426c9 (diff)
Ajout test dependent rewrite
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6260 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/rewrite.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/success/rewrite.v b/test-suite/success/rewrite.v
new file mode 100644
index 000000000..8816d1536
--- /dev/null
+++ b/test-suite/success/rewrite.v
@@ -0,0 +1,17 @@
+(* Check that dependent rewrite applies on arbitrary terms *)
+
+Inductive listn : nat-> Set :=
+ niln : (listn O)
+| consn : (n:nat)nat->(listn n) -> (listn (S n)).
+
+Axiom ax : (n,n':nat)(l:(listn (plus n n')))(l':(listn (plus n' n)))
+ (existS ? ? (plus n n') l) =(existS ? ? (plus n' n) l').
+
+Lemma lem : (n,n':nat)(l:(listn (plus n n')))(l':(listn (plus n' n)))
+ (plus n n')=(plus n' n)
+ /\ (existT ? ? (plus n n') l) =(existT ? ? (plus n' n) l').
+Proof.
+Intros n n' l l'.
+Dependent Rewrite (ax n n' l l').
+Split; Reflexivity.
+Qed.