]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/tests/apply.ma
ocaml 3.09 transition
[helm.git] / helm / matita / tests / apply.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* test _with_ the WHD on the apply argument *)
16 set "baseuri" "cic:/matita/tests/apply/".
17 include "coq.ma".
18
19 alias id "not" = "cic:/Coq/Init/Logic/not.con".
20 alias id "False" = "cic:/Coq/Init/Logic/False.ind#xpointer(1/1)".
21
22 theorem b:
23   \forall x:Prop.
24   (not x) \to x \to False.
25 intros.
26 apply H.
27 assumption.
28 qed.
29
30 (* test _without_ the WHD on the apply argument *)
31
32 alias symbol "eq" (instance 0) = "Coq's leibnitz's equality".
33
34 theorem a:
35   \forall A:Set.
36   \forall x: A.
37   not (x=x) \to not (x=x).
38 intros.
39 apply H.
40 qed.
41
42
43 (* this test shows what happens when a term of type A -> ? is applied to
44    a goal of type A' -> B: if A unifies with A' the unifier becomes ? := B
45    and no goal is opened; otherwise the unifier becomes ? := A' -> B and a
46    new goal of type A is created. *)
47 theorem c:
48  \forall A,B:Prop.
49    A \to (\forall P: Prop. A \to P) \to (A \to B) \land (B \to B).
50  intros 4; split; [ apply H1 | apply H1; exact H ].
51 qed.
52
53 (* this test requires the delta-expansion of not in the type of the applied
54    term (to reveal a product) *)
55 theorem d: \forall A: Prop. \lnot A \to A \to False.
56  intros. apply H. assumption.
57 qed.