423 |
422 |
424 lemma (in subgroup) subgroup_is_group [intro]: |
423 lemma (in subgroup) subgroup_is_group [intro]: |
425 assumes "group G" |
424 assumes "group G" |
426 shows "group (G\<lparr>carrier := H\<rparr>)" |
425 shows "group (G\<lparr>carrier := H\<rparr>)" |
427 proof - |
426 proof - |
428 interpret group [G] by fact |
427 interpret group G by fact |
429 show ?thesis |
428 show ?thesis |
430 apply (rule monoid.group_l_invI) |
429 apply (rule monoid.group_l_invI) |
431 apply (unfold_locales) [1] |
430 apply (unfold_locales) [1] |
432 apply (auto intro: m_assoc l_inv mem_carrier) |
431 apply (auto intro: m_assoc l_inv mem_carrier) |
433 done |
432 done |
487 |
486 |
488 lemma DirProd_monoid: |
487 lemma DirProd_monoid: |
489 assumes "monoid G" and "monoid H" |
488 assumes "monoid G" and "monoid H" |
490 shows "monoid (G \<times>\<times> H)" |
489 shows "monoid (G \<times>\<times> H)" |
491 proof - |
490 proof - |
492 interpret G: monoid [G] by fact |
491 interpret G!: monoid G by fact |
493 interpret H: monoid [H] by fact |
492 interpret H!: monoid H by fact |
494 from assms |
493 from assms |
495 show ?thesis by (unfold monoid_def DirProd_def, auto) |
494 show ?thesis by (unfold monoid_def DirProd_def, auto) |
496 qed |
495 qed |
497 |
496 |
498 |
497 |
499 text{*Does not use the previous result because it's easier just to use auto.*} |
498 text{*Does not use the previous result because it's easier just to use auto.*} |
500 lemma DirProd_group: |
499 lemma DirProd_group: |
501 assumes "group G" and "group H" |
500 assumes "group G" and "group H" |
502 shows "group (G \<times>\<times> H)" |
501 shows "group (G \<times>\<times> H)" |
503 proof - |
502 proof - |
504 interpret G: group [G] by fact |
503 interpret G!: group G by fact |
505 interpret H: group [H] by fact |
504 interpret H!: group H by fact |
506 show ?thesis by (rule groupI) |
505 show ?thesis by (rule groupI) |
507 (auto intro: G.m_assoc H.m_assoc G.l_inv H.l_inv |
506 (auto intro: G.m_assoc H.m_assoc G.l_inv H.l_inv |
508 simp add: DirProd_def) |
507 simp add: DirProd_def) |
509 qed |
508 qed |
510 |
509 |
524 assumes "group G" and "group H" |
523 assumes "group G" and "group H" |
525 assumes g: "g \<in> carrier G" |
524 assumes g: "g \<in> carrier G" |
526 and h: "h \<in> carrier H" |
525 and h: "h \<in> carrier H" |
527 shows "m_inv (G \<times>\<times> H) (g, h) = (inv\<^bsub>G\<^esub> g, inv\<^bsub>H\<^esub> h)" |
526 shows "m_inv (G \<times>\<times> H) (g, h) = (inv\<^bsub>G\<^esub> g, inv\<^bsub>H\<^esub> h)" |
528 proof - |
527 proof - |
529 interpret G: group [G] by fact |
528 interpret G!: group G by fact |
530 interpret H: group [H] by fact |
529 interpret H!: group H by fact |
531 interpret Prod: group ["G \<times>\<times> H"] |
530 interpret Prod!: group "G \<times>\<times> H" |
532 by (auto intro: DirProd_group group.intro group.axioms assms) |
531 by (auto intro: DirProd_group group.intro group.axioms assms) |
533 show ?thesis by (simp add: Prod.inv_equality g h) |
532 show ?thesis by (simp add: Prod.inv_equality g h) |
534 qed |
533 qed |
535 |
534 |
536 |
535 |
585 by (auto simp add: iso_def hom_def inj_on_def bij_betw_def Pi_def) |
584 by (auto simp add: iso_def hom_def inj_on_def bij_betw_def Pi_def) |
586 |
585 |
587 |
586 |
588 text{*Basis for homomorphism proofs: we assume two groups @{term G} and |
587 text{*Basis for homomorphism proofs: we assume two groups @{term G} and |
589 @{term H}, with a homomorphism @{term h} between them*} |
588 @{term H}, with a homomorphism @{term h} between them*} |
590 locale group_hom = group G + group H + var h + |
589 locale group_hom = G: group G + H: group H for G (structure) and H (structure) + |
|
590 fixes h |
591 assumes homh: "h \<in> hom G H" |
591 assumes homh: "h \<in> hom G H" |
592 notes hom_mult [simp] = hom_mult [OF homh] |
592 notes hom_mult [simp] = hom_mult [OF homh] |
593 and hom_closed [simp] = hom_closed [OF homh] |
593 and hom_closed [simp] = hom_closed [OF homh] |
594 |
594 |
595 lemma (in group_hom) one_closed [simp]: |
595 lemma (in group_hom) one_closed [simp]: |