X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Ftests%2Fdemodulation_coq.ma;fp=helm%2Fmatita%2Ftests%2Fdemodulation_coq.ma;h=aa9d5f185369a04e4c94b9d1795c81070649ef69;hb=83bbd662d887cc43d7d60cb607295dce503b3b7f;hp=0000000000000000000000000000000000000000;hpb=f7678e750c4a8551475d4538b824e328f523c564;p=helm.git diff --git a/helm/matita/tests/demodulation_coq.ma b/helm/matita/tests/demodulation_coq.ma new file mode 100644 index 000000000..aa9d5f185 --- /dev/null +++ b/helm/matita/tests/demodulation_coq.ma @@ -0,0 +1,52 @@ +(**************************************************************************) +(* ___ *) +(* ||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/demodulation/". + +include "legacy/coq.ma". + +alias num = "natural number". +alias symbol "times" = "Coq's natural times". +alias symbol "plus" = "Coq's natural plus". +alias symbol "eq" = "Coq's leibnitz's equality". +alias id "nat" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)". +alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)". + + +theorem p0 : \forall m:nat. m+O = m. +intro. demodulate. + +theorem p: \forall m.1*m = m. +intros.demodulate.reflexivity. +qed. + +theorem p2: \forall x,y:nat.(S x)*y = (y+x*y). +intros.demodulate.reflexivity. +qed. + +theorem p1: \forall x,y:nat.(S ((S x)*y+x))=(S x)+(y*x+y). +intros.demodulate.reflexivity. +qed. + +theorem p3: \forall x,y:nat. (x+y)*(x+y) = x*x + 2*(x*y) + (y*y). +intros.demodulate.reflexivity. +qed. + +theorem p4: \forall x:nat. (x+1)*(x-1)=x*x - 1. +intro. +apply (nat_case x) +[simplify.reflexivity +|intro.demodulate.reflexivity] +qed. +