]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/tests/change.ma
better test for church numerals
[helm.git] / helm / software / matita / tests / change.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 set "baseuri" "cic:/matita/tests/change/".
16 include "../legacy/coq.ma".
17 alias num (instance 0) = "natural number".
18 alias symbol "eq" (instance 0) = "Coq's leibnitz's equality".
19 alias symbol "plus" (instance 0) = "Coq's natural plus".
20 alias id "nat" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)".
21
22 theorem stupid: 
23   \forall a:nat.
24   a = 5 \to 
25   (3 + 2) = a.
26 intros.
27 change in \vdash (? ? % ?) with 5.
28 rewrite < H in \vdash (? ? % ?). 
29 reflexivity.
30 qed.
31
32 (* tests changing a term under a binder *)
33 alias id "True" = "cic:/Coq/Init/Logic/True.ind#xpointer(1/1)".
34 theorem t: (\forall x:nat. x=x) \to True.
35  intro H.
36  change in match x in H : (\forall _.%) with (0+x).
37  change in H: (\forall _.(? ? ? (? % ?))) with 0.
38  constructor 1.
39 qed.
40