aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/success/Case6.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/Case6.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/Case6.v')
-rw-r--r--test-suite/success/Case6.v32
1 files changed, 14 insertions, 18 deletions
diff --git a/test-suite/success/Case6.v b/test-suite/success/Case6.v
index a262251e7..cc1994e7a 100644
--- a/test-suite/success/Case6.v
+++ b/test-suite/success/Case6.v
@@ -1,19 +1,15 @@
-Parameter ff: (n,m:nat)~n=m -> ~(S n)=(S m).
-Parameter discr_r : (n:nat) ~(O=(S n)).
-Parameter discr_l : (n:nat) ~((S n)=O).
-
-Fixpoint eqdec [n:nat] : (m:nat) n=m \/ ~n=m :=
-[m:nat]
- <[n,m:nat] n=m \/ ~n=m>Cases n m of
- O O => (or_introl ? ~O=O (refl_equal ? O))
-
- | O (S x) => (or_intror O=(S x) ? (discr_r x))
-
- | (S x) O => (or_intror ? ~(S x)=O (discr_l x))
-
- | ((S x) as N) ((S y) as M) =>
- <N=M\/~N=M>Cases (eqdec x y) of
- (or_introl h) => (or_introl ? ~N=M (f_equal nat nat S x y h))
- | (or_intror h) => (or_intror N=M ? (ff x y h))
+Parameter ff : forall n m : nat, n <> m -> S n <> S m.
+Parameter discr_r : forall n : nat, 0 <> S n.
+Parameter discr_l : forall n : nat, S n <> 0.
+
+Fixpoint eqdec (n m : nat) {struct n} : n = m \/ n <> m :=
+ match n, m return (n = m \/ n <> m) with
+ | O, O => or_introl (0 <> 0) (refl_equal 0)
+ | O, S x => or_intror (0 = S x) (discr_r x)
+ | S x, O => or_intror _ (discr_l x)
+ | S x as N, S y as M =>
+ match eqdec x y return (N = M \/ N <> M) with
+ | or_introl h => or_introl (N <> M) (f_equal S h)
+ | or_intror h => or_intror (N = M) (ff x y h)
end
- end.
+ end.