equal
deleted
inserted
replaced
409 shows "{a[^]x | x. x \<in> (UNIV :: nat set)} = {a[^]x | x. x \<in> {0 .. ord a - 1}}" (is "?L = ?R") |
409 shows "{a[^]x | x. x \<in> (UNIV :: nat set)} = {a[^]x | x. x \<in> {0 .. ord a - 1}}" (is "?L = ?R") |
410 proof |
410 proof |
411 show "?R \<subseteq> ?L" by blast |
411 show "?R \<subseteq> ?L" by blast |
412 { fix y assume "y \<in> ?L" |
412 { fix y assume "y \<in> ?L" |
413 then obtain x::nat where x:"y = a[^]x" by auto |
413 then obtain x::nat where x:"y = a[^]x" by auto |
414 define r where "r = x mod ord a" |
414 define r q where "r = x mod ord a" and "q = x div ord a" |
415 then obtain q where q:"x = q * ord a + r" using mod_eqD by atomize_elim presburger |
415 then have "x = q * ord a + r" |
|
416 by (simp add: div_mult_mod_eq) |
416 hence "y = (a[^]ord a)[^]q \<otimes> a[^]r" |
417 hence "y = (a[^]ord a)[^]q \<otimes> a[^]r" |
417 using x assms by (simp add: mult.commute nat_pow_mult nat_pow_pow) |
418 using x assms by (simp add: mult.commute nat_pow_mult nat_pow_pow) |
418 hence "y = a[^]r" using assms by (simp add: pow_ord_eq_1) |
419 hence "y = a[^]r" using assms by (simp add: pow_ord_eq_1) |
419 have "r < ord a" using ord_ge_1[OF assms] by (simp add: r_def) |
420 have "r < ord a" using ord_ge_1[OF assms] by (simp add: r_def) |
420 hence "r \<in> {0 .. ord a - 1}" by (force simp: r_def) |
421 hence "r \<in> {0 .. ord a - 1}" by (force simp: r_def) |
426 lemma ord_dvd_pow_eq_1 : |
427 lemma ord_dvd_pow_eq_1 : |
427 assumes "finite (carrier G)" "a \<in> carrier G" "a [^] k = \<one>" |
428 assumes "finite (carrier G)" "a \<in> carrier G" "a [^] k = \<one>" |
428 shows "ord a dvd k" |
429 shows "ord a dvd k" |
429 proof - |
430 proof - |
430 define r where "r = k mod ord a" |
431 define r where "r = k mod ord a" |
431 then obtain q where q:"k = q*ord a + r" using mod_eqD by atomize_elim presburger |
432 |
|
433 define r q where "r = k mod ord a" and "q = k div ord a" |
|
434 then have q: "k = q * ord a + r" |
|
435 by (simp add: div_mult_mod_eq) |
432 hence "a[^]k = (a[^]ord a)[^]q \<otimes> a[^]r" |
436 hence "a[^]k = (a[^]ord a)[^]q \<otimes> a[^]r" |
433 using assms by (simp add: mult.commute nat_pow_mult nat_pow_pow) |
437 using assms by (simp add: mult.commute nat_pow_mult nat_pow_pow) |
434 hence "a[^]k = a[^]r" using assms by (simp add: pow_ord_eq_1) |
438 hence "a[^]k = a[^]r" using assms by (simp add: pow_ord_eq_1) |
435 hence "a[^]r = \<one>" using assms(3) by simp |
439 hence "a[^]r = \<one>" using assms(3) by simp |
436 have "r < ord a" using ord_ge_1[OF assms(1-2)] by (simp add: r_def) |
440 have "r < ord a" using ord_ge_1[OF assms(1-2)] by (simp add: r_def) |