src/HOL/Algebra/Sylow.thy
author paulson <lp15@cam.ac.uk>
Thu Feb 25 16:49:00 2016 +0000 (2016-02-25)
changeset 62410 2fc7a8d9c529
parent 61382 efac889fccbc
child 63167 0909deb8059b
permissions -rw-r--r--
partial tidy-up of Sylow's theorem
wenzelm@14706
     1
(*  Title:      HOL/Algebra/Sylow.thy
paulson@13870
     2
    Author:     Florian Kammueller, with new proofs by L C Paulson
paulson@13870
     3
*)
paulson@13870
     4
wenzelm@35849
     5
theory Sylow
wenzelm@35849
     6
imports Coset Exponent
wenzelm@35849
     7
begin
paulson@13870
     8
wenzelm@61382
     9
text \<open>
wenzelm@58622
    10
  See also @{cite "Kammueller-Paulson:1999"}.
wenzelm@61382
    11
\<close>
wenzelm@14706
    12
wenzelm@61382
    13
text\<open>The combinatorial argument is in theory Exponent\<close>
paulson@13870
    14
lp15@62410
    15
lemma le_extend_mult: 
lp15@62410
    16
  fixes c::nat shows "\<lbrakk>0 < c; a \<le> b\<rbrakk> \<Longrightarrow> a \<le> b * c"
lp15@62410
    17
by (metis divisors_zero dvd_triv_left leI less_le_trans nat_dvd_not_less zero_less_iff_neq_zero)
lp15@62410
    18
paulson@14747
    19
locale sylow = group +
paulson@13870
    20
  fixes p and a and m and calM and RelM
nipkow@16663
    21
  assumes prime_p:   "prime p"
paulson@13870
    22
      and order_G:   "order(G) = (p^a) * m"
paulson@13870
    23
      and finite_G [iff]:  "finite (carrier G)"
paulson@14747
    24
  defines "calM == {s. s \<subseteq> carrier(G) & card(s) = p^a}"
paulson@13870
    25
      and "RelM == {(N1,N2). N1 \<in> calM & N2 \<in> calM &
wenzelm@14666
    26
                             (\<exists>g \<in> carrier(G). N1 = (N2 #> g) )}"
lp15@62410
    27
begin
paulson@13870
    28
lp15@62410
    29
lemma RelM_refl_on: "refl_on calM RelM"
nipkow@30198
    30
apply (auto simp add: refl_on_def RelM_def calM_def)
wenzelm@14666
    31
apply (blast intro!: coset_mult_one [symmetric])
paulson@13870
    32
done
paulson@13870
    33
lp15@62410
    34
lemma RelM_sym: "sym RelM"
paulson@13870
    35
proof (unfold sym_def RelM_def, clarify)
paulson@13870
    36
  fix y g
paulson@13870
    37
  assume   "y \<in> calM"
paulson@13870
    38
    and g: "g \<in> carrier G"
paulson@13870
    39
  hence "y = y #> g #> (inv g)" by (simp add: coset_mult_assoc calM_def)
wenzelm@41541
    40
  thus "\<exists>g'\<in>carrier G. y = y #> g #> g'" by (blast intro: g)
paulson@13870
    41
qed
paulson@13870
    42
lp15@62410
    43
lemma RelM_trans: "trans RelM"
wenzelm@14666
    44
by (auto simp add: trans_def RelM_def calM_def coset_mult_assoc)
paulson@13870
    45
lp15@62410
    46
lemma RelM_equiv: "equiv calM RelM"
paulson@13870
    47
apply (unfold equiv_def)
nipkow@30198
    48
apply (blast intro: RelM_refl_on RelM_sym RelM_trans)
paulson@13870
    49
done
paulson@13870
    50
lp15@62410
    51
lemma M_subset_calM_prep: "M' \<in> calM // RelM  ==> M' \<subseteq> calM"
paulson@13870
    52
apply (unfold RelM_def)
paulson@13870
    53
apply (blast elim!: quotientE)
paulson@13870
    54
done
paulson@13870
    55
lp15@62410
    56
end
ballarin@20318
    57
wenzelm@61382
    58
subsection\<open>Main Part of the Proof\<close>
paulson@13870
    59
paulson@13870
    60
locale sylow_central = sylow +
paulson@13870
    61
  fixes H and M1 and M
paulson@13870
    62
  assumes M_in_quot:  "M \<in> calM // RelM"
paulson@13870
    63
      and not_dvd_M:  "~(p ^ Suc(exponent p m) dvd card(M))"
paulson@13870
    64
      and M1_in_M:    "M1 \<in> M"
paulson@13870
    65
  defines "H == {g. g\<in>carrier G & M1 #> g = M1}"
paulson@13870
    66
lp15@62410
    67
begin
paulson@13870
    68
lp15@62410
    69
lemma M_subset_calM: "M \<subseteq> calM"
lp15@62410
    70
  by (rule M_in_quot [THEN M_subset_calM_prep])
paulson@13870
    71
lp15@62410
    72
lemma card_M1: "card(M1) = p^a"
lp15@62410
    73
  using M1_in_M M_subset_calM calM_def by blast
lp15@62410
    74
 
lp15@62410
    75
lemma exists_x_in_M1: "\<exists>x. x \<in> M1"
lp15@62410
    76
using prime_p [THEN prime_gt_Suc_0_nat] card_M1
lp15@62410
    77
by (metis Suc_lessD card_eq_0_iff empty_subsetI equalityI gr_implies_not0 nat_zero_less_power_iff subsetI)
paulson@13870
    78
lp15@62410
    79
lemma M1_subset_G [simp]: "M1 \<subseteq> carrier G"
lp15@62410
    80
  using M1_in_M  M_subset_calM calM_def mem_Collect_eq subsetCE by blast
paulson@13870
    81
lp15@62410
    82
lemma M1_inj_H: "\<exists>f \<in> H\<rightarrow>M1. inj_on f H"
lp15@62410
    83
proof -
lp15@62410
    84
  from exists_x_in_M1 obtain m1 where m1M: "m1 \<in> M1"..
lp15@62410
    85
  have m1G: "m1 \<in> carrier G" by (simp add: m1M M1_subset_G [THEN subsetD])
lp15@62410
    86
  show ?thesis
lp15@62410
    87
  proof
lp15@62410
    88
    show "inj_on (\<lambda>z\<in>H. m1 \<otimes> z) H"
lp15@62410
    89
      by (simp add: inj_on_def l_cancel [of m1 x y, THEN iffD1] H_def m1G)
lp15@62410
    90
    show "restrict (op \<otimes> m1) H \<in> H \<rightarrow> M1"
lp15@62410
    91
    proof (rule restrictI)
lp15@62410
    92
      fix z assume zH: "z \<in> H"
lp15@62410
    93
      show "m1 \<otimes> z \<in> M1"
lp15@62410
    94
      proof -
lp15@62410
    95
        from zH
lp15@62410
    96
        have zG: "z \<in> carrier G" and M1zeq: "M1 #> z = M1"
lp15@62410
    97
          by (auto simp add: H_def)
lp15@62410
    98
        show ?thesis
lp15@62410
    99
          by (rule subst [OF M1zeq], simp add: m1M zG rcosI)
paulson@13870
   100
      qed
paulson@13870
   101
    qed
paulson@13870
   102
  qed
lp15@62410
   103
qed
paulson@13870
   104
lp15@62410
   105
end
paulson@13870
   106
wenzelm@61382
   107
subsection\<open>Discharging the Assumptions of @{text sylow_central}\<close>
paulson@13870
   108
lp15@62410
   109
context sylow
lp15@62410
   110
begin
lp15@62410
   111
lp15@62410
   112
lemma EmptyNotInEquivSet: "{} \<notin> calM // RelM"
paulson@13870
   113
by (blast elim!: quotientE dest: RelM_equiv [THEN equiv_class_self])
paulson@13870
   114
lp15@62410
   115
lemma existsM1inM: "M \<in> calM // RelM ==> \<exists>M1. M1 \<in> M"
lp15@62410
   116
  using RelM_equiv equiv_Eps_in by blast
paulson@13870
   117
lp15@62410
   118
lemma zero_less_o_G: "0 < order(G)"
lp15@62410
   119
  by (simp add: order_def card_gt_0_iff carrier_not_empty)
paulson@13870
   120
lp15@62410
   121
lemma zero_less_m: "m > 0"
lp15@62410
   122
  using zero_less_o_G by (simp add: order_G)
paulson@13870
   123
lp15@62410
   124
lemma card_calM: "card(calM) = (p^a) * m choose p^a"
paulson@13870
   125
by (simp add: calM_def n_subsets order_G [symmetric] order_def)
paulson@13870
   126
lp15@62410
   127
lemma zero_less_card_calM: "card calM > 0"
paulson@13870
   128
by (simp add: card_calM zero_less_binomial le_extend_mult zero_less_m)
paulson@13870
   129
lp15@62410
   130
lemma max_p_div_calM:
paulson@13870
   131
     "~ (p ^ Suc(exponent p m) dvd card(calM))"
lp15@62410
   132
proof -
lp15@62410
   133
  have "exponent p m = exponent p (card calM)"
lp15@62410
   134
    by (simp add: card_calM const_p_fac zero_less_m)
lp15@62410
   135
  then show ?thesis
lp15@62410
   136
    by (metis Suc_n_not_le_n exponent_ge prime_p zero_less_card_calM)
lp15@62410
   137
qed
paulson@13870
   138
lp15@62410
   139
lemma finite_calM: "finite calM"
lp15@62410
   140
  unfolding calM_def
lp15@62410
   141
  by (rule_tac B = "Pow (carrier G) " in finite_subset) auto
paulson@13870
   142
lp15@62410
   143
lemma lemma_A1:
paulson@13870
   144
     "\<exists>M \<in> calM // RelM. ~ (p ^ Suc(exponent p m) dvd card(M))"
lp15@62410
   145
  using RelM_equiv equiv_imp_dvd_card finite_calM max_p_div_calM by blast
paulson@13870
   146
lp15@62410
   147
end
paulson@13870
   148
wenzelm@61382
   149
subsubsection\<open>Introduction and Destruct Rules for @{term H}\<close>
paulson@13870
   150
paulson@13870
   151
lemma (in sylow_central) H_I: "[|g \<in> carrier G; M1 #> g = M1|] ==> g \<in> H"
paulson@13870
   152
by (simp add: H_def)
paulson@13870
   153
paulson@13870
   154
lemma (in sylow_central) H_into_carrier_G: "x \<in> H ==> x \<in> carrier G"
paulson@13870
   155
by (simp add: H_def)
paulson@13870
   156
paulson@13870
   157
lemma (in sylow_central) in_H_imp_eq: "g : H ==> M1 #> g = M1"
paulson@13870
   158
by (simp add: H_def)
paulson@13870
   159
paulson@13870
   160
lemma (in sylow_central) H_m_closed: "[| x\<in>H; y\<in>H|] ==> x \<otimes> y \<in> H"
paulson@13870
   161
apply (unfold H_def)
wenzelm@41541
   162
apply (simp add: coset_mult_assoc [symmetric])
paulson@13870
   163
done
paulson@13870
   164
paulson@13870
   165
lemma (in sylow_central) H_not_empty: "H \<noteq> {}"
paulson@13870
   166
apply (simp add: H_def)
paulson@13870
   167
apply (rule exI [of _ \<one>], simp)
paulson@13870
   168
done
paulson@13870
   169
paulson@13870
   170
lemma (in sylow_central) H_is_subgroup: "subgroup H G"
paulson@13870
   171
apply (rule subgroupI)
paulson@13870
   172
apply (rule subsetI)
paulson@13870
   173
apply (erule H_into_carrier_G)
paulson@13870
   174
apply (rule H_not_empty)
paulson@13870
   175
apply (simp add: H_def, clarify)
wenzelm@59807
   176
apply (erule_tac P = "%z. lhs(z) = M1" for lhs in subst)
paulson@13870
   177
apply (simp add: coset_mult_assoc )
paulson@13870
   178
apply (blast intro: H_m_closed)
paulson@13870
   179
done
paulson@13870
   180
paulson@13870
   181
paulson@13870
   182
lemma (in sylow_central) rcosetGM1g_subset_G:
paulson@13870
   183
     "[| g \<in> carrier G; x \<in> M1 #>  g |] ==> x \<in> carrier G"
paulson@13870
   184
by (blast intro: M1_subset_G [THEN r_coset_subset_G, THEN subsetD])
paulson@13870
   185
paulson@13870
   186
lemma (in sylow_central) finite_M1: "finite M1"
paulson@13870
   187
by (rule finite_subset [OF M1_subset_G finite_G])
paulson@13870
   188
paulson@13870
   189
lemma (in sylow_central) finite_rcosetGM1g: "g\<in>carrier G ==> finite (M1 #> g)"
lp15@62410
   190
  using rcosetGM1g_subset_G finite_G M1_subset_G cosets_finite rcosetsI by blast
paulson@13870
   191
paulson@13870
   192
lemma (in sylow_central) M1_cardeq_rcosetGM1g:
paulson@13870
   193
     "g \<in> carrier G ==> card(M1 #> g) = card(M1)"
wenzelm@41541
   194
by (simp (no_asm_simp) add: card_cosets_equal rcosetsI)
paulson@13870
   195
paulson@13870
   196
lemma (in sylow_central) M1_RelM_rcosetGM1g:
paulson@13870
   197
     "g \<in> carrier G ==> (M1, M1 #> g) \<in> RelM"
lp15@55157
   198
apply (simp add: RelM_def calM_def card_M1)
paulson@13870
   199
apply (rule conjI)
paulson@13870
   200
 apply (blast intro: rcosetGM1g_subset_G)
lp15@55157
   201
apply (simp add: card_M1 M1_cardeq_rcosetGM1g)
lp15@55157
   202
apply (metis M1_subset_G coset_mult_assoc coset_mult_one r_inv_ex)
paulson@13870
   203
done
paulson@13870
   204
paulson@13870
   205
wenzelm@61382
   206
subsection\<open>Equal Cardinalities of @{term M} and the Set of Cosets\<close>
paulson@13870
   207
wenzelm@61382
   208
text\<open>Injections between @{term M} and @{term "rcosets\<^bsub>G\<^esub> H"} show that
wenzelm@61382
   209
 their cardinalities are equal.\<close>
paulson@13870
   210
wenzelm@14666
   211
lemma ElemClassEquiv:
paulson@14963
   212
     "[| equiv A r; C \<in> A // r |] ==> \<forall>x \<in> C. \<forall>y \<in> C. (x,y)\<in>r"
paulson@14963
   213
by (unfold equiv_def quotient_def sym_def trans_def, blast)
paulson@13870
   214
paulson@13870
   215
lemma (in sylow_central) M_elem_map:
paulson@13870
   216
     "M2 \<in> M ==> \<exists>g. g \<in> carrier G & M1 #> g = M2"
paulson@13870
   217
apply (cut_tac M1_in_M M_in_quot [THEN RelM_equiv [THEN ElemClassEquiv]])
paulson@13870
   218
apply (simp add: RelM_def)
paulson@13870
   219
apply (blast dest!: bspec)
paulson@13870
   220
done
paulson@13870
   221
wenzelm@14666
   222
lemmas (in sylow_central) M_elem_map_carrier =
wenzelm@14666
   223
        M_elem_map [THEN someI_ex, THEN conjunct1]
paulson@13870
   224
paulson@13870
   225
lemmas (in sylow_central) M_elem_map_eq =
wenzelm@14666
   226
        M_elem_map [THEN someI_ex, THEN conjunct2]
paulson@13870
   227
paulson@14963
   228
lemma (in sylow_central) M_funcset_rcosets_H:
paulson@14963
   229
     "(%x:M. H #> (SOME g. g \<in> carrier G & M1 #> g = x)) \<in> M \<rightarrow> rcosets H"
lp15@55157
   230
  by (metis (lifting) H_is_subgroup M_elem_map_carrier rcosetsI restrictI subgroup_imp_subset)
paulson@13870
   231
lp15@62410
   232
lemma (in sylow_central) inj_M_GmodH: "\<exists>f \<in> M \<rightarrow> rcosets H. inj_on f M"
paulson@13870
   233
apply (rule bexI)
paulson@14963
   234
apply (rule_tac [2] M_funcset_rcosets_H)
paulson@13870
   235
apply (rule inj_onI, simp)
paulson@13870
   236
apply (rule trans [OF _ M_elem_map_eq])
paulson@13870
   237
prefer 2 apply assumption
paulson@13870
   238
apply (rule M_elem_map_eq [symmetric, THEN trans], assumption)
paulson@13870
   239
apply (rule coset_mult_inv1)
paulson@13870
   240
apply (erule_tac [2] M_elem_map_carrier)+
paulson@13870
   241
apply (rule_tac [2] M1_subset_G)
paulson@13870
   242
apply (rule coset_join1 [THEN in_H_imp_eq])
paulson@13870
   243
apply (rule_tac [3] H_is_subgroup)
wenzelm@41541
   244
prefer 2 apply (blast intro: M_elem_map_carrier)
berghofe@26806
   245
apply (simp add: coset_mult_inv2 H_def M_elem_map_carrier subset_eq)
paulson@13870
   246
done
paulson@13870
   247
paulson@13870
   248
wenzelm@61382
   249
subsubsection\<open>The Opposite Injection\<close>
paulson@13870
   250
paulson@13870
   251
lemma (in sylow_central) H_elem_map:
paulson@14963
   252
     "H1 \<in> rcosets H ==> \<exists>g. g \<in> carrier G & H #> g = H1"
paulson@14963
   253
by (auto simp add: RCOSETS_def)
paulson@13870
   254
wenzelm@14666
   255
lemmas (in sylow_central) H_elem_map_carrier =
wenzelm@14666
   256
        H_elem_map [THEN someI_ex, THEN conjunct1]
paulson@13870
   257
paulson@13870
   258
lemmas (in sylow_central) H_elem_map_eq =
wenzelm@14666
   259
        H_elem_map [THEN someI_ex, THEN conjunct2]
paulson@13870
   260
paulson@14963
   261
lemma (in sylow_central) rcosets_H_funcset_M:
paulson@14963
   262
  "(\<lambda>C \<in> rcosets H. M1 #> (@g. g \<in> carrier G \<and> H #> g = C)) \<in> rcosets H \<rightarrow> M"
paulson@14963
   263
apply (simp add: RCOSETS_def)
paulson@13870
   264
apply (fast intro: someI2
lp15@55157
   265
            intro!: M1_in_M in_quotient_imp_closed [OF RelM_equiv M_in_quot _  M1_RelM_rcosetGM1g])
paulson@13870
   266
done
paulson@13870
   267
wenzelm@61382
   268
text\<open>close to a duplicate of @{text inj_M_GmodH}\<close>
paulson@13870
   269
lemma (in sylow_central) inj_GmodH_M:
paulson@14963
   270
     "\<exists>g \<in> rcosets H\<rightarrow>M. inj_on g (rcosets H)"
paulson@13870
   271
apply (rule bexI)
paulson@14963
   272
apply (rule_tac [2] rcosets_H_funcset_M)
paulson@13870
   273
apply (rule inj_onI)
paulson@13870
   274
apply (simp)
paulson@13870
   275
apply (rule trans [OF _ H_elem_map_eq])
paulson@13870
   276
prefer 2 apply assumption
paulson@13870
   277
apply (rule H_elem_map_eq [symmetric, THEN trans], assumption)
paulson@13870
   278
apply (rule coset_mult_inv1)
paulson@13870
   279
apply (erule_tac [2] H_elem_map_carrier)+
paulson@13870
   280
apply (rule_tac [2] H_is_subgroup [THEN subgroup.subset])
paulson@13870
   281
apply (rule coset_join2)
wenzelm@41541
   282
apply (blast intro: H_elem_map_carrier)
wenzelm@14666
   283
apply (rule H_is_subgroup)
wenzelm@41541
   284
apply (simp add: H_I coset_mult_inv2 H_elem_map_carrier)
paulson@13870
   285
done
paulson@13870
   286
paulson@14747
   287
lemma (in sylow_central) calM_subset_PowG: "calM \<subseteq> Pow(carrier G)"
paulson@13870
   288
by (auto simp add: calM_def)
paulson@13870
   289
paulson@13870
   290
paulson@13870
   291
lemma (in sylow_central) finite_M: "finite M"
lp15@55157
   292
by (metis M_subset_calM finite_calM rev_finite_subset)
paulson@13870
   293
paulson@14963
   294
lemma (in sylow_central) cardMeqIndexH: "card(M) = card(rcosets H)"
wenzelm@14666
   295
apply (insert inj_M_GmodH inj_GmodH_M)
wenzelm@14666
   296
apply (blast intro: card_bij finite_M H_is_subgroup
paulson@14963
   297
             rcosets_subset_PowG [THEN finite_subset]
paulson@13870
   298
             finite_Pow_iff [THEN iffD2])
paulson@13870
   299
done
paulson@13870
   300
paulson@13870
   301
lemma (in sylow_central) index_lem: "card(M) * card(H) = order(G)"
paulson@13870
   302
by (simp add: cardMeqIndexH lagrange H_is_subgroup)
paulson@13870
   303
paulson@14747
   304
lemma (in sylow_central) lemma_leq1: "p^a \<le> card(H)"
paulson@13870
   305
apply (rule dvd_imp_le)
paulson@13870
   306
 apply (rule div_combine [OF prime_p not_dvd_M])
paulson@13870
   307
 prefer 2 apply (blast intro: subgroup.finite_imp_card_positive H_is_subgroup)
paulson@13870
   308
apply (simp add: index_lem order_G power_add mult_dvd_mono power_exponent_dvd
paulson@13870
   309
                 zero_less_m)
paulson@13870
   310
done
paulson@13870
   311
paulson@14747
   312
lemma (in sylow_central) lemma_leq2: "card(H) \<le> p^a"
paulson@13870
   313
apply (subst card_M1 [symmetric])
paulson@13870
   314
apply (cut_tac M1_inj_H)
wenzelm@14666
   315
apply (blast intro!: M1_subset_G intro:
paulson@13870
   316
             card_inj H_into_carrier_G finite_subset [OF _ finite_G])
paulson@13870
   317
done
paulson@13870
   318
paulson@13870
   319
lemma (in sylow_central) card_H_eq: "card(H) = p^a"
nipkow@33657
   320
by (blast intro: le_antisym lemma_leq1 lemma_leq2)
paulson@13870
   321
paulson@13870
   322
lemma (in sylow) sylow_thm: "\<exists>H. subgroup H G & card(H) = p^a"
wenzelm@14666
   323
apply (cut_tac lemma_A1, clarify)
wenzelm@14666
   324
apply (frule existsM1inM, clarify)
paulson@13870
   325
apply (subgoal_tac "sylow_central G p a m M1 M")
paulson@13870
   326
 apply (blast dest:  sylow_central.H_is_subgroup sylow_central.card_H_eq)
wenzelm@41541
   327
apply (simp add: sylow_central_def sylow_central_axioms_def sylow_axioms calM_def RelM_def)
paulson@13870
   328
done
paulson@13870
   329
wenzelm@61382
   330
text\<open>Needed because the locale's automatic definition refers to
wenzelm@14666
   331
   @{term "semigroup G"} and @{term "group_axioms G"} rather than
wenzelm@61382
   332
  simply to @{term "group G"}.\<close>
paulson@13870
   333
lemma sylow_eq: "sylow G p a m = (group G & sylow_axioms G p a m)"
paulson@13870
   334
by (simp add: sylow_def group_def)
paulson@13870
   335
ballarin@20318
   336
wenzelm@61382
   337
subsection \<open>Sylow's Theorem\<close>
ballarin@20318
   338
paulson@13870
   339
theorem sylow_thm:
nipkow@16663
   340
     "[| prime p;  group(G);  order(G) = (p^a) * m; finite (carrier G)|]
paulson@13870
   341
      ==> \<exists>H. subgroup H G & card(H) = p^a"
paulson@13870
   342
apply (rule sylow.sylow_thm [of G p a m])
wenzelm@14666
   343
apply (simp add: sylow_eq sylow_axioms_def)
paulson@13870
   344
done
paulson@13870
   345
paulson@13870
   346
end