diff -r b0c81b9a0133 -r e09c53289830 src/ZF/ex/Group.thy --- a/src/ZF/ex/Group.thy Wed Dec 10 17:19:25 2008 +0100 +++ b/src/ZF/ex/Group.thy Thu Dec 11 18:30:26 2008 +0100 @@ -1,5 +1,4 @@ (* Title: ZF/ex/Group.thy - Id: $Id$ *) @@ -40,7 +39,7 @@ m_inv :: "i => i => i" ("inv\ _" [81] 80) where "inv\<^bsub>G\<^esub> x == (THE y. y \ carrier(G) & y \\<^bsub>G\<^esub> x = \\<^bsub>G\<^esub> & x \\<^bsub>G\<^esub> y = \\<^bsub>G\<^esub>)" -locale monoid = struct G + +locale monoid = fixes G (structure) assumes m_closed [intro, simp]: "\x \ carrier(G); y \ carrier(G)\ \ x \ y \ carrier(G)" and m_assoc: @@ -242,7 +241,7 @@ subsection {* Substructures *} -locale subgroup = var H + struct G + +locale subgroup = fixes H and G (structure) assumes subset: "H \ carrier(G)" and m_closed [intro, simp]: "\x \ H; y \ H\ \ x \ y \ H" and one_closed [simp]: "\ \ H" @@ -262,7 +261,7 @@ assumes "group(G)" shows "group_axioms (update_carrier(G,H))" proof - - interpret group [G] by fact + interpret group G by fact show ?thesis by (force intro: group_axioms.intro l_inv r_inv) qed @@ -270,7 +269,7 @@ assumes "group(G)" shows "group (update_carrier(G,H))" proof - - interpret group [G] by fact + interpret group G by fact show ?thesis by (rule groupI) (auto intro: m_assoc l_inv mem_carrier) qed @@ -316,8 +315,8 @@ assumes "group(G)" and "group(H)" shows "group (G \ H)" proof - - interpret G: group [G] by fact - interpret H: group [H] by fact + interpret G: group G by fact + interpret H: group H by fact show ?thesis by (force intro!: groupI G.m_assoc H.m_assoc G.l_inv H.l_inv simp add: DirProdGroup_def) qed @@ -397,8 +396,8 @@ assumes "group(G)" and "group(H)" shows "(\ \ carrier(G \ H). ) \ (G \ H) \ (H \ G)" proof - - interpret group [G] by fact - interpret group [H] by fact + interpret group G by fact + interpret group H by fact show ?thesis by (auto simp add: iso_def hom_def inj_def surj_def bij_def) qed @@ -407,16 +406,17 @@ shows "(\<,z> \ carrier((G \ H) \ I). >) \ ((G \ H) \ I) \ (G \ (H \ I))" proof - - interpret group [G] by fact - interpret group [H] by fact - interpret group [I] by fact + interpret group G by fact + interpret group H by fact + interpret group I by fact show ?thesis by (auto intro: lam_type simp add: iso_def hom_def inj_def surj_def bij_def) qed text{*Basis for homomorphism proofs: we assume two groups @{term G} and @term{H}, with a homomorphism @{term h} between them*} -locale group_hom = group G + group H + var h + +locale group_hom = G: group G + H: group H + for G (structure) and H (structure) and h + assumes homh: "h \ hom(G,H)" notes hom_mult [simp] = hom_mult [OF homh] and hom_closed [simp] = hom_closed [OF homh] @@ -870,7 +870,7 @@ assumes "group(G)" shows "equiv (carrier(G), rcong H)" proof - - interpret group [G] by fact + interpret group G by fact show ?thesis proof (simp add: equiv_def, intro conjI) show "rcong H \ carrier(G) \ carrier(G)" by (auto simp add: r_congruent_def) @@ -907,7 +907,7 @@ assumes a: "a \ carrier(G)" shows "a <# H = (rcong H) `` {a}" proof - - interpret group [G] by fact + interpret group G by fact show ?thesis by (force simp add: r_congruent_def l_coset_def m_assoc [symmetric] a Collect_image_eq) @@ -920,7 +920,7 @@ h \ H; ha \ H; hb \ H\ \ hb \ a \ (\h\H. {h \ b})" (is "PROP ?P") proof - - interpret subgroup [H G] by fact + interpret subgroup H G by fact show "PROP ?P" apply (rule UN_I [of "hb \ ((inv ha) \ h)"], simp) apply (simp add: m_assoc transpose_inv) @@ -931,7 +931,7 @@ assumes "subgroup(H, G)" shows "\a \ rcosets H; b \ rcosets H; a\b\ \ a \ b = 0" (is "PROP ?P") proof - - interpret subgroup [H G] by fact + interpret subgroup H G by fact show "PROP ?P" apply (simp add: RCOSETS_def r_coset_def) apply (blast intro: rcos_equation prems sym) @@ -949,7 +949,7 @@ assumes "subgroup(H, G)" shows "x \ carrier(G) \ x \ H #> x" (is "PROP ?P") proof - - interpret subgroup [H G] by fact + interpret subgroup H G by fact show "PROP ?P" apply (simp add: r_coset_def) apply (rule_tac x="\" in bexI) apply (auto) @@ -960,7 +960,7 @@ assumes "subgroup(H, G)" shows "\(rcosets H) = carrier(G)" proof - - interpret subgroup [H G] by fact + interpret subgroup H G by fact show ?thesis apply (rule equalityI) apply (force simp add: RCOSETS_def r_coset_def) @@ -1044,7 +1044,7 @@ assumes "group(G)" shows "H \ rcosets H" proof - - interpret group [G] by fact + interpret group G by fact have "H #> \ = H" using _ subgroup_axioms by (rule coset_join2) simp_all then show ?thesis