]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/tests/demodulation_coq.ma
restructuring
[helm.git] / matita / matita / tests / demodulation_coq.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
16
17 include "coq.ma".
18
19 alias num = "Coq natural number".
20 alias symbol "times" = "Coq's natural times".
21 alias symbol "plus" = "Coq's natural plus".
22 alias symbol "eq" = "Coq's leibnitz's equality".
23 alias id "nat" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)".
24 alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)".
25 alias id "O" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/1)".
26
27 theorem p0 : \forall m:nat. m+O = m.
28 intro. demodulate.reflexivity.
29 qed.
30
31 theorem p: \forall m.1*m = m.
32 intros.demodulate.reflexivity.
33 qed.
34
35 theorem p2: \forall x,y:nat.(S x)*y = (y+x*y).
36 intros.demodulate.reflexivity.
37 qed.
38
39 theorem p1: \forall x,y:nat.(S ((S x)*y+x))=(S x)+(y*x+y).
40 intros.demodulate.reflexivity.
41 qed.
42
43 theorem p3: \forall x,y:nat. (x+y)*(x+y) = x*x + 2*(x*y) + (y*y).
44 intros.demodulate.reflexivity.
45 qed.
46
47 theorem p4: \forall x:nat. (x+1)*(x-1)=x*x - 1.
48 intro.
49 apply (nat_case x)
50 [simplify.reflexivity
51 |intro.demodulate.reflexivity]
52 qed.
53