X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Ftests%2Fapply.ma;h=21c0faa419100b2958493aaee9f697b714c22a9d;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=0fcf73cf32fc81cbf60dc44c4549116e69df5ec9;hpb=9f7cb5462119ce44becf0bc9848d61690a048ac7;p=helm.git diff --git a/helm/matita/tests/apply.ma b/helm/matita/tests/apply.ma index 0fcf73cf3..21c0faa41 100644 --- a/helm/matita/tests/apply.ma +++ b/helm/matita/tests/apply.ma @@ -1,5 +1,20 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + (* test _with_ the WHD on the apply argument *) set "baseuri" "cic:/matita/tests/apply/". +include "coq.ma". alias id "not" = "cic:/Coq/Init/Logic/not.con". alias id "False" = "cic:/Coq/Init/Logic/False.ind#xpointer(1/1)". @@ -14,7 +29,7 @@ qed. (* test _without_ the WHD on the apply argument *) -alias symbol "eq" (instance 0) = "leibnitz's equality". +alias symbol "eq" (instance 0) = "Coq's leibnitz's equality". theorem a: \forall A:Set. @@ -23,3 +38,20 @@ theorem a: intros. apply H. qed. + + +(* this test shows what happens when a term of type A -> ? is applied to + a goal of type A' -> B: if A unifies with A' the unifier becomes ? := B + and no goal is opened; otherwise the unifier becomes ? := A' -> B and a + new goal of type A is created. *) +theorem c: + \forall A,B:Prop. + A \to (\forall P: Prop. A \to P) \to (A \to B) \land (B \to B). + intros 4; split; [ apply H1 | apply H1; exact H ]. +qed. + +(* this test requires the delta-expansion of not in the type of the applied + term (to reveal a product) *) +theorem d: \forall A: Prop. \lnot A \to A \to False. + intros. apply H. assumption. +qed. \ No newline at end of file