equal
deleted
inserted
replaced
289 case True |
289 case True |
290 then show ?thesis by auto |
290 then show ?thesis by auto |
291 next |
291 next |
292 case False |
292 case False |
293 with assms show ?thesis |
293 with assms show ?thesis |
294 using residues.euler_theorem [of "int m" "int a"] transfer_int_nat_cong |
294 using residues.euler_theorem [of "int m" "int a"] cong_int_iff |
295 by (auto simp add: residues_def gcd_int_def) force |
295 by (auto simp add: residues_def gcd_int_def) fastforce |
296 qed |
296 qed |
297 |
297 |
298 lemma fermat_theorem: |
298 lemma fermat_theorem: |
299 fixes p a :: nat |
299 fixes p a :: nat |
300 assumes "prime p" and "\<not> p dvd a" |
300 assumes "prime p" and "\<not> p dvd a" |