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