src/HOL/GroupTheory/Group.ML
author paulson
Sun, 10 Jun 2001 08:03:35 +0200
changeset 11370 680946254afe
child 11394 e88c2c89f98e
permissions -rw-r--r--
new GroupTheory example, e.g. the Sylow theorem (preliminary version)
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
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     4
    Copyright   2001  University of Cambridge
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     5
*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     6
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     7
(* Proof of the first theorem of Sylow, building on Group.thy
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     8
F. Kammueller 4.9.96.
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     9
The proofs are not using any simplification tacticals or alike, they are very
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    10
basic stepwise derivations. Thus, they are very long.
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    11
The reason for doing it that way is that I wanted to learn about reasoning in 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    12
HOL and Group.thy.*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    13
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    14
(* general *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    15
val [p1] = goal (the_context()) "f\\<in>A -> B ==> \\<forall>x\\<in>A. f x\\<in>B";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    16
by (res_inst_tac [("a","f")] CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    17
by (fold_goals_tac [funcset_def]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    18
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    19
qed "funcsetE";
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
val [p1] = goal (the_context()) "\\<forall>x\\<in>A. f x\\<in>B ==> f\\<in>A -> B";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    22
by (rewtac funcset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    23
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    24
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    25
qed "funcsetI";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    26
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    27
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    28
val [p1] = goal (the_context()) "f\\<in>A -> B -> C ==> \\<forall>x\\<in>A. \\<forall> y\\<in>B. f x y\\<in>C";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    29
by (rtac ballI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    30
by (res_inst_tac [("a","f x")] CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    31
by (res_inst_tac [("A","A")] bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    32
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    33
by (res_inst_tac [("a","f")] CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    34
by (fold_goals_tac [funcset_def]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    35
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    36
qed "funcsetE2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    37
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    38
val [p1] = goal (the_context()) "\\<forall>x\\<in>A. \\<forall> y\\<in>B. f x y\\<in>C ==> f\\<in>A -> B -> C";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    39
by (rewtac funcset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    40
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    41
by (rtac ballI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    42
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    43
by (res_inst_tac [("A","A")] bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    44
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    45
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    46
qed "funcsetI2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    47
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    48
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    49
val [p1,p2,p3,p4] = goal (the_context())
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    50
     "[| finite A; finite B; \
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    51
\    \\<exists>f \\<in> A -> B. inj_on f A; \\<exists>g \\<in> B -> A. inj_on g B |] ==> card(A) = card(B)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    52
by (rtac le_anti_sym 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    53
by (rtac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    54
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    55
by (rtac (p2 RS (p1 RS card_inj)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    56
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    57
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    58
by (rtac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    59
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    60
by (rtac (p1 RS (p2 RS card_inj)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    61
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    62
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    63
qed "card_bij";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    64
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    65
Goal "order(G) = card(carrier G)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    66
by (simp_tac (simpset() addsimps [order_def,carrier_def]) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    67
qed "order_eq"; 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    68
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    69
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    70
(* Basic group properties *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    71
goal (the_context()) "bin_op (H, bin_op G, invers G, unity G) = bin_op G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    72
by (rewtac bin_op_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    73
by (rewrite_goals_tac [snd_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    74
by (rewrite_goals_tac [fst_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    75
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    76
qed "bin_op_conv";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    77
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    78
goal (the_context()) "carrier (H, bin_op G, invers G, unity G) = H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    79
by (rewtac carrier_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    80
by (rewrite_goals_tac [fst_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    81
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    82
qed "carrier_conv";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    83
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    84
goal (the_context()) "invers (H, bin_op G, invers G, unity G) = invers G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    85
by (rewtac invers_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    86
by (rewrite_goals_tac [snd_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    87
by (rewrite_goals_tac [fst_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    88
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    89
qed "invers_conv";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    90
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    91
goal (the_context()) "G\\<in>Group ==> (carrier G, bin_op G, invers G, unity G) = G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    92
by (rewrite_goals_tac [carrier_def,invers_def,unity_def,bin_op_def]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    93
by (rtac (surjective_pairing RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    94
by (rtac (surjective_pairing RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    95
by (rtac (surjective_pairing RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    96
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    97
qed "G_conv";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    98
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    99
(* Derivations of the Group definitions *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   100
val [q1] = goal (the_context()) "G\\<in>Group ==> unity G\\<in>carrier G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   101
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   102
by (res_inst_tac [("P","%x. x\\<in>Group  --> unity G\\<in>carrier G")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   103
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   104
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   105
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   106
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   107
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   108
qed "unity_closed";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   109
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   110
(* second part is identical to previous proof *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   111
val [q1,q2,q3] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G; b\\<in>carrier G |] ==> bin_op G a b\\<in>carrier G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   112
by (res_inst_tac [("x","b")] bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   113
by (rtac q3 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   114
by (res_inst_tac [("x","a")] bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   115
by (rtac q2 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   116
by (rtac funcsetE2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   117
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   118
by (res_inst_tac [("P","%x. x\\<in>Group  --> bin_op G\\<in>carrier G -> carrier G -> carrier G")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   119
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   120
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   121
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   122
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   123
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   124
qed "bin_op_closed";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   125
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   126
val [q1,q2] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G |] ==> invers G a\\<in>carrier G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   127
by (res_inst_tac [("x","a")] bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   128
by (rtac q2 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   129
by (rtac funcsetE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   130
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   131
by (res_inst_tac [("P","%x. x\\<in>Group  --> invers G\\<in>carrier G -> carrier G")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   132
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   133
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   134
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   135
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   136
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   137
qed "invers_closed";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   138
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   139
val [q1,q2] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G |] ==> bin_op G (unity G) a = a";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   140
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   141
by (res_inst_tac [("P","%x. x\\<in>Group  --> bin_op G (unity G) a = a")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   142
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   143
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   144
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   145
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   146
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   147
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   148
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   149
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   150
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   151
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   152
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   153
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   154
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   155
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   156
qed "unity_ax1";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   157
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   158
(* Apart from the instantiation in third line identical to last proof ! *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   159
val [q1,q2] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G |] ==> bin_op G (invers G a) a  = unity G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   160
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   161
by (res_inst_tac [("P","%x. x\\<in>Group  --> bin_op G (invers G a) a = unity G")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   162
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   163
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   164
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   165
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   166
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   167
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   168
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   169
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   170
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   171
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   172
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   173
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   174
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   175
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   176
qed "invers_ax2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   177
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   178
(* again similar, different instantiation also in bspec's later *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   179
val [q1,q2,q3,q4] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G; b\\<in>carrier G; c\\<in>carrier G |] \
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   180
\                 ==> bin_op G (bin_op G a b) c = bin_op G a (bin_op G b c)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   181
by (rtac (q1 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   182
by (res_inst_tac [("P","%x. x\\<in>Group  --> bin_op G (bin_op G a b) c = bin_op G a (bin_op G b c)")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   183
by (rtac (q1 RS G_conv) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   184
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   185
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   186
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   187
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   188
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   189
by (dtac conjunct2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   190
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   191
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   192
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   193
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   194
by (dtac bspec 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   195
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   196
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   197
qed "bin_op_assoc";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   198
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   199
val [p1,p2,p3,p4,p5] = goal (the_context()) "[| G\\<in>Group; x\\<in>carrier G; y\\<in>carrier G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   200
\ z\\<in>carrier G; bin_op G x y = bin_op G x z |] ==> y = z";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   201
by (res_inst_tac [("P","%r. r = z")] (unity_ax1 RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   202
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   203
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   204
by (res_inst_tac [("P","%r. bin_op G r y = z")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   205
by (res_inst_tac [("a","x")] invers_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   206
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   207
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   208
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   209
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   210
by (rtac invers_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   211
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   212
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   213
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   214
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   215
by (stac p5 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   216
by (rtac (bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   217
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   218
by (rtac invers_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   219
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   220
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   221
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   222
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   223
by (stac invers_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   224
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   225
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   226
by (stac unity_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   227
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   228
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   229
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   230
qed "left_cancellation";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   231
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   232
(* here all other directions of basic lemmas, they need a cancellation *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   233
(* to be able to show the other directions of inverse and unity axiom we need:*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   234
val [q1,q2] = goal (the_context()) "[| G\\<in>Group; a\\<in>carrier G |] ==> bin_op G a (unity G) = a";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   235
by (res_inst_tac [("x","invers G a")] left_cancellation 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   236
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   237
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   238
by (rtac (q2 RS (q1 RS bin_op_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   239
by (rtac (q1 RS unity_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   240
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   241
by (rtac (q1 RS bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   242
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   243
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   244
by (rtac (q1 RS unity_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   245
by (rtac (q1 RS invers_ax2 RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   246
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   247
by (rtac (q1 RS unity_ax1 RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   248
by (rtac (q1 RS unity_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   249
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   250
qed "unity_ax2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   251
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   252
val [q1,q2,q3] = goal (the_context()) "[| G \\<in> Group; a\\<in>carrier G; bin_op G a a = a |] ==> a = unity G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   253
by (rtac (q3 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   254
by (res_inst_tac [("P","%x. bin_op G a a = x --> a = unity G")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   255
by (rtac (q2 RS (q1 RS unity_ax2)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   256
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   257
by (res_inst_tac [("x","a")] left_cancellation 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   258
by (assume_tac 5);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   259
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   260
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   261
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   262
by (rtac (q1 RS unity_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   263
qed "idempotent_e";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   264
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   265
val [q1,q2] = goal (the_context())  "[| G\\<in>Group; a\\<in>carrier G |] ==> bin_op G a (invers G a) = unity G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   266
by (rtac (q1 RS idempotent_e) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   267
by (rtac (q1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   268
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   269
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   270
by (rtac (q1 RS bin_op_assoc RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   271
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   272
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   273
by (rtac (q2 RS (q1 RS bin_op_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   274
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   275
by (res_inst_tac [("t","bin_op G (invers G a) (bin_op G a (invers G a))")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   276
by (rtac (q1 RS bin_op_assoc) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   277
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   278
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   279
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   280
by (rtac (q2 RS (q1 RS invers_ax2) RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   281
by (rtac (q1 RS unity_ax1 RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   282
by (rtac (q2 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   283
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   284
qed "invers_ax1";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   285
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   286
val [p1,p2,p3] = goal (the_context()) "[|(P==>Q); (Q==>R); P |] ==> R";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   287
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   288
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   289
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   290
qed "trans_meta";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   291
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   292
val [p1,p2,p3,p4] = goal (the_context()) "[| G\\<in>Group; M <= carrier G; g\\<in>carrier G; h\\<in>carrier G |] \
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   293
\                 ==> r_coset G  (r_coset G M g) h = r_coset G M (bin_op G g h)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   294
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   295
by (rtac equalityI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   296
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   297
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   298
by (rtac trans_meta 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   299
by (assume_tac 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   300
by (etac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   301
by (rtac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   302
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   303
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   304
by (rtac trans_meta 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   305
by (assume_tac 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   306
by (res_inst_tac [("a","xa")] CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   307
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   308
by (res_inst_tac [("A","M")] bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   309
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   310
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   311
by (res_inst_tac [("x","xb")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   312
by (rtac (bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   313
by (rtac refl 5);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   314
by (assume_tac 5);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   315
by (rtac p4 4);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   316
by (rtac p3 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   317
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   318
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   319
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   320
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   321
(* end of first <= obligation *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   322
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   323
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   324
by (rtac trans_meta 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   325
by (assume_tac 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   326
by (etac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   327
by (rtac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   328
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   329
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   330
by (res_inst_tac [("x","bin_op G xa g")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   331
by (rtac CollectI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   332
by (res_inst_tac [("x","xa")] bexI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   333
by (assume_tac 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   334
by (rtac refl 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   335
by (rtac (bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   336
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   337
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   338
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   339
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   340
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   341
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   342
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   343
qed "coset_mul_assoc";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   344
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   345
val [q1,q2] = goal (the_context()) "[| G \\<in> Group; M <= carrier G |] ==> r_coset G M (unity G) = M";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   346
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   347
by (rtac equalityI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   348
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   349
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   350
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   351
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   352
by (stac unity_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   353
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   354
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   355
by (etac (q2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   356
(* one direction <= finished *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   357
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   358
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   359
by (rtac bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   360
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   361
by (rtac unity_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   362
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   363
by (etac (q2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   364
qed "coset_mul_unity";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   365
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   366
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   367
val [q1,q2,q3,q4] = goal (the_context()) "[| G \\<in> Group; x\\<in>carrier G; H <<= G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   368
\                 x\\<in>H |] ==> r_coset G H x = H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   369
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   370
by (rtac equalityI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   371
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   372
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   373
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   374
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   375
by (rtac (bin_op_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   376
by (rtac (carrier_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   377
val l1 = q3 RS (subgroup_def RS apply_def) RS conjunct2;
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   378
by (rtac (l1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   379
by (stac carrier_conv 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   380
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   381
by (stac carrier_conv 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   382
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   383
(* first <= finished *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   384
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   385
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   386
by (res_inst_tac [("x","bin_op G xa (invers  G x)")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   387
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   388
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   389
by (rtac q2 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   390
val l3 = q3 RS (subgroup_def RS apply_def) RS conjunct1;
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   391
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   392
by (rtac l3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   393
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   394
by (rtac invers_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   395
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   396
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   397
by (stac invers_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   398
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   399
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   400
by (rtac unity_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   401
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   402
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   403
by (rtac l3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   404
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   405
by (rtac (bin_op_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   406
by (rtac (carrier_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   407
by (rtac (l1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   408
by (rewrite_goals_tac [carrier_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   409
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   410
by (rtac (invers_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   411
by (rtac (carrier_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   412
by (rtac (l1 RS invers_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   413
by (stac carrier_conv 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   414
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   415
qed "coset_join2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   416
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   417
val [q1,q2,q3,q4,q5] = goal (the_context()) "[| G \\<in> Group; x\\<in>carrier G; y\\<in>carrier G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   418
\ M <= carrier G; r_coset G M (bin_op G x (invers G y)) = M |] ==> r_coset G M x = r_coset G M y";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   419
by (res_inst_tac [("P","%z. r_coset G M x = r_coset G z y")] (q5 RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   420
by (stac coset_mul_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   421
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   422
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   423
by (rtac bin_op_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   424
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   425
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   426
by (rtac (q3 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   427
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   428
by (rtac (q1 RS bin_op_assoc RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   429
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   430
by (rtac (q3 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   431
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   432
by (rtac (q1 RS invers_ax2 RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   433
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   434
by (rtac (q1 RS unity_ax2 RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   435
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   436
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   437
qed "coset_mul_invers1";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   438
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   439
val [q1,q2,q3,q4,q5] = goal (the_context()) "[| G \\<in> Group; x\\<in>carrier G; y\\<in>carrier G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   440
\ M <= carrier G; r_coset G M x = r_coset G M y|] ==> r_coset G M (bin_op G x (invers G y)) = M ";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   441
by (rtac (coset_mul_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   442
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   443
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   444
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   445
by (rtac (q3 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   446
by (stac q5 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   447
by (rtac (q1 RS coset_mul_assoc RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   448
by (rtac q4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   449
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   450
by (rtac (q3 RS (q1 RS invers_closed)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   451
by (stac invers_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   452
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   453
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   454
by (rtac (q4 RS (q1 RS coset_mul_unity)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   455
qed "coset_mul_invers2";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   456
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   457
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   458
val [q1,q2] = goal (the_context()) "[|G\\<in>Group; H <<= G|] ==> unity G\\<in>H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   459
by (rtac (q2 RSN(2,mp)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   460
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   461
by (dtac (subgroup_def RS apply_def RS conjunct2) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   462
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   463
by (dtac CollectD_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   464
by (Fast_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   465
qed "SG_unity";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   466
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   467
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   468
val [q1,q2,q3,q4] = goal (the_context()) "[| G \\<in> Group; x\\<in>carrier G; H <<= G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   469
\               r_coset G H x = H |] ==> x\\<in>H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   470
by (rtac (q4 RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   471
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   472
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   473
by (res_inst_tac [("x", "unity G")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   474
by (rtac unity_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   475
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   476
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   477
by (rtac SG_unity 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   478
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   479
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   480
qed "coset_join1";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   481
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   482
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   483
val [q1,q2,q3] = goal (the_context()) "[| G \\<in> Group; finite(carrier G); H <<= G |] ==> 0 < card(H)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   484
by (rtac zero_less_card_empty 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   485
by (rtac ExEl_NotEmpty 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   486
by (res_inst_tac [("x","unity G")] exI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   487
by (rtac finite_subset 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   488
by (rtac (q3 RS (subgroup_def RS apply_def) RS conjunct1) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   489
by (rtac q2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   490
by (rtac SG_unity 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   491
by (rtac q1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   492
by (rtac q3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   493
qed "SG_card1";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   494
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   495
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   496
(* subgroupI: a characterization of subgroups *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   497
val [p1,p2,p3,p4,p5] = goal (the_context()) "[|G\\<in>Group; H <= carrier G; H \\<noteq> {}; \\<forall> a \\<in> H. invers G a\\<in>H;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   498
\          \\<forall> a\\<in>H. \\<forall> b\\<in>H. bin_op G a b\\<in>H|] ==> H <<= G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   499
by (rewtac subgroup_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   500
by (rtac conjI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   501
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   502
by (rewtac Group_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   503
by (rtac CollectI_prod4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   504
by (rtac conjI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   505
by (rtac conjI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   506
by (rtac conjI 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   507
by (rtac funcsetI2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   508
by (rtac p5 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   509
by (rtac funcsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   510
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   511
by (rtac exE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   512
by (rtac (p3 RS NotEmpty_ExEl) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   513
by (rtac (invers_ax1 RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   514
by (etac (p2 RS subsetD) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   515
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   516
by (rtac (p5 RS bspec RS bspec) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   517
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   518
by (etac (p4 RS bspec) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   519
by (REPEAT (rtac ballI 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   520
by (rtac conjI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   521
by (rtac conjI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   522
by (rtac (p1 RS bin_op_assoc) 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   523
by (REPEAT (etac (p2 RS subsetD) 3));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   524
by (rtac (p1 RS unity_ax1) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   525
by (etac (p2 RS subsetD) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   526
by (rtac (p1 RS invers_ax2) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   527
by (etac (p2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   528
qed "subgroupI";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   529
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   530
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   531
val [p1,p2,p3,p4,p5] = goal (the_context()) "[| G\\<in>Group; x\\<in>carrier G; y\\<in>carrier G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   532
\ z\\<in>carrier G; bin_op G y x = bin_op G z x|] ==> y = z";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   533
by (res_inst_tac [("P","%r. r = z")] (unity_ax2 RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   534
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   535
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   536
by (res_inst_tac [("P","%r. bin_op G y r = z")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   537
by (res_inst_tac [("a","x")] invers_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   538
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   539
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   540
by (rtac (bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   541
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   542
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   543
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   544
by (rtac invers_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   545
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   546
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   547
by (stac p5 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   548
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   549
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   550
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   551
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   552
by (rtac invers_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   553
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   554
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   555
by (stac invers_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   556
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   557
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   558
by (stac unity_ax2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   559
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   560
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   561
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   562
qed "right_cancellation";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   563
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   564
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   565
(* further general theorems necessary for Lagrange *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   566
val [p1,p2] = goal (the_context()) "[| G \\<in> Group; H <<= G|]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   567
\           ==> \\<Union> (set_r_cos G H) = carrier G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   568
by (rtac equalityI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   569
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   570
by (etac UnionE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   571
by (SELECT_GOAL (rewtac set_r_cos_def) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   572
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   573
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   574
by (SELECT_GOAL (rewtac r_coset_def) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   575
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   576
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   577
by (etac ssubst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   578
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   579
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   580
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   581
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   582
by (rtac (p1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   583
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   584
by (rtac subsetD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   585
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   586
by (rtac (p2 RS (subgroup_def RS apply_def) RS conjunct1) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   587
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   588
by (res_inst_tac [("X","r_coset G H x")] UnionI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   589
by (rewtac set_r_cos_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   590
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   591
by (rtac bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   592
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   593
by (rtac refl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   594
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   595
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   596
by (rtac bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   597
by (etac (p1 RS unity_ax1) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   598
by (rtac (p2 RS (p1 RS SG_unity)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   599
qed "set_r_cos_part_G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   600
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   601
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   602
val [p1,p2,p3] = goal (the_context()) "[| G \\<in> Group; H <= carrier G; a\\<in>carrier G |]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   603
\           ==> r_coset G H a <= carrier G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   604
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   605
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   606
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   607
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   608
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   609
by (rtac (p1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   610
by (etac (p2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   611
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   612
qed "rcosetGHa_subset_G";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   613
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   614
val [p1,p2,p3] = goal (the_context()) "[|G\\<in>Group; H <= carrier G; finite(carrier G) |]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   615
\              ==> \\<forall> c \\<in> set_r_cos G H. card c = card H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   616
by (rtac ballI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   617
by (rewtac set_r_cos_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   618
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   619
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   620
by (etac ssubst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   621
by (rtac card_bij 1);  (*use card_bij_eq??*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   622
by (rtac finite_subset 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   623
by (rtac p3 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   624
by (etac (p2 RS (p1 RS rcosetGHa_subset_G)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   625
by (rtac (p3 RS (p2 RS finite_subset)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   626
(* injective maps *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   627
by (res_inst_tac [("x","%y. bin_op G y (invers G a)")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   628
by (SELECT_GOAL (rewtac funcset_def) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   629
by (rtac CollectI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   630
by (rtac ballI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   631
by (SELECT_GOAL (rewtac r_coset_def) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   632
by (dtac CollectD 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   633
by (etac bexE 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   634
by (etac subst 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   635
by (rtac (p1 RS bin_op_assoc RS ssubst) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   636
by (etac (p2 RS subsetD) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   637
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   638
by (etac (p1 RS invers_closed) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   639
by (etac (p1 RS invers_ax1 RS ssubst) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   640
by (rtac (p1 RS unity_ax2 RS ssubst) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   641
by (assume_tac 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   642
by (etac (p2 RS subsetD) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   643
by (rtac inj_onI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   644
by (rtac (p1 RS right_cancellation) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   645
by (rtac (p1 RS invers_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   646
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   647
by (rtac (rcosetGHa_subset_G RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   648
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   649
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   650
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   651
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   652
by (rtac (rcosetGHa_subset_G RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   653
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   654
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   655
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   656
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   657
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   658
(* f finished *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   659
by (res_inst_tac [("x","%y. bin_op G y a")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   660
by (SELECT_GOAL (rewtac funcset_def) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   661
by (rtac CollectI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   662
by (rtac ballI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   663
by (SELECT_GOAL (rewtac r_coset_def) 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   664
by (rtac CollectI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   665
by (rtac bexI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   666
by (rtac refl 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   667
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   668
by (rtac inj_onI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   669
by (rtac (p1 RS right_cancellation) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   670
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   671
by (etac (p2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   672
by (etac (p2 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   673
by (assume_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   674
qed "card_cosets_equal";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   675
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   676
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   677
val prems = goal (the_context()) "[| G \\<in> Group; x \\<in> carrier G; y \\<in> carrier G;\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   678
\ z\\<in>carrier G; bin_op G x y = z|] ==> y = bin_op G (invers G x) z";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   679
by (res_inst_tac [("x","x")] left_cancellation 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   680
by (REPEAT (ares_tac prems 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   681
by (rtac bin_op_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   682
by (rtac invers_closed 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   683
by (REPEAT (ares_tac prems 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   684
by (rtac (bin_op_assoc RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   685
by (rtac invers_closed 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   686
by (REPEAT (ares_tac prems 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   687
by (stac invers_ax1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   688
by (stac unity_ax1 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   689
by (REPEAT (ares_tac prems 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   690
qed "transpose_invers";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   691
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   692
val [p1,p2,p3,p4] = goal (the_context()) "[| G \\<in> Group; H <<= G; h1 \\<in> H; h2 \\<in> H|]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   693
\   ==> bin_op G h1 h2\\<in>H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   694
by (rtac (bin_op_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   695
val l1 = (p2 RS (subgroup_def RS apply_def) RS conjunct2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   696
by (rtac (carrier_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   697
by (rtac (l1 RS bin_op_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   698
by (rewrite_goals_tac [carrier_conv RS eq_reflection]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   699
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   700
by (rtac p4 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   701
qed "SG_bin_op_closed";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   702
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   703
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   704
val [p1,p2,p3] = goal (the_context()) "[| G \\<in> Group; H <<= G; h1 \\<in> H|]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   705
\   ==> invers G h1\\<in>H";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   706
by (rtac (invers_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   707
by (rtac (carrier_conv RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   708
val l1 = (p2 RS (subgroup_def RS apply_def) RS conjunct2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   709
by (rtac (l1 RS invers_closed) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   710
by (stac carrier_conv 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   711
by (rtac p3 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   712
qed "SG_invers_closed";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   713
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   714
val [p1] = goal (the_context()) "x = y ==> bin_op G z x = bin_op G z y";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   715
by (res_inst_tac [("t","y")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   716
by (rtac refl 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   717
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   718
qed "left_extend";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   719
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   720
val [p1,p2] = goal (the_context()) "[| G \\<in> Group; H <<= G |]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   721
\ ==> \\<forall> c1 \\<in> set_r_cos G H. \\<forall> c2 \\<in> set_r_cos G H. c1 \\<noteq> c2 --> c1 \\<inter> c2 = {}";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   722
val l1 = (p2 RS (subgroup_def RS apply_def) RS conjunct1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   723
val l2 =  l1 RS (p1 RS rcosetGHa_subset_G) RS subsetD;
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   724
by (rtac ballI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   725
by (rtac ballI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   726
by (rtac impI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   727
by (rtac notnotD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   728
by (etac contrapos_nn 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   729
by (dtac NotEmpty_ExEl 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   730
by (etac exE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   731
by (ftac IntD1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   732
by (dtac IntD2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   733
by (rewtac set_r_cos_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   734
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   735
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   736
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   737
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   738
by (hyp_subst_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   739
by (hyp_subst_tac 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   740
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   741
(* Level 17 *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   742
by (rtac equalityI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   743
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   744
by (rtac subsetI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   745
by (rtac CollectI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   746
by (rtac CollectI 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   747
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   748
by (dtac CollectD 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   749
by (ftac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   750
by (ftac CollectD 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   751
by (dres_inst_tac [("a","xa")] CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   752
by (dres_inst_tac [("a","xa")] CollectD 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   753
by (fold_goals_tac [r_coset_def]);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   754
by (REPEAT (etac bexE 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   755
by (REPEAT (etac bexE 2));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   756
(* first solve 1 *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   757
by (res_inst_tac [("x","bin_op G hb (bin_op G (invers G h) ha)")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   758
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   759
val G_closed_rules = [(p1 RS invers_closed),(p1 RS bin_op_closed),(p2 RS (p1 RS SG_invers_closed))
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   760
                     ,(p2 RS (p1 RS SG_bin_op_closed)),(l1 RS subsetD)];
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   761
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   762
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   763
by (REPEAT (ares_tac G_closed_rules 2));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   764
by (eres_inst_tac [("t","xa")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   765
by (rtac left_extend 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   766
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   767
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   768
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   769
by (eres_inst_tac [("t","bin_op G ha aa")] ssubst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   770
by (rtac (p1 RS transpose_invers RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   771
by (rtac refl 5);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   772
by (rtac l2 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   773
by (assume_tac 4);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   774
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   775
(* second thing, level 47 *)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   776
by (res_inst_tac [("x","bin_op G hb (bin_op G (invers G ha) h)")] bexI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   777
by (REPEAT (ares_tac G_closed_rules 2));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   778
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   779
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   780
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   781
by (eres_inst_tac [("t","xa")] subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   782
by (rtac left_extend 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   783
by (stac bin_op_assoc 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   784
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   785
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   786
by (etac ssubst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   787
by (rtac (p1 RS transpose_invers RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   788
by (rtac refl 5);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   789
by (rtac l2 3);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   790
by (assume_tac 4);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   791
by (REPEAT (ares_tac G_closed_rules 1));
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   792
qed "r_coset_disjunct";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   793
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   794
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   795
val [p1,p2] = goal (the_context()) "[| G \\<in> Group; H <<= G |]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   796
\              ==> set_r_cos G H <= Pow( carrier G)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   797
by (rewtac set_r_cos_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   798
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   799
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   800
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   801
by (etac ssubst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   802
by (rtac PowI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   803
by (rtac subsetI 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   804
by (rewtac r_coset_def);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   805
by (dtac CollectD 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   806
by (etac bexE 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   807
by (etac subst 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   808
by (rtac bin_op_closed 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   809
by (rtac p1 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   810
by (assume_tac 2);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   811
by (etac (p2 RS (subgroup_def RS apply_def) RS conjunct1 RS subsetD) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   812
qed "set_r_cos_subset_PowG";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   813
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   814
val [p1,p2,p3] = goal (the_context()) "[| G \\<in> Group; finite(carrier G); H <<= G |]\
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   815
\  ==> card(set_r_cos G H) * card(H) = order(G)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   816
by (simp_tac (simpset() addsimps [order_eq]) 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   817
by (rtac (p3 RS (p1 RS set_r_cos_part_G) RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   818
by (rtac (mult_commute RS subst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   819
by (rtac card_partition 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   820
by (rtac finite_subset 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   821
by (rtac (p3 RS (p1 RS set_r_cos_subset_PowG)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   822
by (simp_tac (simpset() addsimps [finite_Pow_iff]) 1);  
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   823
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   824
by (rtac (p3 RS (p1 RS set_r_cos_part_G) RS ssubst) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   825
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   826
val l1 = (p3 RS (subgroup_def RS apply_def) RS conjunct1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   827
by (rtac (l1 RS (p1 RS card_cosets_equal)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   828
by (rtac p2 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   829
by (rtac (p3 RS (p1 RS r_coset_disjunct)) 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   830
qed "Lagrange"; (*original version: closer to locales??*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   831
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   832
  (*version using "Goal" but no locales...
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   833
  Goal "[| G \\<in> Group; finite(carrier G); H <<= G |] \
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   834
  \     ==> card(set_r_cos G H) * card(H) = order(G)";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   835
  by (asm_simp_tac (simpset() addsimps [order_eq, set_r_cos_part_G RS sym]) 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   836
  by (stac mult_commute 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   837
  by (rtac card_partition 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   838
  by (rtac finite_subset 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   839
  by (rtac set_r_cos_subset_PowG 1);
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   840
  by (assume_tac 1); by (assume_tac 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   841
  by (simp_tac (simpset() addsimps [finite_Pow_iff]) 1);  
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   842
  by (asm_full_simp_tac (simpset() addsimps [set_r_cos_part_G]) 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   843
  by (rtac card_cosets_equal 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   844
  by (rtac r_coset_disjunct 4); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   845
  by Auto_tac;  
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   846
  by (asm_full_simp_tac (simpset() addsimps [subgroup_def]) 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   847
  by (blast_tac (claset() addIs []) 1); 
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   848
  qed "Lagrange";
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
   849
  *)