X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matitaB%2Fmatita%2Ftests%2Fletrecand.ma;fp=matitaB%2Fmatita%2Ftests%2Fletrecand.ma;h=d2ac486b40d15789e620696f12297b59aac3ba57;hb=cacbe3c6493ddce76c4c13379ade271d8dd172e8;hp=0000000000000000000000000000000000000000;hpb=f04a064bb34aabaf91dc0c48e3b08b37ecd7b0a2;p=helm.git diff --git a/matitaB/matita/tests/letrecand.ma b/matitaB/matita/tests/letrecand.ma new file mode 100644 index 000000000..d2ac486b4 --- /dev/null +++ b/matitaB/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 *) +(* *) +(**************************************************************************) + + + +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.