blob: 87fba8eba992d9045816c2f30a561f6f22fa7f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Require Export Axioms.
(*s This file contains basic properties of addition with respect to equality *)
(*s Properties of inequalities *)
Lemma neq_sym : (x,y:N)(x<>y)->(y<>x).
Unfold neq; Auto with num.
Save.
Hints Resolve neq_sym : num.
Lemma neq_eq_compat : (x1,x2,y1,y2:N)(x1=y1)->(x2=y2)->(x1<>x2)->(y1<>y2).
Red; EAuto with num.
Save.
Hints Resolve neq_eq_compat : num.
(*s Properties of Addition *)
Lemma add_x_0 : (x:N)(x+zero)=x.
EAuto 3 with num.
Save.
Hints Resolve add_x_0 : num.
Lemma add_x_Sy : (x,y:N)(x+(S y))=(S (x+y)).
Intros x y; Apply eq_trans with (S y)+x; EAuto with num.
Save.
Hints Resolve add_x_Sy : num.
Lemma add_x_Sy_swap : (x,y:N)(x+(S y))=((S x)+y).
EAuto with num.
Save.
Hints Resolve add_x_Sy_swap : num.
Lemma add_Sx_y_swap : (x,y:N)((S x)+y)=(x+(S y)).
Auto with num.
Save.
Hints Resolve add_Sx_y_swap : num.
Lemma add_assoc_r : (x,y,z:N)(x+(y+z))=((x+y)+z).
Auto with num.
Save.
Hints Resolve add_assoc_r : num.
Lemma add_x_y_z_perm : (x,y,z:N)((x+y)+z)=(y+(x+z)).
EAuto with num.
Save.
Hints Resolve add_x_y_z_perm : num.
Lemma add_x_one_S : (x:N)(x+one)=(S x).
Intros; Apply eq_trans with (x+(S zero)); EAuto with num.
Save.
Hints Resolve add_x_one_S : num.
Lemma add_one_x_S : (x:N)(one+x)=(S x).
Intros; Apply eq_trans with (x+one); Auto with num.
Save.
Hints Resolve add_one_x_S : num.
|