equal
deleted
inserted
replaced
91 also from G have "... = (y \<otimes> x) \<otimes> y'" by (simp add: m_assoc) |
91 also from G have "... = (y \<otimes> x) \<otimes> y'" by (simp add: m_assoc) |
92 also from G eq have "... = y'" by simp |
92 also from G eq have "... = y'" by simp |
93 finally show ?thesis . |
93 finally show ?thesis . |
94 qed |
94 qed |
95 |
95 |
|
96 lemma (in monoid) Units_one_closed [intro, simp]: |
|
97 "\<one> \<in> Units G" |
|
98 by (unfold Units_def) auto |
|
99 |
96 lemma (in monoid) Units_inv_closed [intro, simp]: |
100 lemma (in monoid) Units_inv_closed [intro, simp]: |
97 "x \<in> Units G ==> inv x \<in> carrier G" |
101 "x \<in> Units G ==> inv x \<in> carrier G" |
98 apply (unfold Units_def m_inv_def) |
102 apply (unfold Units_def m_inv_def) |
99 apply auto |
103 apply auto |
100 apply (rule theI2, fast) |
104 apply (rule theI2, fast) |
158 proof (rule inj_onI) |
162 proof (rule inj_onI) |
159 fix x y |
163 fix x y |
160 assume G: "x \<in> Units G" "y \<in> Units G" and eq: "inv x = inv y" |
164 assume G: "x \<in> Units G" "y \<in> Units G" and eq: "inv x = inv y" |
161 then have "inv (inv x) = inv (inv y)" by simp |
165 then have "inv (inv x) = inv (inv y)" by simp |
162 with G show "x = y" by simp |
166 with G show "x = y" by simp |
|
167 qed |
|
168 |
|
169 lemma (in monoid) Units_inv_comm: |
|
170 assumes inv: "x \<otimes> y = \<one>" |
|
171 and G: "x \<in> Units G" "y \<in> Units G" |
|
172 shows "y \<otimes> x = \<one>" |
|
173 proof - |
|
174 from G have "x \<otimes> y \<otimes> x = x \<otimes> \<one>" by (auto simp add: inv Units_closed) |
|
175 with G show ?thesis by (simp del: r_one add: m_assoc Units_closed) |
163 qed |
176 qed |
164 |
177 |
165 text {* Power *} |
178 text {* Power *} |
166 |
179 |
167 lemma (in monoid) nat_pow_closed [intro, simp]: |
180 lemma (in monoid) nat_pow_closed [intro, simp]: |
285 |
298 |
286 lemma (in group) l_cancel [simp]: |
299 lemma (in group) l_cancel [simp]: |
287 "[| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==> |
300 "[| x \<in> carrier G; y \<in> carrier G; z \<in> carrier G |] ==> |
288 (x \<otimes> y = x \<otimes> z) = (y = z)" |
301 (x \<otimes> y = x \<otimes> z) = (y = z)" |
289 using Units_l_inv by simp |
302 using Units_l_inv by simp |
290 (* |
303 |
291 lemma (in group) r_one [simp]: |
|
292 "x \<in> carrier G ==> x \<otimes> \<one> = x" |
|
293 proof - |
|
294 assume x: "x \<in> carrier G" |
|
295 then have "inv x \<otimes> (x \<otimes> \<one>) = inv x \<otimes> x" |
|
296 by (simp add: m_assoc [symmetric] l_inv) |
|
297 with x show ?thesis by simp |
|
298 qed |
|
299 *) |
|
300 lemma (in group) r_inv: |
304 lemma (in group) r_inv: |
301 "x \<in> carrier G ==> x \<otimes> inv x = \<one>" |
305 "x \<in> carrier G ==> x \<otimes> inv x = \<one>" |
302 proof - |
306 proof - |
303 assume x: "x \<in> carrier G" |
307 assume x: "x \<in> carrier G" |
304 then have "inv x \<otimes> (x \<otimes> inv x) = inv x \<otimes> \<one>" |
308 then have "inv x \<otimes> (x \<otimes> inv x) = inv x \<otimes> \<one>" |
343 assume G: "x \<in> carrier G" "y \<in> carrier G" |
347 assume G: "x \<in> carrier G" "y \<in> carrier G" |
344 then have "inv (x \<otimes> y) \<otimes> (x \<otimes> y) = (inv y \<otimes> inv x) \<otimes> (x \<otimes> y)" |
348 then have "inv (x \<otimes> y) \<otimes> (x \<otimes> y) = (inv y \<otimes> inv x) \<otimes> (x \<otimes> y)" |
345 by (simp add: m_assoc l_inv) (simp add: m_assoc [symmetric] l_inv) |
349 by (simp add: m_assoc l_inv) (simp add: m_assoc [symmetric] l_inv) |
346 with G show ?thesis by simp |
350 with G show ?thesis by simp |
347 qed |
351 qed |
|
352 |
|
353 lemma (in group) inv_comm: |
|
354 "[| x \<otimes> y = \<one>; x \<in> carrier G; y \<in> carrier G |] ==> y \<otimes> x = \<one>" |
|
355 by (rule Units_inv_comm) auto |
348 |
356 |
349 text {* Power *} |
357 text {* Power *} |
350 |
358 |
351 lemma (in group) int_pow_def2: |
359 lemma (in group) int_pow_def2: |
352 "a (^) (z::int) = (if neg z then inv (a (^) (nat (-z))) else a (^) (nat z))" |
360 "a (^) (z::int) = (if neg z then inv (a (^) (nat (-z))) else a (^) (nat z))" |