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/success/Case15.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/success/Case15.v')
-rw-r--r-- | test-suite/success/Case15.v | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/test-suite/success/Case15.v b/test-suite/success/Case15.v index 229445200..8431880d1 100644 --- a/test-suite/success/Case15.v +++ b/test-suite/success/Case15.v @@ -2,20 +2,23 @@ apparently of inductive type *) (* Check that the non dependency in y is OK both in V7 and V8 *) -Check ([x;y:Prop;z]<[x][z]x=x \/ z=z>Cases x y z of - | O y z' => (or_introl ? (z'=z') (refl_equal ? O)) - | _ y O => (or_intror ?? (refl_equal ? O)) - | x y _ => (or_introl ?? (refl_equal ? x)) - end). +Check + (fun x (y : Prop) z => + match x, y, z return (x = x \/ z = z) with + | O, y, z' => or_introl (z' = z') (refl_equal 0) + | _, y, O => or_intror _ (refl_equal 0) + | x, y, _ => or_introl _ (refl_equal x) + end). (* Suggested by Pierre Letouzey (PR#207) *) -Inductive Boite : Set := - boite : (b:bool)(if b then nat else nat*nat)->Boite. +Inductive Boite : Set := + boite : forall b : bool, (if b then nat else (nat * nat)%type) -> Boite. -Definition test := [B:Boite]<nat>Cases B of - (boite true n) => n -| (boite false (n,m)) => (plus n m) -end. +Definition test (B : Boite) := + match B return nat with + | boite true n => n + | boite false (n, m) => n + m + end. (* Check lazyness of compilation ... future work Inductive I : Set := c : (b:bool)(if b then bool else nat)->I. |