src/HOL/Algebra/Coset.thy
author wenzelm
Tue, 11 Jul 2006 12:17:08 +0200
changeset 20083 717b1eb434f1
parent 19931 fb32b43e7f80
child 20318 0e0ea63fe768
permissions -rw-r--r--
removed obsolete mem_ix;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14706
71590b7733b7 tuned document;
wenzelm
parents: 14666
diff changeset
     1
(*  Title:      HOL/Algebra/Coset.thy
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     2
    ID:         $Id$
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     3
    Author:     Florian Kammueller, with new proofs by L C Paulson
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     4
*)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     5
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
     6
header{*Cosets and Quotient Groups*}
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     7
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 15120
diff changeset
     8
theory Coset imports Group Exponent begin
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
     9
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14530
diff changeset
    10
constdefs (structure G)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    11
  r_coset    :: "[_, 'a set, 'a] \<Rightarrow> 'a set"    (infixl "#>\<index>" 60)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    12
  "H #> a \<equiv> \<Union>h\<in>H. {h \<otimes> a}"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    13
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    14
  l_coset    :: "[_, 'a, 'a set] \<Rightarrow> 'a set"    (infixl "<#\<index>" 60)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    15
  "a <# H \<equiv> \<Union>h\<in>H. {a \<otimes> h}"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    16
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    17
  RCOSETS  :: "[_, 'a set] \<Rightarrow> ('a set)set"   ("rcosets\<index> _" [81] 80)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    18
  "rcosets H \<equiv> \<Union>a\<in>carrier G. {H #> a}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    19
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    20
  set_mult  :: "[_, 'a set ,'a set] \<Rightarrow> 'a set" (infixl "<#>\<index>" 60)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    21
  "H <#> K \<equiv> \<Union>h\<in>H. \<Union>k\<in>K. {h \<otimes> k}"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    22
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    23
  SET_INV :: "[_,'a set] \<Rightarrow> 'a set"  ("set'_inv\<index> _" [81] 80)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    24
  "set_inv H \<equiv> \<Union>h\<in>H. {inv h}"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    25
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    26
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    27
locale normal = subgroup + group +
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    28
  assumes coset_eq: "(\<forall>x \<in> carrier G. H #> x = x <# H)"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    29
19380
b808efaa5828 tuned syntax/abbreviations;
wenzelm
parents: 16417
diff changeset
    30
abbreviation
b808efaa5828 tuned syntax/abbreviations;
wenzelm
parents: 16417
diff changeset
    31
  normal_rel :: "['a set, ('a, 'b) monoid_scheme] \<Rightarrow> bool"  (infixl "\<lhd>" 60)
b808efaa5828 tuned syntax/abbreviations;
wenzelm
parents: 16417
diff changeset
    32
  "H \<lhd> G \<equiv> normal H G"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    33
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    34
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
    35
subsection {*Basic Properties of Cosets*}
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    36
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    37
lemma (in group) coset_mult_assoc:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    38
     "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |]
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    39
      ==> (M #> g) #> h = M #> (g \<otimes> h)"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    40
by (force simp add: r_coset_def m_assoc)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    41
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    42
lemma (in group) coset_mult_one [simp]: "M \<subseteq> carrier G ==> M #> \<one> = M"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    43
by (force simp add: r_coset_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    44
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    45
lemma (in group) coset_mult_inv1:
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
    46
     "[| M #> (x \<otimes> (inv y)) = M;  x \<in> carrier G ; y \<in> carrier G;
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    47
         M \<subseteq> carrier G |] ==> M #> x = M #> y"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    48
apply (erule subst [of concl: "%z. M #> x = z #> y"])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    49
apply (simp add: coset_mult_assoc m_assoc)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    50
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    51
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    52
lemma (in group) coset_mult_inv2:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    53
     "[| M #> x = M #> y;  x \<in> carrier G;  y \<in> carrier G;  M \<subseteq> carrier G |]
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    54
      ==> M #> (x \<otimes> (inv y)) = M "
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    55
apply (simp add: coset_mult_assoc [symmetric])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    56
apply (simp add: coset_mult_assoc)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    57
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    58
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    59
lemma (in group) coset_join1:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    60
     "[| H #> x = H;  x \<in> carrier G;  subgroup H G |] ==> x \<in> H"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    61
apply (erule subst)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    62
apply (simp add: r_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    63
apply (blast intro: l_one subgroup.one_closed sym)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    64
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    65
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    66
lemma (in group) solve_equation:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    67
    "\<lbrakk>subgroup H G; x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> \<exists>h\<in>H. y = h \<otimes> x"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    68
apply (rule bexI [of _ "y \<otimes> (inv x)"])
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
    69
apply (auto simp add: subgroup.m_closed subgroup.m_inv_closed m_assoc
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    70
                      subgroup.subset [THEN subsetD])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    71
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    72
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    73
lemma (in group) repr_independence:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    74
     "\<lbrakk>y \<in> H #> x;  x \<in> carrier G; subgroup H G\<rbrakk> \<Longrightarrow> H #> x = H #> y"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    75
by (auto simp add: r_coset_def m_assoc [symmetric]
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    76
                   subgroup.subset [THEN subsetD]
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    77
                   subgroup.m_closed solve_equation)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    78
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    79
lemma (in group) coset_join2:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    80
     "\<lbrakk>x \<in> carrier G;  subgroup H G;  x\<in>H\<rbrakk> \<Longrightarrow> H #> x = H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    81
  --{*Alternative proof is to put @{term "x=\<one>"} in @{text repr_independence}.*}
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    82
by (force simp add: subgroup.m_closed r_coset_def solve_equation)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    83
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    84
lemma (in group) r_coset_subset_G:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    85
     "[| H \<subseteq> carrier G; x \<in> carrier G |] ==> H #> x \<subseteq> carrier G"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    86
by (auto simp add: r_coset_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    87
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    88
lemma (in group) rcosI:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    89
     "[| h \<in> H; H \<subseteq> carrier G; x \<in> carrier G|] ==> h \<otimes> x \<in> H #> x"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    90
by (auto simp add: r_coset_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    91
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    92
lemma (in group) rcosetsI:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    93
     "\<lbrakk>H \<subseteq> carrier G; x \<in> carrier G\<rbrakk> \<Longrightarrow> H #> x \<in> rcosets H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
    94
by (auto simp add: RCOSETS_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    95
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    96
text{*Really needed?*}
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
    97
lemma (in group) transpose_inv:
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
    98
     "[| x \<otimes> y = z;  x \<in> carrier G;  y \<in> carrier G;  z \<in> carrier G |]
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
    99
      ==> (inv x) \<otimes> z = y"
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   100
by (force simp add: m_assoc [symmetric])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   101
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   102
lemma (in group) rcos_self: "[| x \<in> carrier G; subgroup H G |] ==> x \<in> H #> x"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   103
apply (simp add: r_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   104
apply (blast intro: sym l_one subgroup.subset [THEN subsetD]
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   105
                    subgroup.one_closed)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   106
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   107
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   108
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   109
subsection {* Normal subgroups *}
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   110
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   111
lemma normal_imp_subgroup: "H \<lhd> G \<Longrightarrow> subgroup H G"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   112
  by (simp add: normal_def subgroup_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   113
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   114
lemma (in group) normalI: 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   115
  "subgroup H G \<Longrightarrow> (\<forall>x \<in> carrier G. H #> x = x <# H) \<Longrightarrow> H \<lhd> G";
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   116
  by (simp add: normal_def normal_axioms_def prems) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   117
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   118
lemma (in normal) inv_op_closed1:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   119
     "\<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> (inv x) \<otimes> h \<otimes> x \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   120
apply (insert coset_eq) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   121
apply (auto simp add: l_coset_def r_coset_def)
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   122
apply (drule bspec, assumption)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   123
apply (drule equalityD1 [THEN subsetD], blast, clarify)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   124
apply (simp add: m_assoc)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   125
apply (simp add: m_assoc [symmetric])
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   126
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   127
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   128
lemma (in normal) inv_op_closed2:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   129
     "\<lbrakk>x \<in> carrier G; h \<in> H\<rbrakk> \<Longrightarrow> x \<otimes> h \<otimes> (inv x) \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   130
apply (subgoal_tac "inv (inv x) \<otimes> h \<otimes> (inv x) \<in> H") 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   131
apply (simp add: ); 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   132
apply (blast intro: inv_op_closed1) 
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   133
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   134
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   135
text{*Alternative characterization of normal subgroups*}
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   136
lemma (in group) normal_inv_iff:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   137
     "(N \<lhd> G) = 
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   138
      (subgroup N G & (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<otimes> h \<otimes> (inv x) \<in> N))"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   139
      (is "_ = ?rhs")
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   140
proof
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   141
  assume N: "N \<lhd> G"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   142
  show ?rhs
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   143
    by (blast intro: N normal.inv_op_closed2 normal_imp_subgroup) 
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   144
next
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   145
  assume ?rhs
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   146
  hence sg: "subgroup N G" 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   147
    and closed: "\<And>x. x\<in>carrier G \<Longrightarrow> \<forall>h\<in>N. x \<otimes> h \<otimes> inv x \<in> N" by auto
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   148
  hence sb: "N \<subseteq> carrier G" by (simp add: subgroup.subset) 
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   149
  show "N \<lhd> G"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   150
  proof (intro normalI [OF sg], simp add: l_coset_def r_coset_def, clarify)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   151
    fix x
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   152
    assume x: "x \<in> carrier G"
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   153
    show "(\<Union>h\<in>N. {h \<otimes> x}) = (\<Union>h\<in>N. {x \<otimes> h})"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   154
    proof
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   155
      show "(\<Union>h\<in>N. {h \<otimes> x}) \<subseteq> (\<Union>h\<in>N. {x \<otimes> h})"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   156
      proof clarify
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   157
        fix n
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   158
        assume n: "n \<in> N" 
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   159
        show "n \<otimes> x \<in> (\<Union>h\<in>N. {x \<otimes> h})"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   160
        proof 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   161
          from closed [of "inv x"]
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   162
          show "inv x \<otimes> n \<otimes> x \<in> N" by (simp add: x n)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   163
          show "n \<otimes> x \<in> {x \<otimes> (inv x \<otimes> n \<otimes> x)}"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   164
            by (simp add: x n m_assoc [symmetric] sb [THEN subsetD])
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   165
        qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   166
      qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   167
    next
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   168
      show "(\<Union>h\<in>N. {x \<otimes> h}) \<subseteq> (\<Union>h\<in>N. {h \<otimes> x})"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   169
      proof clarify
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   170
        fix n
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   171
        assume n: "n \<in> N" 
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   172
        show "x \<otimes> n \<in> (\<Union>h\<in>N. {h \<otimes> x})"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   173
        proof 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   174
          show "x \<otimes> n \<otimes> inv x \<in> N" by (simp add: x n closed)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   175
          show "x \<otimes> n \<in> {x \<otimes> n \<otimes> inv x \<otimes> x}"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   176
            by (simp add: x n m_assoc sb [THEN subsetD])
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   177
        qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   178
      qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   179
    qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   180
  qed
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   181
qed
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   182
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   183
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   184
subsection{*More Properties of Cosets*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   185
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   186
lemma (in group) lcos_m_assoc:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   187
     "[| M \<subseteq> carrier G; g \<in> carrier G; h \<in> carrier G |]
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   188
      ==> g <# (h <# M) = (g \<otimes> h) <# M"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   189
by (force simp add: l_coset_def m_assoc)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   190
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   191
lemma (in group) lcos_mult_one: "M \<subseteq> carrier G ==> \<one> <# M = M"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   192
by (force simp add: l_coset_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   193
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   194
lemma (in group) l_coset_subset_G:
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   195
     "[| H \<subseteq> carrier G; x \<in> carrier G |] ==> x <# H \<subseteq> carrier G"
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   196
by (auto simp add: l_coset_def subsetD)
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   197
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   198
lemma (in group) l_coset_swap:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   199
     "\<lbrakk>y \<in> x <# H;  x \<in> carrier G;  subgroup H G\<rbrakk> \<Longrightarrow> x \<in> y <# H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   200
proof (simp add: l_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   201
  assume "\<exists>h\<in>H. y = x \<otimes> h"
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   202
    and x: "x \<in> carrier G"
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   203
    and sb: "subgroup H G"
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   204
  then obtain h' where h': "h' \<in> H & x \<otimes> h' = y" by blast
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   205
  show "\<exists>h\<in>H. x = y \<otimes> h"
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   206
  proof
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   207
    show "x = y \<otimes> inv h'" using h' x sb
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   208
      by (auto simp add: m_assoc subgroup.subset [THEN subsetD])
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   209
    show "inv h' \<in> H" using h' sb
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   210
      by (auto simp add: subgroup.subset [THEN subsetD] subgroup.m_inv_closed)
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   211
  qed
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   212
qed
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   213
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   214
lemma (in group) l_coset_carrier:
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   215
     "[| y \<in> x <# H;  x \<in> carrier G;  subgroup H G |] ==> y \<in> carrier G"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   216
by (auto simp add: l_coset_def m_assoc
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   217
                   subgroup.subset [THEN subsetD] subgroup.m_closed)
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   218
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   219
lemma (in group) l_repr_imp_subset:
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   220
  assumes y: "y \<in> x <# H" and x: "x \<in> carrier G" and sb: "subgroup H G"
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   221
  shows "y <# H \<subseteq> x <# H"
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   222
proof -
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   223
  from y
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   224
  obtain h' where "h' \<in> H" "x \<otimes> h' = y" by (auto simp add: l_coset_def)
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   225
  thus ?thesis using x sb
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   226
    by (auto simp add: l_coset_def m_assoc
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   227
                       subgroup.subset [THEN subsetD] subgroup.m_closed)
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   228
qed
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   229
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   230
lemma (in group) l_repr_independence:
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   231
  assumes y: "y \<in> x <# H" and x: "x \<in> carrier G" and sb: "subgroup H G"
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   232
  shows "x <# H = y <# H"
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   233
proof
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   234
  show "x <# H \<subseteq> y <# H"
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   235
    by (rule l_repr_imp_subset,
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   236
        (blast intro: l_coset_swap l_coset_carrier y x sb)+)
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   237
  show "y <# H \<subseteq> x <# H" by (rule l_repr_imp_subset [OF y x sb])
14530
e94fd774ecf5 some (much longer) structured proofs
paulson
parents: 14254
diff changeset
   238
qed
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   239
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   240
lemma (in group) setmult_subset_G:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   241
     "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G\<rbrakk> \<Longrightarrow> H <#> K \<subseteq> carrier G"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   242
by (auto simp add: set_mult_def subsetD)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   243
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   244
lemma (in group) subgroup_mult_id: "subgroup H G \<Longrightarrow> H <#> H = H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   245
apply (auto simp add: subgroup.m_closed set_mult_def Sigma_def image_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   246
apply (rule_tac x = x in bexI)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   247
apply (rule bexI [of _ "\<one>"])
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   248
apply (auto simp add: subgroup.m_closed subgroup.one_closed
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   249
                      r_one subgroup.subset [THEN subsetD])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   250
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   251
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   252
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   253
subsubsection {* Set of inverses of an @{text r_coset}. *}
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   254
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   255
lemma (in normal) rcos_inv:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   256
  assumes x:     "x \<in> carrier G"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   257
  shows "set_inv (H #> x) = H #> (inv x)" 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   258
proof (simp add: r_coset_def SET_INV_def x inv_mult_group, safe)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   259
  fix h
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   260
  assume "h \<in> H"
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   261
  show "inv x \<otimes> inv h \<in> (\<Union>j\<in>H. {j \<otimes> inv x})"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   262
  proof
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   263
    show "inv x \<otimes> inv h \<otimes> x \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   264
      by (simp add: inv_op_closed1 prems)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   265
    show "inv x \<otimes> inv h \<in> {inv x \<otimes> inv h \<otimes> x \<otimes> inv x}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   266
      by (simp add: prems m_assoc)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   267
  qed
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   268
next
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   269
  fix h
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   270
  assume "h \<in> H"
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   271
  show "h \<otimes> inv x \<in> (\<Union>j\<in>H. {inv x \<otimes> inv j})"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   272
  proof
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   273
    show "x \<otimes> inv h \<otimes> inv x \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   274
      by (simp add: inv_op_closed2 prems)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   275
    show "h \<otimes> inv x \<in> {inv x \<otimes> inv (x \<otimes> inv h \<otimes> inv x)}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   276
      by (simp add: prems m_assoc [symmetric] inv_mult_group)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   277
  qed
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   278
qed
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   279
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   280
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   281
subsubsection {*Theorems for @{text "<#>"} with @{text "#>"} or @{text "<#"}.*}
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   282
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   283
lemma (in group) setmult_rcos_assoc:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   284
     "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G; x \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   285
      \<Longrightarrow> H <#> (K #> x) = (H <#> K) #> x"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   286
by (force simp add: r_coset_def set_mult_def m_assoc)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   287
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   288
lemma (in group) rcos_assoc_lcos:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   289
     "\<lbrakk>H \<subseteq> carrier G; K \<subseteq> carrier G; x \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   290
      \<Longrightarrow> (H #> x) <#> K = H <#> (x <# K)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   291
by (force simp add: r_coset_def l_coset_def set_mult_def m_assoc)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   292
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   293
lemma (in normal) rcos_mult_step1:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   294
     "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   295
      \<Longrightarrow> (H #> x) <#> (H #> y) = (H <#> (x <# H)) #> y"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   296
by (simp add: setmult_rcos_assoc subset
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   297
              r_coset_subset_G l_coset_subset_G rcos_assoc_lcos)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   298
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   299
lemma (in normal) rcos_mult_step2:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   300
     "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   301
      \<Longrightarrow> (H <#> (x <# H)) #> y = (H <#> (H #> x)) #> y"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   302
by (insert coset_eq, simp add: normal_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   303
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   304
lemma (in normal) rcos_mult_step3:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   305
     "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   306
      \<Longrightarrow> (H <#> (H #> x)) #> y = H #> (x \<otimes> y)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   307
by (simp add: setmult_rcos_assoc coset_mult_assoc
19931
fb32b43e7f80 Restructured locales with predicates: import is now an interpretation.
ballarin
parents: 19380
diff changeset
   308
              subgroup_mult_id normal.axioms subset prems)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   309
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   310
lemma (in normal) rcos_sum:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   311
     "\<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   312
      \<Longrightarrow> (H #> x) <#> (H #> y) = H #> (x \<otimes> y)"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   313
by (simp add: rcos_mult_step1 rcos_mult_step2 rcos_mult_step3)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   314
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   315
lemma (in normal) rcosets_mult_eq: "M \<in> rcosets H \<Longrightarrow> H <#> M = M"
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   316
  -- {* generalizes @{text subgroup_mult_id} *}
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   317
  by (auto simp add: RCOSETS_def subset
19931
fb32b43e7f80 Restructured locales with predicates: import is now an interpretation.
ballarin
parents: 19380
diff changeset
   318
        setmult_rcos_assoc subgroup_mult_id normal.axioms prems)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   319
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   320
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   321
subsubsection{*An Equivalence Relation*}
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   322
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   323
constdefs (structure G)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   324
  r_congruent :: "[('a,'b)monoid_scheme, 'a set] \<Rightarrow> ('a*'a)set"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   325
                  ("rcong\<index> _")
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   326
   "rcong H \<equiv> {(x,y). x \<in> carrier G & y \<in> carrier G & inv x \<otimes> y \<in> H}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   327
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   328
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   329
lemma (in subgroup) equiv_rcong:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   330
   includes group G
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   331
   shows "equiv (carrier G) (rcong H)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   332
proof (intro equiv.intro)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   333
  show "refl (carrier G) (rcong H)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   334
    by (auto simp add: r_congruent_def refl_def) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   335
next
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   336
  show "sym (rcong H)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   337
  proof (simp add: r_congruent_def sym_def, clarify)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   338
    fix x y
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   339
    assume [simp]: "x \<in> carrier G" "y \<in> carrier G" 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   340
       and "inv x \<otimes> y \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   341
    hence "inv (inv x \<otimes> y) \<in> H" by (simp add: m_inv_closed) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   342
    thus "inv y \<otimes> x \<in> H" by (simp add: inv_mult_group)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   343
  qed
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   344
next
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   345
  show "trans (rcong H)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   346
  proof (simp add: r_congruent_def trans_def, clarify)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   347
    fix x y z
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   348
    assume [simp]: "x \<in> carrier G" "y \<in> carrier G" "z \<in> carrier G"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   349
       and "inv x \<otimes> y \<in> H" and "inv y \<otimes> z \<in> H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   350
    hence "(inv x \<otimes> y) \<otimes> (inv y \<otimes> z) \<in> H" by simp
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   351
    hence "inv x \<otimes> (y \<otimes> inv y) \<otimes> z \<in> H" by (simp add: m_assoc del: r_inv) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   352
    thus "inv x \<otimes> z \<in> H" by simp
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   353
  qed
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   354
qed
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   355
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   356
text{*Equivalence classes of @{text rcong} correspond to left cosets.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   357
  Was there a mistake in the definitions? I'd have expected them to
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   358
  correspond to right cosets.*}
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   359
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   360
(* CB: This is correct, but subtle.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   361
   We call H #> a the right coset of a relative to H.  According to
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   362
   Jacobson, this is what the majority of group theory literature does.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   363
   He then defines the notion of congruence relation ~ over monoids as
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   364
   equivalence relation with a ~ a' & b ~ b' \<Longrightarrow> a*b ~ a'*b'.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   365
   Our notion of right congruence induced by K: rcong K appears only in
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   366
   the context where K is a normal subgroup.  Jacobson doesn't name it.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   367
   But in this context left and right cosets are identical.
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   368
*)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   369
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   370
lemma (in subgroup) l_coset_eq_rcong:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   371
  includes group G
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   372
  assumes a: "a \<in> carrier G"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   373
  shows "a <# H = rcong H `` {a}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   374
by (force simp add: r_congruent_def l_coset_def m_assoc [symmetric] a ) 
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   375
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   376
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   377
subsubsection{*Two distinct right cosets are disjoint*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   378
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   379
lemma (in group) rcos_equation:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   380
  includes subgroup H G
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   381
  shows
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   382
     "\<lbrakk>ha \<otimes> a = h \<otimes> b; a \<in> carrier G;  b \<in> carrier G;  
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   383
        h \<in> H;  ha \<in> H;  hb \<in> H\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   384
      \<Longrightarrow> hb \<otimes> a \<in> (\<Union>h\<in>H. {h \<otimes> b})"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   385
apply (rule UN_I [of "hb \<otimes> ((inv ha) \<otimes> h)"])
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   386
apply (simp add: ); 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   387
apply (simp add: m_assoc transpose_inv)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   388
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   389
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   390
lemma (in group) rcos_disjoint:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   391
  includes subgroup H G
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   392
  shows "\<lbrakk>a \<in> rcosets H; b \<in> rcosets H; a\<noteq>b\<rbrakk> \<Longrightarrow> a \<inter> b = {}"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   393
apply (simp add: RCOSETS_def r_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   394
apply (blast intro: rcos_equation prems sym)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   395
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   396
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   397
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   398
subsection {*Order of a Group and Lagrange's Theorem*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   399
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   400
constdefs
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   401
  order :: "('a, 'b) monoid_scheme \<Rightarrow> nat"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   402
  "order S \<equiv> card (carrier S)"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   403
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   404
lemma (in group) rcos_self:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   405
  includes subgroup
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   406
  shows "x \<in> carrier G \<Longrightarrow> x \<in> H #> x"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   407
apply (simp add: r_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   408
apply (rule_tac x="\<one>" in bexI) 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   409
apply (auto simp add: ); 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   410
done
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   411
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   412
lemma (in group) rcosets_part_G:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   413
  includes subgroup
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   414
  shows "\<Union>(rcosets H) = carrier G"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   415
apply (rule equalityI)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   416
 apply (force simp add: RCOSETS_def r_coset_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   417
apply (auto simp add: RCOSETS_def intro: rcos_self prems)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   418
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   419
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   420
lemma (in group) cosets_finite:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   421
     "\<lbrakk>c \<in> rcosets H;  H \<subseteq> carrier G;  finite (carrier G)\<rbrakk> \<Longrightarrow> finite c"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   422
apply (auto simp add: RCOSETS_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   423
apply (simp add: r_coset_subset_G [THEN finite_subset])
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   424
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   425
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   426
text{*The next two lemmas support the proof of @{text card_cosets_equal}.*}
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   427
lemma (in group) inj_on_f:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   428
    "\<lbrakk>H \<subseteq> carrier G;  a \<in> carrier G\<rbrakk> \<Longrightarrow> inj_on (\<lambda>y. y \<otimes> inv a) (H #> a)"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   429
apply (rule inj_onI)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   430
apply (subgoal_tac "x \<in> carrier G & y \<in> carrier G")
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   431
 prefer 2 apply (blast intro: r_coset_subset_G [THEN subsetD])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   432
apply (simp add: subsetD)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   433
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   434
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   435
lemma (in group) inj_on_g:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   436
    "\<lbrakk>H \<subseteq> carrier G;  a \<in> carrier G\<rbrakk> \<Longrightarrow> inj_on (\<lambda>y. y \<otimes> a) H"
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   437
by (force simp add: inj_on_def subsetD)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   438
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   439
lemma (in group) card_cosets_equal:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   440
     "\<lbrakk>c \<in> rcosets H;  H \<subseteq> carrier G; finite(carrier G)\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   441
      \<Longrightarrow> card c = card H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   442
apply (auto simp add: RCOSETS_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   443
apply (rule card_bij_eq)
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   444
     apply (rule inj_on_f, assumption+)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   445
    apply (force simp add: m_assoc subsetD r_coset_def)
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   446
   apply (rule inj_on_g, assumption+)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   447
  apply (force simp add: m_assoc subsetD r_coset_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   448
 txt{*The sets @{term "H #> a"} and @{term "H"} are finite.*}
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   449
 apply (simp add: r_coset_subset_G [THEN finite_subset])
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   450
apply (blast intro: finite_subset)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   451
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   452
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   453
lemma (in group) rcosets_subset_PowG:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   454
     "subgroup H G  \<Longrightarrow> rcosets H \<subseteq> Pow(carrier G)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   455
apply (simp add: RCOSETS_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   456
apply (blast dest: r_coset_subset_G subgroup.subset)
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   457
done
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   458
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   459
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   460
theorem (in group) lagrange:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   461
     "\<lbrakk>finite(carrier G); subgroup H G\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   462
      \<Longrightarrow> card(rcosets H) * card(H) = order(G)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   463
apply (simp (no_asm_simp) add: order_def rcosets_part_G [symmetric])
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   464
apply (subst mult_commute)
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   465
apply (rule card_partition)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   466
   apply (simp add: rcosets_subset_PowG [THEN finite_subset])
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   467
  apply (simp add: rcosets_part_G)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   468
 apply (simp add: card_cosets_equal subgroup.subset)
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   469
apply (simp add: rcos_disjoint)
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   470
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   471
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   472
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   473
subsection {*Quotient Groups: Factorization of a Group*}
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   474
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   475
constdefs
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   476
  FactGroup :: "[('a,'b) monoid_scheme, 'a set] \<Rightarrow> ('a set) monoid"
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   477
     (infixl "Mod" 65)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   478
    --{*Actually defined for groups rather than monoids*}
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   479
  "FactGroup G H \<equiv>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   480
    \<lparr>carrier = rcosets\<^bsub>G\<^esub> H, mult = set_mult G, one = H\<rparr>"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   481
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   482
lemma (in normal) setmult_closed:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   483
     "\<lbrakk>K1 \<in> rcosets H; K2 \<in> rcosets H\<rbrakk> \<Longrightarrow> K1 <#> K2 \<in> rcosets H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   484
by (auto simp add: rcos_sum RCOSETS_def)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   485
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   486
lemma (in normal) setinv_closed:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   487
     "K \<in> rcosets H \<Longrightarrow> set_inv K \<in> rcosets H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   488
by (auto simp add: rcos_inv RCOSETS_def)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   489
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   490
lemma (in normal) rcosets_assoc:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   491
     "\<lbrakk>M1 \<in> rcosets H; M2 \<in> rcosets H; M3 \<in> rcosets H\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   492
      \<Longrightarrow> M1 <#> M2 <#> M3 = M1 <#> (M2 <#> M3)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   493
by (auto simp add: RCOSETS_def rcos_sum m_assoc)
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   494
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   495
lemma (in subgroup) subgroup_in_rcosets:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   496
  includes group G
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   497
  shows "H \<in> rcosets H"
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   498
proof -
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   499
  have "H #> \<one> = H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   500
    by (rule coset_join2, auto)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   501
  then show ?thesis
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   502
    by (auto simp add: RCOSETS_def)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   503
qed
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   504
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   505
lemma (in normal) rcosets_inv_mult_group_eq:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   506
     "M \<in> rcosets H \<Longrightarrow> set_inv M <#> M = H"
19931
fb32b43e7f80 Restructured locales with predicates: import is now an interpretation.
ballarin
parents: 19380
diff changeset
   507
by (auto simp add: RCOSETS_def rcos_inv rcos_sum subgroup.subset normal.axioms prems)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   508
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   509
theorem (in normal) factorgroup_is_group:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   510
  "group (G Mod H)"
14666
65f8680c3f16 improved notation;
wenzelm
parents: 14651
diff changeset
   511
apply (simp add: FactGroup_def)
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents: 13889
diff changeset
   512
apply (rule groupI)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   513
    apply (simp add: setmult_closed)
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   514
   apply (simp add: normal_imp_subgroup subgroup_in_rcosets [OF is_group])
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   515
  apply (simp add: restrictI setmult_closed rcosets_assoc)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   516
 apply (simp add: normal_imp_subgroup
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   517
                  subgroup_in_rcosets rcosets_mult_eq)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   518
apply (auto dest: rcosets_inv_mult_group_eq simp add: setinv_closed)
13889
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   519
done
6676ac2527fa Fixed Coset.thy (proved theorem factorgroup_is_group).
ballarin
parents: 13870
diff changeset
   520
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   521
lemma mult_FactGroup [simp]: "X \<otimes>\<^bsub>(G Mod H)\<^esub> X' = X <#>\<^bsub>G\<^esub> X'"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   522
  by (simp add: FactGroup_def) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   523
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   524
lemma (in normal) inv_FactGroup:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   525
     "X \<in> carrier (G Mod H) \<Longrightarrow> inv\<^bsub>G Mod H\<^esub> X = set_inv X"
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   526
apply (rule group.inv_equality [OF factorgroup_is_group]) 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   527
apply (simp_all add: FactGroup_def setinv_closed rcosets_inv_mult_group_eq)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   528
done
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   529
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   530
text{*The coset map is a homomorphism from @{term G} to the quotient group
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   531
  @{term "G Mod H"}*}
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   532
lemma (in normal) r_coset_hom_Mod:
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   533
  "(\<lambda>a. H #> a) \<in> hom G (G Mod H)"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   534
  by (auto simp add: FactGroup_def RCOSETS_def Pi_def hom_def rcos_sum)
14747
2eaff69d3d10 removal of locale coset
paulson
parents: 14706
diff changeset
   535
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   536
 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   537
subsection{*The First Isomorphism Theorem*}
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   538
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   539
text{*The quotient by the kernel of a homomorphism is isomorphic to the 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   540
  range of that homomorphism.*}
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   541
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   542
constdefs
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   543
  kernel :: "('a, 'm) monoid_scheme \<Rightarrow> ('b, 'n) monoid_scheme \<Rightarrow> 
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   544
             ('a \<Rightarrow> 'b) \<Rightarrow> 'a set" 
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   545
    --{*the kernel of a homomorphism*}
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   546
  "kernel G H h \<equiv> {x. x \<in> carrier G & h x = \<one>\<^bsub>H\<^esub>}";
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   547
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   548
lemma (in group_hom) subgroup_kernel: "subgroup (kernel G H h) G"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   549
apply (rule subgroup.intro) 
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   550
apply (auto simp add: kernel_def group.intro prems) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   551
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   552
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   553
text{*The kernel of a homomorphism is a normal subgroup*}
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   554
lemma (in group_hom) normal_kernel: "(kernel G H h) \<lhd> G"
19931
fb32b43e7f80 Restructured locales with predicates: import is now an interpretation.
ballarin
parents: 19380
diff changeset
   555
apply (simp add: G.normal_inv_iff subgroup_kernel)
fb32b43e7f80 Restructured locales with predicates: import is now an interpretation.
ballarin
parents: 19380
diff changeset
   556
apply (simp add: kernel_def)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   557
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   558
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   559
lemma (in group_hom) FactGroup_nonempty:
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   560
  assumes X: "X \<in> carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   561
  shows "X \<noteq> {}"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   562
proof -
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   563
  from X
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   564
  obtain g where "g \<in> carrier G" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   565
             and "X = kernel G H h #> g"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   566
    by (auto simp add: FactGroup_def RCOSETS_def)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   567
  thus ?thesis 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   568
   by (auto simp add: kernel_def r_coset_def image_def intro: hom_one)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   569
qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   570
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   571
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   572
lemma (in group_hom) FactGroup_contents_mem:
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   573
  assumes X: "X \<in> carrier (G Mod (kernel G H h))"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   574
  shows "contents (h`X) \<in> carrier H"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   575
proof -
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   576
  from X
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   577
  obtain g where g: "g \<in> carrier G" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   578
             and "X = kernel G H h #> g"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   579
    by (auto simp add: FactGroup_def RCOSETS_def)
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   580
  hence "h ` X = {h g}" by (auto simp add: kernel_def r_coset_def image_def g)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   581
  thus ?thesis by (auto simp add: g)
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   582
qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   583
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   584
lemma (in group_hom) FactGroup_hom:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   585
     "(\<lambda>X. contents (h`X)) \<in> hom (G Mod (kernel G H h)) H"
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   586
apply (simp add: hom_def FactGroup_contents_mem  normal.factorgroup_is_group [OF normal_kernel] group.axioms monoid.m_closed)  
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   587
proof (simp add: hom_def funcsetI FactGroup_contents_mem, intro ballI) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   588
  fix X and X'
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   589
  assume X:  "X  \<in> carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   590
     and X': "X' \<in> carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   591
  then
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   592
  obtain g and g'
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   593
           where "g \<in> carrier G" and "g' \<in> carrier G" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   594
             and "X = kernel G H h #> g" and "X' = kernel G H h #> g'"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   595
    by (auto simp add: FactGroup_def RCOSETS_def)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   596
  hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   597
    and Xsub: "X \<subseteq> carrier G" and X'sub: "X' \<subseteq> carrier G"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   598
    by (force simp add: kernel_def r_coset_def image_def)+
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   599
  hence "h ` (X <#> X') = {h g \<otimes>\<^bsub>H\<^esub> h g'}" using X X'
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   600
    by (auto dest!: FactGroup_nonempty
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   601
             simp add: set_mult_def image_eq_UN 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   602
                       subsetD [OF Xsub] subsetD [OF X'sub]) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   603
  thus "contents (h ` (X <#> X')) = contents (h ` X) \<otimes>\<^bsub>H\<^esub> contents (h ` X')"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   604
    by (simp add: all image_eq_UN FactGroup_nonempty X X')  
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   605
qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   606
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   607
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   608
text{*Lemma for the following injectivity result*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   609
lemma (in group_hom) FactGroup_subset:
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   610
     "\<lbrakk>g \<in> carrier G; g' \<in> carrier G; h g = h g'\<rbrakk>
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   611
      \<Longrightarrow>  kernel G H h #> g \<subseteq> kernel G H h #> g'"
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   612
apply (clarsimp simp add: kernel_def r_coset_def image_def);
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   613
apply (rename_tac y)  
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   614
apply (rule_tac x="y \<otimes> g \<otimes> inv g'" in exI) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   615
apply (simp add: G.m_assoc); 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   616
done
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   617
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   618
lemma (in group_hom) FactGroup_inj_on:
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   619
     "inj_on (\<lambda>X. contents (h ` X)) (carrier (G Mod kernel G H h))"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   620
proof (simp add: inj_on_def, clarify) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   621
  fix X and X'
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   622
  assume X:  "X  \<in> carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   623
     and X': "X' \<in> carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   624
  then
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   625
  obtain g and g'
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   626
           where gX: "g \<in> carrier G"  "g' \<in> carrier G" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   627
              "X = kernel G H h #> g" "X' = kernel G H h #> g'"
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   628
    by (auto simp add: FactGroup_def RCOSETS_def)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   629
  hence all: "\<forall>x\<in>X. h x = h g" "\<forall>x\<in>X'. h x = h g'" 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   630
    by (force simp add: kernel_def r_coset_def image_def)+
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   631
  assume "contents (h ` X) = contents (h ` X')"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   632
  hence h: "h g = h g'"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   633
    by (simp add: image_eq_UN all FactGroup_nonempty X X') 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   634
  show "X=X'" by (rule equalityI) (simp_all add: FactGroup_subset h gX) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   635
qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   636
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   637
text{*If the homomorphism @{term h} is onto @{term H}, then so is the
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   638
homomorphism from the quotient group*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   639
lemma (in group_hom) FactGroup_onto:
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   640
  assumes h: "h ` carrier G = carrier H"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   641
  shows "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) = carrier H"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   642
proof
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   643
  show "(\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h) \<subseteq> carrier H"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   644
    by (auto simp add: FactGroup_contents_mem)
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   645
  show "carrier H \<subseteq> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   646
  proof
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   647
    fix y
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   648
    assume y: "y \<in> carrier H"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   649
    with h obtain g where g: "g \<in> carrier G" "h g = y"
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   650
      by (blast elim: equalityE); 
15120
f0359f75682e undid UN/INT syntax
nipkow
parents: 14963
diff changeset
   651
    hence "(\<Union>x\<in>kernel G H h #> g. {h x}) = {y}" 
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   652
      by (auto simp add: y kernel_def r_coset_def) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   653
    with g show "y \<in> (\<lambda>X. contents (h ` X)) ` carrier (G Mod kernel G H h)" 
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   654
      by (auto intro!: bexI simp add: FactGroup_def RCOSETS_def image_eq_UN)
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   655
  qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   656
qed
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   657
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   658
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   659
text{*If @{term h} is a homomorphism from @{term G} onto @{term H}, then the
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   660
 quotient group @{term "G Mod (kernel G H h)"} is isomorphic to @{term H}.*}
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   661
theorem (in group_hom) FactGroup_iso:
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   662
  "h ` carrier G = carrier H
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   663
   \<Longrightarrow> (\<lambda>X. contents (h`X)) \<in> (G Mod (kernel G H h)) \<cong> H"
14803
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   664
by (simp add: iso_def FactGroup_hom FactGroup_inj_on bij_betw_def 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   665
              FactGroup_onto) 
f7557773cc87 more group isomorphisms
paulson
parents: 14761
diff changeset
   666
14963
d584e32f7d46 removal of magmas and semigroups
paulson
parents: 14803
diff changeset
   667
13870
cf947d1ec5ff moved Exponent, Coset, Sylow from GroupTheory to Algebra, converting them
paulson
parents:
diff changeset
   668
end