X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Ftests%2Fcoercions.ma;h=e9026af335ee5b894de07384e81952f3e00d509e;hb=b6afef7e73324824025a6d7f313129d55b72cfc6;hp=1d841d16ebc2f3cad7299d9ec30cf9198ffa81c8;hpb=456f7d82d3cf6732daa36bb07d06c23c4a60beda;p=helm.git diff --git a/helm/software/matita/tests/coercions.ma b/helm/software/matita/tests/coercions.ma index 1d841d16e..e9026af33 100644 --- a/helm/software/matita/tests/coercions.ma +++ b/helm/software/matita/tests/coercions.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/tests/coercions/". + include "nat/compare.ma". include "nat/times.ma". @@ -59,10 +59,14 @@ definition double2: \def \lambda f:int \to int. \lambda x : pos .f (nat2int (pos2nat x)). +(* This used to test eq_f as a coercion. However, posing both eq_f and sym_eq + as coercions made the qed time of some TPTP problems reach infty. + Thus eq_f is no longer a coercion (nor is sym_eq). theorem coercion_svelta : \forall T,S:Type.\forall f:T \to S.\forall x,y:T.x=y \to f y = f x. intros. apply ((\lambda h:f y = f x.h) H). qed. +*) variant pos2nat' : ? \def pos2nat. @@ -103,10 +107,41 @@ definition map: \forall n:nat.\forall l:listn nat n. nat \to nat \def definition church: nat \to nat \to nat \def times. coercion cic:/matita/tests/coercions/church.con 1. +lemma foo0 : ∀n:nat. n n = n * n. +intros; reflexivity; +qed. +lemma foo01 : ∀n:nat. n n n = n * n * n. +intros; reflexivity; +qed. definition mapmult: \forall n:nat.\forall l:listn nat n. nat \to nat \to nat \def \lambda n:nat.\lambda l:listn nat n.\lambda m,o:nat. l (m m) o (o o o). + +lemma foo : ∀n:nat. n n n n n n = n * n * n * n * n * n. +intros; reflexivity; +qed. + +axiom f : nat → nat. + +lemma foo1 : ∀n:nat. f n n = f n * n. + +axiom T0 : Type. +axiom T1 : Type. +axiom T2 : Type. +axiom T3 : Type. + +axiom c1 : T0 -> T1. +axiom c2 : T1 -> T2. +axiom c3 : T2 -> T3. +axiom c4 : T2 -> T1. + +coercion cic:/matita/tests/coercions/c1.con. +coercion cic:/matita/tests/coercions/c2.con. +coercion cic:/matita/tests/coercions/c3.con. +coercion cic:/matita/tests/coercions/c4.con. + +