1247
|
1 |
(* Title: HOL/AxClasses/Tutorial/Group.ML
|
|
2 |
ID: $Id$
|
|
3 |
Author: Markus Wenzel, TU Muenchen
|
|
4 |
|
|
5 |
Some basic theorems of group theory.
|
|
6 |
*)
|
|
7 |
|
|
8 |
fun sub r = standard (r RS subst);
|
|
9 |
fun ssub r = standard (r RS ssubst);
|
|
10 |
|
|
11 |
|
5069
|
12 |
Goal "x <*> inverse x = (1::'a::group)";
|
1465
|
13 |
by (rtac (sub left_unit) 1);
|
1247
|
14 |
back();
|
1465
|
15 |
by (rtac (sub assoc) 1);
|
2907
|
16 |
by (rtac (sub left_inverse) 1);
|
1247
|
17 |
back();
|
|
18 |
back();
|
1465
|
19 |
by (rtac (ssub assoc) 1);
|
1247
|
20 |
back();
|
2907
|
21 |
by (rtac (ssub left_inverse) 1);
|
1465
|
22 |
by (rtac (ssub assoc) 1);
|
|
23 |
by (rtac (ssub left_unit) 1);
|
2907
|
24 |
by (rtac (ssub left_inverse) 1);
|
1465
|
25 |
by (rtac refl 1);
|
2907
|
26 |
qed "right_inverse";
|
1247
|
27 |
|
|
28 |
|
5069
|
29 |
Goal "x <*> 1 = (x::'a::group)";
|
2907
|
30 |
by (rtac (sub left_inverse) 1);
|
1465
|
31 |
by (rtac (sub assoc) 1);
|
2907
|
32 |
by (rtac (ssub right_inverse) 1);
|
1465
|
33 |
by (rtac (ssub left_unit) 1);
|
|
34 |
by (rtac refl 1);
|
1247
|
35 |
qed "right_unit";
|
|
36 |
|
|
37 |
|
5069
|
38 |
Goal "e <*> x = x --> e = (1::'a::group)";
|
1465
|
39 |
by (rtac impI 1);
|
|
40 |
by (rtac (sub right_unit) 1);
|
1247
|
41 |
back();
|
2907
|
42 |
by (res_inst_tac [("x", "x")] (sub right_inverse) 1);
|
1465
|
43 |
by (rtac (sub assoc) 1);
|
|
44 |
by (rtac arg_cong 1);
|
1247
|
45 |
back();
|
1465
|
46 |
by (assume_tac 1);
|
1247
|
47 |
qed "strong_one_unit";
|
|
48 |
|
|
49 |
|
5069
|
50 |
Goal "EX! e. ALL x. e <*> x = (x::'a::group)";
|
1465
|
51 |
by (rtac ex1I 1);
|
|
52 |
by (rtac allI 1);
|
|
53 |
by (rtac left_unit 1);
|
|
54 |
by (rtac mp 1);
|
|
55 |
by (rtac strong_one_unit 1);
|
|
56 |
by (etac allE 1);
|
|
57 |
by (assume_tac 1);
|
1247
|
58 |
qed "ex1_unit";
|
|
59 |
|
|
60 |
|
5069
|
61 |
Goal "ALL x. EX! e. e <*> x = (x::'a::group)";
|
1465
|
62 |
by (rtac allI 1);
|
|
63 |
by (rtac ex1I 1);
|
|
64 |
by (rtac left_unit 1);
|
|
65 |
by (rtac (strong_one_unit RS mp) 1);
|
|
66 |
by (assume_tac 1);
|
1247
|
67 |
qed "ex1_unit'";
|
|
68 |
|
|
69 |
|
5069
|
70 |
Goal "y <*> x = 1 --> y = inverse (x::'a::group)";
|
1465
|
71 |
by (rtac impI 1);
|
|
72 |
by (rtac (sub right_unit) 1);
|
1247
|
73 |
back();
|
|
74 |
back();
|
1465
|
75 |
by (rtac (sub right_unit) 1);
|
2907
|
76 |
by (res_inst_tac [("x", "x")] (sub right_inverse) 1);
|
1465
|
77 |
by (rtac (sub assoc) 1);
|
|
78 |
by (rtac (sub assoc) 1);
|
|
79 |
by (rtac arg_cong 1);
|
1247
|
80 |
back();
|
2907
|
81 |
by (rtac (ssub left_inverse) 1);
|
1465
|
82 |
by (assume_tac 1);
|
2907
|
83 |
qed "one_inverse";
|
1247
|
84 |
|
|
85 |
|
5069
|
86 |
Goal "ALL x. EX! y. y <*> x = (1::'a::group)";
|
1465
|
87 |
by (rtac allI 1);
|
|
88 |
by (rtac ex1I 1);
|
2907
|
89 |
by (rtac left_inverse 1);
|
1465
|
90 |
by (rtac mp 1);
|
2907
|
91 |
by (rtac one_inverse 1);
|
1465
|
92 |
by (assume_tac 1);
|
2907
|
93 |
qed "ex1_inverse";
|
1247
|
94 |
|
|
95 |
|
5069
|
96 |
Goal "inverse (x <*> y) = inverse y <*> inverse (x::'a::group)";
|
1465
|
97 |
by (rtac sym 1);
|
|
98 |
by (rtac mp 1);
|
2907
|
99 |
by (rtac one_inverse 1);
|
1465
|
100 |
by (rtac (ssub assoc) 1);
|
|
101 |
by (rtac (sub assoc) 1);
|
1247
|
102 |
back();
|
2907
|
103 |
by (rtac (ssub left_inverse) 1);
|
1465
|
104 |
by (rtac (ssub left_unit) 1);
|
2907
|
105 |
by (rtac (ssub left_inverse) 1);
|
1465
|
106 |
by (rtac refl 1);
|
2907
|
107 |
qed "inverse_product";
|
1247
|
108 |
|
|
109 |
|
5069
|
110 |
Goal "inverse (inverse x) = (x::'a::group)";
|
1465
|
111 |
by (rtac sym 1);
|
2907
|
112 |
by (rtac (one_inverse RS mp) 1);
|
|
113 |
by (rtac (ssub right_inverse) 1);
|
1465
|
114 |
by (rtac refl 1);
|
2907
|
115 |
qed "inverse_inv";
|
1247
|
116 |
|