aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Inductive.v
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-12-21 23:50:17 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-12-21 23:50:17 +0000
commit4d4f08acb5e5f56d38289e5629173bc1b8b5fd57 (patch)
treec160d442d54dbd15cbd0ab3500cdf94d0a6da74e /test-suite/success/Inductive.v
parent960859c0c10e029f9768d0d70addeca8f6b6d784 (diff)
Abandon tests syntaxe v7; remplacement des .v par des fichiers en syntaxe v8
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7693 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success/Inductive.v')
-rw-r--r--test-suite/success/Inductive.v52
1 files changed, 31 insertions, 21 deletions
diff --git a/test-suite/success/Inductive.v b/test-suite/success/Inductive.v
index 87431a75c..33da5e4ce 100644
--- a/test-suite/success/Inductive.v
+++ b/test-suite/success/Inductive.v
@@ -1,34 +1,44 @@
(* Check local definitions in context of inductive types *)
-Inductive A [C,D:Prop; E:=C; F:=D; x,y:E->F] : E -> Set :=
- I : (z:E)(A C D x y z).
+Inductive A (C D : Prop) (E:=C) (F:=D) (x y : E -> F) : E -> Set :=
+ I : forall z : E, A C D x y z.
Check
- [C,D:Prop; E:=C; F:=D; x,y:(E ->F);
- P:((c:C)(A C D x y c) ->Type);
- f:((z:C)(P z (I C D x y z)));
- y0:C; a:(A C D x y y0)]
- <[y1:C; a0:(A C D x y y1)](P y1 a0)>Cases a of (I x0) => (f x0) end.
-
-Record B [C,D:Set; E:=C; F:=D; x,y:E->F] : Set := { p : C; q : E }.
+ (fun C D : Prop =>
+ let E := C in
+ let F := D in
+ fun (x y : E -> F) (P : forall c : C, A C D x y c -> Type)
+ (f : forall z : C, P z (I C D x y z)) (y0 : C)
+ (a : A C D x y y0) =>
+ match a as a0 in (A _ _ _ _ y1) return (P y1 a0) with
+ | I x0 => f x0
+ end).
+
+Record B (C D : Set) (E:=C) (F:=D) (x y : E -> F) : Set := {p : C; q : E}.
Check
- [C,D:Set; E:=C; F:=D; x,y:(E ->F);
- P:((B C D x y) ->Type);
- f:((p0,q0:C)(P (Build_B C D x y p0 q0)));
- b:(B C D x y)]
- <[b0:(B C D x y)](P b0)>Cases b of (Build_B x0 x1) => (f x0 x1) end.
+ (fun C D : Set =>
+ let E := C in
+ let F := D in
+ fun (x y : E -> F) (P : B C D x y -> Type)
+ (f : forall p0 q0 : C, P (Build_B C D x y p0 q0))
+ (b : B C D x y) =>
+ match b as b0 return (P b0) with
+ | Build_B x0 x1 => f x0 x1
+ end).
(* Check implicit parameters of inductive types (submitted by Pierre
Casteran and also implicit in #338) *)
Set Implicit Arguments.
+Unset Strict Implicit.
-CoInductive LList [A:Set] : Set :=
- | LNil : (LList A)
- | LCons : A -> (LList A) -> (LList A).
+CoInductive LList (A : Set) : Set :=
+ | LNil : LList A
+ | LCons : A -> LList A -> LList A.
-Implicits LNil [1].
+Implicit Arguments LNil [A].
-Inductive Finite [A:Set] : (LList A) -> Prop :=
- | Finite_LNil : (Finite LNil)
- | Finite_LCons : (a:A) (l:(LList A)) (Finite l) -> (Finite (LCons a l)).
+Inductive Finite (A : Set) : LList A -> Prop :=
+ | Finite_LNil : Finite LNil
+ | Finite_LCons :
+ forall (a : A) (l : LList A), Finite l -> Finite (LCons a l).