src/HOL/GroupTheory/Group.ML
author paulson
Mon, 23 Jul 2001 17:37:29 +0200
changeset 11443 77ed7e2b56c8
parent 11394 e88c2c89f98e
child 12459 6978ab7cac64
permissions -rw-r--r--
The final version of Florian Kammueller's proofs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     1
(*  Title:      HOL/GroupTheory/Group
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     2
    ID:         $Id$
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     3
    Author:     Florian Kammueller, with new proofs by L C Paulson
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     4
    Copyright   1998-2001  University of Cambridge
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     5
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     6
Group theory using locales
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     7
*)
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     8
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     9
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    10
fun afs thms = (asm_full_simp_tac (simpset() addsimps thms));
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    11
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    12
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    13
(* Proof of group theory theorems necessary for Sylow's theorem *)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    14
Open_locale "group";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    15
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    16
val e_def = thm "e_def";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    17
val binop_def = thm "binop_def";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    18
val inv_def = thm "inv_def";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    19
val Group_G = thm "Group_G";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    20
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    21
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    22
val simp_G = simplify (simpset() addsimps [Group_def]) (Group_G);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    23
Addsimps [simp_G, Group_G];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    24
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    25
Goal "e \\<in> carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    26
by (afs [e_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    27
qed "e_closed";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    28
val unit_closed = export e_closed;
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    29
Addsimps [e_closed];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    30
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    31
Goal "op ## \\<in> carrier G \\<rightarrow> carrier G \\<rightarrow> carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    32
by (simp_tac (simpset() addsimps [binop_def]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    33
qed "binop_funcset";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    34
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    35
Goal "[| x \\<in> carrier G; y \\<in> carrier G |] ==> x ## y \\<in> carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    36
by (afs [binop_funcset RS (funcset_mem RS funcset_mem)] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    37
qed "binop_closed";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    38
val bin_op_closed = export binop_closed;
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    39
Addsimps [binop_closed];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    40
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    41
Goal "INV \\<in> carrier G \\<rightarrow> carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    42
by (simp_tac (simpset() addsimps [inv_def]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    43
qed "inv_funcset";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    44
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    45
Goal "x \\<in> carrier G ==> i(x) \\<in> carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    46
by (afs [inv_funcset RS funcset_mem] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    47
qed "inv_closed"; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    48
val inverse_closed = export inv_closed;
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    49
Addsimps [inv_closed];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    50
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    51
Goal "x \\<in> carrier G ==> e ## x = x";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    52
by (afs [e_def, binop_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    53
qed "e_ax1";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    54
Addsimps [e_ax1];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    55
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    56
Goal "x \\<in> carrier G ==> i(x) ## x = e";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    57
by (afs [binop_def, inv_def, e_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    58
qed "inv_ax2";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    59
Addsimps [inv_ax2]; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    60
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    61
Goal "[| x \\<in> carrier G; y \\<in> carrier G; z \\<in> carrier G |] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    62
\     ==> (x ## y) ## z = x ## (y ## z)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    63
by (afs [binop_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    64
qed "binop_assoc";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    65
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    66
Goal "[|f \\<in> A \\<rightarrow> A \\<rightarrow> A;  i1 \\<in> A \\<rightarrow> A;  e1 \\<in> A;\
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    67
\       \\<forall>x \\<in> A. (f (i1 x) x = e1);  \\<forall>x \\<in> A. (f e1 x = x);\
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    68
\       \\<forall>x \\<in> A. \\<forall>y \\<in> A. \\<forall>z \\<in> A. (f (f x y) z = f (x) (f y z)) |] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    69
\     ==> (| carrier = A, bin_op = f, inverse = i1, unit = e1 |) \\<in> Group";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    70
by (afs [Group_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    71
qed "groupI";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    72
val GroupI = export groupI;
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    73
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    74
(*****)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    75
(* Now the real derivations *)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    76
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    77
Goal "[| x\\<in>carrier G ; y\\<in>carrier G; z\\<in>carrier G;  x ## y  =  x ## z |] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    78
\     ==> y = z";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    79
by (dres_inst_tac [("f","%z. i x ## z")] arg_cong 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    80
by (asm_full_simp_tac (simpset() addsimps [binop_assoc RS sym]) 1); 
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    81
qed "left_cancellation";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    82
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    83
Goal "[| x \\<in> carrier G; y \\<in> carrier G; z \\<in> carrier G |] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    84
\     ==> (x ## y  =  x ## z) = (y = z)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    85
by (blast_tac (claset() addIs [left_cancellation]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    86
qed "left_cancellation_iff";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    87
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    88
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    89
(* Now the other directions of basic lemmas; they need a left cancellation*)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    90
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    91
Goal "x \\<in> carrier G ==> x ## e = x";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    92
by (res_inst_tac [("x","i x")] left_cancellation 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    93
by (auto_tac (claset(), simpset() addsimps [binop_assoc RS sym])); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    94
qed "e_ax2";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    95
Addsimps [e_ax2];
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    96
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    97
Goal "[| x \\<in> carrier G; x ## x = x |] ==> x = e";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    98
by (res_inst_tac [("x","x")] left_cancellation 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    99
by Auto_tac; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   100
qed "idempotent_e";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   101
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   102
Goal  "x \\<in> carrier G ==> x ## i(x) = e";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   103
by (rtac idempotent_e 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   104
by (auto_tac (claset(), simpset() addsimps [binop_assoc RS sym]));
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   105
by (asm_simp_tac (simpset() addsimps [inst "x" "x" binop_assoc]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   106
qed "inv_ax1";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   107
Addsimps [inv_ax1]; 
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   108
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   109
Goal "[| x \\<in> carrier G; y \\<in> carrier G; x ## y = e |] ==> y = i(x)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   110
by (res_inst_tac [("x","x")] left_cancellation 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   111
by Auto_tac; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   112
qed "inv_unique";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   113
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   114
Goal "x \\<in> carrier G ==> i(i(x)) = x";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   115
by (res_inst_tac [("x","i x")] left_cancellation 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   116
by Auto_tac; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   117
qed "inv_inv";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   118
Addsimps [inv_inv]; 
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   119
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   120
Goal "[| x \\<in> carrier G; y \\<in> carrier G |] ==> i(x ## y) = i(y) ## i(x)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   121
by (rtac (inv_unique RS sym) 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   122
by (auto_tac (claset(), simpset() addsimps [binop_assoc RS sym]));
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   123
by (asm_simp_tac (simpset() addsimps [inst "x" "x" binop_assoc]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   124
qed "inv_prod";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   125
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   126
Goal "[| y ## x =  z ## x;  \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   127
\        x \\<in> carrier G; y \\<in> carrier G; z \\<in> carrier G|] ==> y = z";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   128
by (dres_inst_tac [("f","%z. z ## i x")] arg_cong 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   129
by (asm_full_simp_tac (simpset() addsimps [binop_assoc]) 1); 
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   130
qed "right_cancellation";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   131
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   132
Goal "[| x \\<in> carrier G; y \\<in> carrier G; z \\<in> carrier G |] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   133
\     ==> (y ## x =  z ## x) = (y = z)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   134
by (blast_tac (claset() addIs [right_cancellation]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   135
qed "right_cancellation_iff";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   136
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   137
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   138
(* subgroup *)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   139
Goal "[| H <= carrier G; H \\<noteq> {}; \\<forall>a \\<in> H. i(a)\\<in>H; \\<forall>a\\<in>H. \\<forall>b\\<in>H. a ## b\\<in>H|] \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   140
\     ==> e \\<in> H";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   141
by (Force_tac 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   142
qed "e_in_H";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   143
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   144
(* subgroupI: a characterization of subgroups *)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   145
Goal "[| H <= carrier G; H \\<noteq> {}; \\<forall>a \\<in> H. i(a)\\<in>H;\
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   146
\          \\<forall>a\\<in>H. \\<forall>b\\<in>H. a ## b\\<in>H |] ==> H <<= G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   147
by (asm_full_simp_tac (simpset() addsimps [subgroup_def]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   148
(* Fold the locale definitions: the top level definition of subgroup gives
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   149
   the verbose form, which does not immediately match rules like inv_ax1 *)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   150
by (rtac groupI 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   151
by (ALLGOALS (asm_full_simp_tac
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   152
    (simpset() addsimps [subsetD, restrictI, e_in_H, binop_assoc] @
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   153
                        (map symmetric [binop_def, inv_def, e_def]))));
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   154
qed "subgroupI";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   155
val SubgroupI = export subgroupI;
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   156
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   157
Goal "H <<= G  ==> \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   158
\      (|carrier = H, bin_op = lam x:H. lam y:H. x ## y, \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   159
\       inverse = lam x:H. i(x), unit = e|)\\<in>Group";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   160
by (afs [subgroup_def, binop_def, inv_def, e_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   161
qed "subgroupE2";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   162
val SubgroupE2 = export subgroupE2;
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   163
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   164
Goal "H <<= G  ==> H <= carrier G";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   165
by (afs [subgroup_def, binop_def, inv_def, e_def] 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   166
qed "subgroup_imp_subset";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   167
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   168
Goal "[| H <<= G; x \\<in> H; y \\<in> H |] ==> x ## y \\<in> H";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   169
by (dtac subgroupE2 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   170
by (dtac bin_op_closed 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   171
by (Asm_full_simp_tac 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   172
by (thin_tac "x\\<in>H" 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   173
by Auto_tac; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   174
qed "subgroup_f_closed";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   175
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   176
Goal "[| H <<= G; x \\<in> H |] ==> i x \\<in> H";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   177
by (dtac (subgroupE2 RS inverse_closed) 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   178
by Auto_tac; 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   179
qed "subgroup_inv_closed";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   180
val Subgroup_inverse_closed = export subgroup_inv_closed;
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   181
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   182
Goal "H <<= G ==> e\\<in>H";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   183
by (dtac (subgroupE2 RS unit_closed) 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   184
by (Asm_full_simp_tac 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   185
qed "subgroup_e_closed";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   186
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   187
Goal "[| finite(carrier G); H <<= G |] ==> 0 < card(H)";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   188
by (subgoal_tac "finite H" 1);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   189
 by (blast_tac (claset() addIs [finite_subset] addDs [subgroup_imp_subset]) 2);
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   190
by (rtac ccontr 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   191
by (asm_full_simp_tac (simpset() addsimps [card_0_eq]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   192
by (blast_tac (claset() addDs [subgroup_e_closed]) 1); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   193
qed "SG_card1";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   194
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   195
(* Abelian Groups *) 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   196
Goal "[|G' \\<in> AbelianGroup; x: carrier G'; y: carrier G'|]  \
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   197
\     ==> (G'.<f>) x y = (G'.<f>) y x";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   198
by (auto_tac (claset(), simpset() addsimps [AbelianGroup_def])); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   199
qed "Group_commute";
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   200
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   201
Goal "AbelianGroup <= Group";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   202
by (auto_tac (claset(), simpset() addsimps [AbelianGroup_def])); 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   203
qed "Abel_subset_Group";
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   204
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   205
val Abel_imp_Group = Abel_subset_Group RS subsetD;
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   206
11443
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   207
Delsimps [simp_G, Group_G];
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
   208
Close_locale "group";
11443
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   209
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   210
Goal "G \\<in> Group ==> (| carrier = G .<cr>, bin_op = G .<f>, inverse = G .<inv>,\
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   211
\                unit = G .<e> |) \\<in> Group";
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   212
by (blast_tac
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   213
    (claset() addIs [GroupI, export binop_funcset, export inv_funcset, export e_closed, export inv_ax2, export e_ax1, export binop_assoc]) 1); 
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   214
qed "Group_Group";
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   215
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   216
Goal "G \\<in> AbelianGroup \
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   217
\     ==> (| carrier = G .<cr>, bin_op = G .<f>, inverse = G .<inv>,\
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   218
\            unit = G .<e> |) \\<in> AbelianGroup";
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   219
by (asm_full_simp_tac (simpset() addsimps [AbelianGroup_def]) 1);
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   220
by (rtac Group_Group 1);  
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   221
by Auto_tac; 
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   222
qed "Abel_Abel";
77ed7e2b56c8 The final version of Florian Kammueller's proofs
paulson
parents: 11394
diff changeset
   223