aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Cases.v
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-11-21 00:15:02 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2001-11-21 00:15:02 +0000
commit3bd6c650480c842088dd8ab2d5397ad310a4e152 (patch)
tree491fae6df72686b8f7364a331774ec5d3ecd71ff /test-suite/success/Cases.v
parent66de913a47e90e6bc58326833777dc88cfdf2d19 (diff)
Nouveaux exemples
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2222 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success/Cases.v')
-rw-r--r--test-suite/success/Cases.v15
1 files changed, 8 insertions, 7 deletions
diff --git a/test-suite/success/Cases.v b/test-suite/success/Cases.v
index 313f8f74a..88c2b38b6 100644
--- a/test-suite/success/Cases.v
+++ b/test-suite/success/Cases.v
@@ -1,10 +1,3 @@
-(***********************************************************************)
-(* v * The Coq Proof Assistant / The Coq Development Team *)
-(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
-(* \VV/ *************************************************************)
-(* // * This file is distributed under the terms of the *)
-(* * GNU Lesser General Public License Version 2.1 *)
-(***********************************************************************)
(****************************************************************************)
(* Pattern-matching when non inductive terms occur *)
@@ -15,6 +8,14 @@ Type <[_,_:nat]nat>Cases O eq O of O x y => O | (S x) y z => x end.
(* Non dependent form of annotation *)
Type <nat>Cases O eq of O x => O | (S x) y => x end.
+(* Combining dependencies and non inductive arguments *)
+Type [A:Set][a:A][H:O=O]<[x][H]H==H>Cases H a of _ _ => (refl_eqT ? H) end.
+
+(* Interaction with coercions *)
+Parameter bool2nat : bool -> nat.
+Coercion bool2nat : bool >-> nat.
+Check [x](Cases x of O => true | (S _) => O end :: nat).
+
(****************************************************************************)
(* All remaining examples come from Cristina Cornes' V6 TESTS/MultCases.v *)