diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-21 23:50:17 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2005-12-21 23:50:17 +0000 |
commit | 4d4f08acb5e5f56d38289e5629173bc1b8b5fd57 (patch) | |
tree | c160d442d54dbd15cbd0ab3500cdf94d0a6da74e /test-suite/failure/Case7.v | |
parent | 960859c0c10e029f9768d0d70addeca8f6b6d784 (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/failure/Case7.v')
-rw-r--r-- | test-suite/failure/Case7.v | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/test-suite/failure/Case7.v b/test-suite/failure/Case7.v index 3718f1989..64453481a 100644 --- a/test-suite/failure/Case7.v +++ b/test-suite/failure/Case7.v @@ -1,22 +1,20 @@ -Inductive listn : nat-> Set := - niln : (listn O) -| consn : (n:nat)nat->(listn n) -> (listn (S n)). +Inductive listn : nat -> Set := + | niln : listn 0 + | consn : forall n : nat, nat -> listn n -> listn (S n). -Definition length1:= [n:nat] [l:(listn n)] - Cases l of - (consn n _ (consn m _ _)) => (S (S m)) - |(consn n _ _) => (S O) - | _ => O - end. - -Type [n:nat] - [l:(listn n)] - <nat>Cases n of - O => O - | (S n) => - <([_:nat]nat)>Cases l of - niln => (S O) - | l' => (length1 (S n) l') - end - end. +Definition length1 (n : nat) (l : listn n) := + match l with + | consn n _ (consn m _ _) => S (S m) + | consn n _ _ => 1 + | _ => 0 + end. +Type + (fun (n : nat) (l : listn n) => + match n return nat with + | O => 0 + | S n => match l return nat with + | niln => 1 + | l' => length1 (S n) l' + end + end). |