From 69b4ac15705f7f5de44dd22b4295c5cd17a131f5 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 31 Jan 2007 18:29:53 +0000 Subject: [PATCH] New test for mutual recursive definitions. --- helm/software/matita/tests/letrecand.ma | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 helm/software/matita/tests/letrecand.ma diff --git a/helm/software/matita/tests/letrecand.ma b/helm/software/matita/tests/letrecand.ma new file mode 100644 index 000000000..017c2ae89 --- /dev/null +++ b/helm/software/matita/tests/letrecand.ma @@ -0,0 +1,74 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/test/letrecand". + +include "nat/nat.ma". + +let rec pari n : Prop := + match n with + [ O ⇒ True + | S n ⇒ dispari n + ] +and dispari n : Prop := + match n with + [ O => False + | S n => pari n + ]. + +definition pari2 ≝ +let rec pari n : Prop := + match n with + [ O ⇒ True + | S n ⇒ dispari n + ] +and dispari n : Prop := + match n with + [ O => False + | S n => pari n + ] +in pari. + +definition dispari2 ≝ +let rec pari n : Prop := + match n with + [ O ⇒ True + | S n ⇒ dispari n + ] +and dispari n : Prop := + match n with + [ O => False + | S n => pari n + ] +in dispari. + +lemma test_pari: pari (S (S O)). +simplify. +constructor 1. +qed. + +lemma test_pari2: pari2 (S (S O)). +simplify. +constructor 1. +qed. + +lemma test_dispari: dispari (S O). +simplify. +constructor 1. +qed. + +lemma test_dispari2: dispari2 (S O). +simplify. +constructor 1. +qed. \ No newline at end of file -- 2.39.2