| author | wenzelm |
| Sat, 13 Mar 2010 15:11:59 +0100 | |
| changeset 35760 | 22e6c38ebe25 |
| parent 35416 | d8d7d1b785af |
| child 35848 | 5443079512ea |
| permissions | -rw-r--r-- |
| 14706 | 1 |
(* Title: HOL/Algebra/Bij.thy |
| 13945 | 2 |
Author: Florian Kammueller, with new proofs by L C Paulson |
3 |
*) |
|
4 |
||
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
16417
diff
changeset
|
5 |
theory Bij imports Group begin |
| 13945 | 6 |
|
|
20318
0e0ea63fe768
Restructured algebra library, added ideals and quotient rings.
ballarin
parents:
16417
diff
changeset
|
7 |
|
|
27717
21bbd410ba04
Generalised polynomial lemmas from cring to ring.
ballarin
parents:
20318
diff
changeset
|
8 |
section {* Bijections of a Set, Permutation and Automorphism Groups *}
|
| 13945 | 9 |
|
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
33057
diff
changeset
|
10 |
definition Bij :: "'a set \<Rightarrow> ('a \<Rightarrow> 'a) set" where
|
| 13945 | 11 |
--{*Only extensional functions, since otherwise we get too many.*}
|
| 14963 | 12 |
"Bij S \<equiv> extensional S \<inter> {f. bij_betw f S S}"
|
| 13945 | 13 |
|
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
33057
diff
changeset
|
14 |
definition BijGroup :: "'a set \<Rightarrow> ('a \<Rightarrow> 'a) monoid" where
|
| 14963 | 15 |
"BijGroup S \<equiv> |
16 |
\<lparr>carrier = Bij S, |
|
17 |
mult = \<lambda>g \<in> Bij S. \<lambda>f \<in> Bij S. compose S g f, |
|
18 |
one = \<lambda>x \<in> S. x\<rparr>" |
|
| 13945 | 19 |
|
20 |
||
21 |
declare Id_compose [simp] compose_Id [simp] |
|
22 |
||
| 14963 | 23 |
lemma Bij_imp_extensional: "f \<in> Bij S \<Longrightarrow> f \<in> extensional S" |
| 14666 | 24 |
by (simp add: Bij_def) |
| 13945 | 25 |
|
| 14963 | 26 |
lemma Bij_imp_funcset: "f \<in> Bij S \<Longrightarrow> f \<in> S \<rightarrow> S" |
| 14853 | 27 |
by (auto simp add: Bij_def bij_betw_imp_funcset) |
| 13945 | 28 |
|
29 |
||
| 14666 | 30 |
subsection {*Bijections Form a Group *}
|
| 13945 | 31 |
|
| 33057 | 32 |
lemma restrict_inv_into_Bij: "f \<in> Bij S \<Longrightarrow> (\<lambda>x \<in> S. (inv_into S f) x) \<in> Bij S" |
33 |
by (simp add: Bij_def bij_betw_inv_into) |
|
| 13945 | 34 |
|
35 |
lemma id_Bij: "(\<lambda>x\<in>S. x) \<in> Bij S " |
|
| 14853 | 36 |
by (auto simp add: Bij_def bij_betw_def inj_on_def) |
| 13945 | 37 |
|
| 14963 | 38 |
lemma compose_Bij: "\<lbrakk>x \<in> Bij S; y \<in> Bij S\<rbrakk> \<Longrightarrow> compose S x y \<in> Bij S" |
| 14853 | 39 |
by (auto simp add: Bij_def bij_betw_compose) |
| 13945 | 40 |
|
41 |
lemma Bij_compose_restrict_eq: |
|
| 33057 | 42 |
"f \<in> Bij S \<Longrightarrow> compose S (restrict (inv_into S f) S) f = (\<lambda>x\<in>S. x)" |
43 |
by (simp add: Bij_def compose_inv_into_id) |
|
| 13945 | 44 |
|
45 |
theorem group_BijGroup: "group (BijGroup S)" |
|
| 14666 | 46 |
apply (simp add: BijGroup_def) |
| 13945 | 47 |
apply (rule groupI) |
48 |
apply (simp add: compose_Bij) |
|
49 |
apply (simp add: id_Bij) |
|
50 |
apply (simp add: compose_Bij) |
|
| 31754 | 51 |
apply (blast intro: compose_assoc [symmetric] dest: Bij_imp_funcset) |
| 13945 | 52 |
apply (simp add: id_Bij Bij_imp_funcset Bij_imp_extensional, simp) |
| 33057 | 53 |
apply (blast intro: Bij_compose_restrict_eq restrict_inv_into_Bij) |
| 13945 | 54 |
done |
55 |
||
56 |
||
57 |
subsection{*Automorphisms Form a Group*}
|
|
58 |
||
| 33057 | 59 |
lemma Bij_inv_into_mem: "\<lbrakk> f \<in> Bij S; x \<in> S\<rbrakk> \<Longrightarrow> inv_into S f x \<in> S" |
60 |
by (simp add: Bij_def bij_betw_def inv_into_into) |
|
| 13945 | 61 |
|
| 33057 | 62 |
lemma Bij_inv_into_lemma: |
| 14963 | 63 |
assumes eq: "\<And>x y. \<lbrakk>x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> h(g x y) = g (h x) (h y)" |
64 |
shows "\<lbrakk>h \<in> Bij S; g \<in> S \<rightarrow> S \<rightarrow> S; x \<in> S; y \<in> S\<rbrakk> |
|
| 33057 | 65 |
\<Longrightarrow> inv_into S h (g x y) = g (inv_into S h x) (inv_into S h y)" |
| 14853 | 66 |
apply (simp add: Bij_def bij_betw_def) |
67 |
apply (subgoal_tac "\<exists>x'\<in>S. \<exists>y'\<in>S. x = h x' & y = h y'", clarify) |
|
| 32988 | 68 |
apply (simp add: eq [symmetric] inv_f_f funcset_mem [THEN funcset_mem], blast) |
| 13945 | 69 |
done |
70 |
||
| 14963 | 71 |
|
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
33057
diff
changeset
|
72 |
definition auto :: "('a, 'b) monoid_scheme \<Rightarrow> ('a \<Rightarrow> 'a) set" where
|
| 14963 | 73 |
"auto G \<equiv> hom G G \<inter> Bij (carrier G)" |
| 13945 | 74 |
|
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
33057
diff
changeset
|
75 |
definition AutoGroup :: "('a, 'c) monoid_scheme \<Rightarrow> ('a \<Rightarrow> 'a) monoid" where
|
| 14963 | 76 |
"AutoGroup G \<equiv> BijGroup (carrier G) \<lparr>carrier := auto G\<rparr>" |
| 13945 | 77 |
|
| 14963 | 78 |
lemma (in group) id_in_auto: "(\<lambda>x \<in> carrier G. x) \<in> auto G" |
| 14666 | 79 |
by (simp add: auto_def hom_def restrictI group.axioms id_Bij) |
| 13945 | 80 |
|
| 14963 | 81 |
lemma (in group) mult_funcset: "mult G \<in> carrier G \<rightarrow> carrier G \<rightarrow> carrier G" |
| 13945 | 82 |
by (simp add: Pi_I group.axioms) |
83 |
||
| 33057 | 84 |
lemma (in group) restrict_inv_into_hom: |
| 14963 | 85 |
"\<lbrakk>h \<in> hom G G; h \<in> Bij (carrier G)\<rbrakk> |
| 33057 | 86 |
\<Longrightarrow> restrict (inv_into (carrier G) h) (carrier G) \<in> hom G G" |
87 |
by (simp add: hom_def Bij_inv_into_mem restrictI mult_funcset |
|
88 |
group.axioms Bij_inv_into_lemma) |
|
| 13945 | 89 |
|
90 |
lemma inv_BijGroup: |
|
| 33057 | 91 |
"f \<in> Bij S \<Longrightarrow> m_inv (BijGroup S) f = (\<lambda>x \<in> S. (inv_into S f) x)" |
| 13945 | 92 |
apply (rule group.inv_equality) |
93 |
apply (rule group_BijGroup) |
|
| 33057 | 94 |
apply (simp_all add:BijGroup_def restrict_inv_into_Bij Bij_compose_restrict_eq) |
| 13945 | 95 |
done |
96 |
||
| 14963 | 97 |
lemma (in group) subgroup_auto: |
98 |
"subgroup (auto G) (BijGroup (carrier G))" |
|
99 |
proof (rule subgroup.intro) |
|
100 |
show "auto G \<subseteq> carrier (BijGroup (carrier G))" |
|
101 |
by (force simp add: auto_def BijGroup_def) |
|
102 |
next |
|
103 |
fix x y |
|
104 |
assume "x \<in> auto G" "y \<in> auto G" |
|
105 |
thus "x \<otimes>\<^bsub>BijGroup (carrier G)\<^esub> y \<in> auto G" |
|
106 |
by (force simp add: BijGroup_def is_group auto_def Bij_imp_funcset |
|
107 |
group.hom_compose compose_Bij) |
|
108 |
next |
|
109 |
show "\<one>\<^bsub>BijGroup (carrier G)\<^esub> \<in> auto G" by (simp add: BijGroup_def id_in_auto) |
|
110 |
next |
|
111 |
fix x |
|
112 |
assume "x \<in> auto G" |
|
113 |
thus "inv\<^bsub>BijGroup (carrier G)\<^esub> x \<in> auto G" |
|
114 |
by (simp del: restrict_apply |
|
| 33057 | 115 |
add: inv_BijGroup auto_def restrict_inv_into_Bij restrict_inv_into_hom) |
| 14963 | 116 |
qed |
| 13945 | 117 |
|
| 14963 | 118 |
theorem (in group) AutoGroup: "group (AutoGroup G)" |
119 |
by (simp add: AutoGroup_def subgroup.subgroup_is_group subgroup_auto |
|
120 |
group_BijGroup) |
|
| 13945 | 121 |
|
122 |
end |