author | wenzelm |
Thu, 13 Jan 2011 23:50:16 +0100 | |
changeset 41541 | 1fa4725c4656 |
parent 36350 | bc7982c54e37 |
child 41959 | b460124855b8 |
permissions | -rw-r--r-- |
31719 | 1 |
(* Title: HOL/Library/Residues.thy |
2 |
Author: Jeremy Avigad |
|
3 |
||
41541 | 4 |
An algebraic treatment of residue rings, and resulting proofs of |
5 |
Euler's theorem and Wilson's theorem. |
|
31719 | 6 |
*) |
7 |
||
8 |
header {* Residue rings *} |
|
9 |
||
10 |
theory Residues |
|
11 |
imports |
|
41541 | 12 |
UniqueFactorization |
13 |
Binomial |
|
14 |
MiscAlgebra |
|
31719 | 15 |
begin |
16 |
||
17 |
||
18 |
(* |
|
19 |
||
20 |
A locale for residue rings |
|
21 |
||
22 |
*) |
|
23 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32479
diff
changeset
|
24 |
definition residue_ring :: "int => int ring" where |
31719 | 25 |
"residue_ring m == (| |
26 |
carrier = {0..m - 1}, |
|
27 |
mult = (%x y. (x * y) mod m), |
|
28 |
one = 1, |
|
29 |
zero = 0, |
|
30 |
add = (%x y. (x + y) mod m) |)" |
|
31 |
||
32 |
locale residues = |
|
33 |
fixes m :: int and R (structure) |
|
34 |
assumes m_gt_one: "m > 1" |
|
35 |
defines "R == residue_ring m" |
|
36 |
||
37 |
context residues begin |
|
38 |
||
39 |
lemma abelian_group: "abelian_group R" |
|
40 |
apply (insert m_gt_one) |
|
41 |
apply (rule abelian_groupI) |
|
42 |
apply (unfold R_def residue_ring_def) |
|
41541 | 43 |
apply (auto simp add: mod_add_right_eq [symmetric] add_ac) |
31719 | 44 |
apply (case_tac "x = 0") |
45 |
apply force |
|
46 |
apply (subgoal_tac "(x + (m - x)) mod m = 0") |
|
47 |
apply (erule bexI) |
|
48 |
apply auto |
|
41541 | 49 |
done |
31719 | 50 |
|
51 |
lemma comm_monoid: "comm_monoid R" |
|
52 |
apply (insert m_gt_one) |
|
53 |
apply (unfold R_def residue_ring_def) |
|
54 |
apply (rule comm_monoidI) |
|
55 |
apply auto |
|
56 |
apply (subgoal_tac "x * y mod m * z mod m = z * (x * y mod m) mod m") |
|
57 |
apply (erule ssubst) |
|
58 |
apply (subst zmod_zmult1_eq [symmetric])+ |
|
59 |
apply (simp_all only: mult_ac) |
|
41541 | 60 |
done |
31719 | 61 |
|
62 |
lemma cring: "cring R" |
|
63 |
apply (rule cringI) |
|
64 |
apply (rule abelian_group) |
|
65 |
apply (rule comm_monoid) |
|
66 |
apply (unfold R_def residue_ring_def, auto) |
|
67 |
apply (subst mod_add_eq [symmetric]) |
|
68 |
apply (subst mult_commute) |
|
69 |
apply (subst zmod_zmult1_eq [symmetric]) |
|
36350 | 70 |
apply (simp add: field_simps) |
41541 | 71 |
done |
31719 | 72 |
|
73 |
end |
|
74 |
||
75 |
sublocale residues < cring |
|
76 |
by (rule cring) |
|
77 |
||
78 |
||
41541 | 79 |
context residues |
80 |
begin |
|
31719 | 81 |
|
82 |
(* These lemmas translate back and forth between internal and |
|
83 |
external concepts *) |
|
84 |
||
85 |
lemma res_carrier_eq: "carrier R = {0..m - 1}" |
|
86 |
by (unfold R_def residue_ring_def, auto) |
|
87 |
||
88 |
lemma res_add_eq: "x \<oplus> y = (x + y) mod m" |
|
89 |
by (unfold R_def residue_ring_def, auto) |
|
90 |
||
91 |
lemma res_mult_eq: "x \<otimes> y = (x * y) mod m" |
|
92 |
by (unfold R_def residue_ring_def, auto) |
|
93 |
||
94 |
lemma res_zero_eq: "\<zero> = 0" |
|
95 |
by (unfold R_def residue_ring_def, auto) |
|
96 |
||
97 |
lemma res_one_eq: "\<one> = 1" |
|
41541 | 98 |
by (unfold R_def residue_ring_def units_of_def, auto) |
31719 | 99 |
|
100 |
lemma res_units_eq: "Units R = { x. 0 < x & x < m & coprime x m}" |
|
101 |
apply (insert m_gt_one) |
|
102 |
apply (unfold Units_def R_def residue_ring_def) |
|
103 |
apply auto |
|
104 |
apply (subgoal_tac "x ~= 0") |
|
105 |
apply auto |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
106 |
apply (rule invertible_coprime_int) |
31719 | 107 |
apply (subgoal_tac "x ~= 0") |
108 |
apply auto |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
109 |
apply (subst (asm) coprime_iff_invertible'_int) |
31719 | 110 |
apply (rule m_gt_one) |
111 |
apply (auto simp add: cong_int_def mult_commute) |
|
41541 | 112 |
done |
31719 | 113 |
|
114 |
lemma res_neg_eq: "\<ominus> x = (- x) mod m" |
|
115 |
apply (insert m_gt_one) |
|
116 |
apply (unfold R_def a_inv_def m_inv_def residue_ring_def) |
|
117 |
apply auto |
|
118 |
apply (rule the_equality) |
|
119 |
apply auto |
|
120 |
apply (subst mod_add_right_eq [symmetric]) |
|
121 |
apply auto |
|
122 |
apply (subst mod_add_left_eq [symmetric]) |
|
123 |
apply auto |
|
124 |
apply (subgoal_tac "y mod m = - x mod m") |
|
125 |
apply simp |
|
126 |
apply (subst zmod_eq_dvd_iff) |
|
127 |
apply auto |
|
41541 | 128 |
done |
31719 | 129 |
|
130 |
lemma finite [iff]: "finite(carrier R)" |
|
131 |
by (subst res_carrier_eq, auto) |
|
132 |
||
133 |
lemma finite_Units [iff]: "finite(Units R)" |
|
134 |
by (subst res_units_eq, auto) |
|
135 |
||
136 |
(* The function a -> a mod m maps the integers to the |
|
137 |
residue classes. The following lemmas show that this mapping |
|
138 |
respects addition and multiplication on the integers. *) |
|
139 |
||
140 |
lemma mod_in_carrier [iff]: "a mod m : carrier R" |
|
141 |
apply (unfold res_carrier_eq) |
|
142 |
apply (insert m_gt_one, auto) |
|
41541 | 143 |
done |
31719 | 144 |
|
145 |
lemma add_cong: "(x mod m) \<oplus> (y mod m) = (x + y) mod m" |
|
146 |
by (unfold R_def residue_ring_def, auto, arith) |
|
147 |
||
148 |
lemma mult_cong: "(x mod m) \<otimes> (y mod m) = (x * y) mod m" |
|
149 |
apply (unfold R_def residue_ring_def, auto) |
|
150 |
apply (subst zmod_zmult1_eq [symmetric]) |
|
151 |
apply (subst mult_commute) |
|
152 |
apply (subst zmod_zmult1_eq [symmetric]) |
|
153 |
apply (subst mult_commute) |
|
154 |
apply auto |
|
41541 | 155 |
done |
31719 | 156 |
|
157 |
lemma zero_cong: "\<zero> = 0" |
|
158 |
apply (unfold R_def residue_ring_def, auto) |
|
41541 | 159 |
done |
31719 | 160 |
|
161 |
lemma one_cong: "\<one> = 1 mod m" |
|
162 |
apply (insert m_gt_one) |
|
163 |
apply (unfold R_def residue_ring_def, auto) |
|
41541 | 164 |
done |
31719 | 165 |
|
166 |
(* revise algebra library to use 1? *) |
|
167 |
lemma pow_cong: "(x mod m) (^) n = x^n mod m" |
|
168 |
apply (insert m_gt_one) |
|
169 |
apply (induct n) |
|
41541 | 170 |
apply (auto simp add: nat_pow_def one_cong) |
31719 | 171 |
apply (subst mult_commute) |
172 |
apply (rule mult_cong) |
|
41541 | 173 |
done |
31719 | 174 |
|
175 |
lemma neg_cong: "\<ominus> (x mod m) = (- x) mod m" |
|
176 |
apply (rule sym) |
|
177 |
apply (rule sum_zero_eq_neg) |
|
178 |
apply auto |
|
179 |
apply (subst add_cong) |
|
180 |
apply (subst zero_cong) |
|
181 |
apply auto |
|
41541 | 182 |
done |
31719 | 183 |
|
184 |
lemma (in residues) prod_cong: |
|
185 |
"finite A \<Longrightarrow> (\<Otimes> i:A. (f i) mod m) = (PROD i:A. f i) mod m" |
|
186 |
apply (induct set: finite) |
|
31727 | 187 |
apply (auto simp: one_cong mult_cong) |
41541 | 188 |
done |
31719 | 189 |
|
190 |
lemma (in residues) sum_cong: |
|
191 |
"finite A \<Longrightarrow> (\<Oplus> i:A. (f i) mod m) = (SUM i: A. f i) mod m" |
|
192 |
apply (induct set: finite) |
|
31727 | 193 |
apply (auto simp: zero_cong add_cong) |
41541 | 194 |
done |
31719 | 195 |
|
196 |
lemma mod_in_res_units [simp]: "1 < m \<Longrightarrow> coprime a m \<Longrightarrow> |
|
197 |
a mod m : Units R" |
|
198 |
apply (subst res_units_eq, auto) |
|
199 |
apply (insert pos_mod_sign [of m a]) |
|
200 |
apply (subgoal_tac "a mod m ~= 0") |
|
201 |
apply arith |
|
202 |
apply auto |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
203 |
apply (subst (asm) gcd_red_int) |
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
204 |
apply (subst gcd_commute_int, assumption) |
41541 | 205 |
done |
31719 | 206 |
|
207 |
lemma res_eq_to_cong: "((a mod m) = (b mod m)) = [a = b] (mod (m::int))" |
|
208 |
unfolding cong_int_def by auto |
|
209 |
||
210 |
(* Simplifying with these will translate a ring equation in R to a |
|
211 |
congruence. *) |
|
212 |
||
213 |
lemmas res_to_cong_simps = add_cong mult_cong pow_cong one_cong |
|
214 |
prod_cong sum_cong neg_cong res_eq_to_cong |
|
215 |
||
216 |
(* Other useful facts about the residue ring *) |
|
217 |
||
218 |
lemma one_eq_neg_one: "\<one> = \<ominus> \<one> \<Longrightarrow> m = 2" |
|
219 |
apply (simp add: res_one_eq res_neg_eq) |
|
220 |
apply (insert m_gt_one) |
|
221 |
apply (subgoal_tac "~(m > 2)") |
|
222 |
apply arith |
|
223 |
apply (rule notI) |
|
224 |
apply (subgoal_tac "-1 mod m = m - 1") |
|
225 |
apply force |
|
226 |
apply (subst mod_add_self2 [symmetric]) |
|
227 |
apply (subst mod_pos_pos_trivial) |
|
228 |
apply auto |
|
41541 | 229 |
done |
31719 | 230 |
|
231 |
end |
|
232 |
||
233 |
||
234 |
(* prime residues *) |
|
235 |
||
236 |
locale residues_prime = |
|
237 |
fixes p :: int and R (structure) |
|
238 |
assumes p_prime [intro]: "prime p" |
|
239 |
defines "R == residue_ring p" |
|
240 |
||
241 |
sublocale residues_prime < residues p |
|
242 |
apply (unfold R_def residues_def) |
|
243 |
using p_prime apply auto |
|
41541 | 244 |
done |
31719 | 245 |
|
246 |
context residues_prime begin |
|
247 |
||
248 |
lemma is_field: "field R" |
|
249 |
apply (rule cring.field_intro2) |
|
250 |
apply (rule cring) |
|
251 |
apply (auto simp add: res_carrier_eq res_one_eq res_zero_eq |
|
252 |
res_units_eq) |
|
253 |
apply (rule classical) |
|
254 |
apply (erule notE) |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
255 |
apply (subst gcd_commute_int) |
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
256 |
apply (rule prime_imp_coprime_int) |
31719 | 257 |
apply (rule p_prime) |
258 |
apply (rule notI) |
|
259 |
apply (frule zdvd_imp_le) |
|
260 |
apply auto |
|
41541 | 261 |
done |
31719 | 262 |
|
263 |
lemma res_prime_units_eq: "Units R = {1..p - 1}" |
|
264 |
apply (subst res_units_eq) |
|
265 |
apply auto |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
266 |
apply (subst gcd_commute_int) |
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
267 |
apply (rule prime_imp_coprime_int) |
31719 | 268 |
apply (rule p_prime) |
269 |
apply (rule zdvd_not_zless) |
|
270 |
apply auto |
|
41541 | 271 |
done |
31719 | 272 |
|
273 |
end |
|
274 |
||
275 |
sublocale residues_prime < field |
|
276 |
by (rule is_field) |
|
277 |
||
278 |
||
279 |
(* |
|
280 |
Test cases: Euler's theorem and Wilson's theorem. |
|
281 |
*) |
|
282 |
||
283 |
||
284 |
subsection{* Euler's theorem *} |
|
285 |
||
286 |
(* the definition of the phi function *) |
|
287 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
32479
diff
changeset
|
288 |
definition phi :: "int => nat" where |
31719 | 289 |
"phi m == card({ x. 0 < x & x < m & gcd x m = 1})" |
290 |
||
291 |
lemma phi_zero [simp]: "phi 0 = 0" |
|
292 |
apply (subst phi_def) |
|
293 |
(* Auto hangs here. Once again, where is the simplification rule |
|
294 |
1 == Suc 0 coming from? *) |
|
295 |
apply (auto simp add: card_eq_0_iff) |
|
296 |
(* Add card_eq_0_iff as a simp rule? delete card_empty_imp? *) |
|
41541 | 297 |
done |
31719 | 298 |
|
299 |
lemma phi_one [simp]: "phi 1 = 0" |
|
300 |
apply (auto simp add: phi_def card_eq_0_iff) |
|
41541 | 301 |
done |
31719 | 302 |
|
303 |
lemma (in residues) phi_eq: "phi m = card(Units R)" |
|
304 |
by (simp add: phi_def res_units_eq) |
|
305 |
||
306 |
lemma (in residues) euler_theorem1: |
|
307 |
assumes a: "gcd a m = 1" |
|
308 |
shows "[a^phi m = 1] (mod m)" |
|
309 |
proof - |
|
310 |
from a m_gt_one have [simp]: "a mod m : Units R" |
|
311 |
by (intro mod_in_res_units) |
|
312 |
from phi_eq have "(a mod m) (^) (phi m) = (a mod m) (^) (card (Units R))" |
|
313 |
by simp |
|
314 |
also have "\<dots> = \<one>" |
|
315 |
by (intro units_power_order_eq_one, auto) |
|
316 |
finally show ?thesis |
|
317 |
by (simp add: res_to_cong_simps) |
|
318 |
qed |
|
319 |
||
320 |
(* In fact, there is a two line proof! |
|
321 |
||
322 |
lemma (in residues) euler_theorem1: |
|
323 |
assumes a: "gcd a m = 1" |
|
324 |
shows "[a^phi m = 1] (mod m)" |
|
325 |
proof - |
|
326 |
have "(a mod m) (^) (phi m) = \<one>" |
|
327 |
by (simp add: phi_eq units_power_order_eq_one a m_gt_one) |
|
328 |
thus ?thesis |
|
329 |
by (simp add: res_to_cong_simps) |
|
330 |
qed |
|
331 |
||
332 |
*) |
|
333 |
||
334 |
(* outside the locale, we can relax the restriction m > 1 *) |
|
335 |
||
336 |
lemma euler_theorem: |
|
337 |
assumes "m >= 0" and "gcd a m = 1" |
|
338 |
shows "[a^phi m = 1] (mod m)" |
|
339 |
proof (cases) |
|
340 |
assume "m = 0 | m = 1" |
|
341 |
thus ?thesis by auto |
|
342 |
next |
|
343 |
assume "~(m = 0 | m = 1)" |
|
41541 | 344 |
with assms show ?thesis |
31719 | 345 |
by (intro residues.euler_theorem1, unfold residues_def, auto) |
346 |
qed |
|
347 |
||
348 |
lemma (in residues_prime) phi_prime: "phi p = (nat p - 1)" |
|
349 |
apply (subst phi_eq) |
|
350 |
apply (subst res_prime_units_eq) |
|
351 |
apply auto |
|
41541 | 352 |
done |
31719 | 353 |
|
354 |
lemma phi_prime: "prime p \<Longrightarrow> phi p = (nat p - 1)" |
|
355 |
apply (rule residues_prime.phi_prime) |
|
356 |
apply (erule residues_prime.intro) |
|
41541 | 357 |
done |
31719 | 358 |
|
359 |
lemma fermat_theorem: |
|
360 |
assumes "prime p" and "~ (p dvd a)" |
|
361 |
shows "[a^(nat p - 1) = 1] (mod p)" |
|
362 |
proof - |
|
41541 | 363 |
from assms have "[a^phi p = 1] (mod p)" |
31719 | 364 |
apply (intro euler_theorem) |
365 |
(* auto should get this next part. matching across |
|
366 |
substitutions is needed. *) |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
367 |
apply (frule prime_gt_1_int, arith) |
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
368 |
apply (subst gcd_commute_int, erule prime_imp_coprime_int, assumption) |
31719 | 369 |
done |
370 |
also have "phi p = nat p - 1" |
|
41541 | 371 |
by (rule phi_prime, rule assms) |
31719 | 372 |
finally show ?thesis . |
373 |
qed |
|
374 |
||
375 |
||
376 |
subsection {* Wilson's theorem *} |
|
377 |
||
378 |
lemma (in field) inv_pair_lemma: "x : Units R \<Longrightarrow> y : Units R \<Longrightarrow> |
|
41541 | 379 |
{x, inv x} ~= {y, inv y} \<Longrightarrow> {x, inv x} Int {y, inv y} = {}" |
31719 | 380 |
apply auto |
381 |
apply (erule notE) |
|
382 |
apply (erule inv_eq_imp_eq) |
|
383 |
apply auto |
|
384 |
apply (erule notE) |
|
385 |
apply (erule inv_eq_imp_eq) |
|
386 |
apply auto |
|
41541 | 387 |
done |
31719 | 388 |
|
389 |
lemma (in residues_prime) wilson_theorem1: |
|
390 |
assumes a: "p > 2" |
|
391 |
shows "[fact (p - 1) = - 1] (mod p)" |
|
392 |
proof - |
|
393 |
let ?InversePairs = "{ {x, inv x} | x. x : Units R - {\<one>, \<ominus> \<one>}}" |
|
31732 | 394 |
have UR: "Units R = {\<one>, \<ominus> \<one>} Un (Union ?InversePairs)" |
31719 | 395 |
by auto |
31732 | 396 |
have "(\<Otimes>i: Units R. i) = |
31719 | 397 |
(\<Otimes>i: {\<one>, \<ominus> \<one>}. i) \<otimes> (\<Otimes>i: Union ?InversePairs. i)" |
31732 | 398 |
apply (subst UR) |
31719 | 399 |
apply (subst finprod_Un_disjoint) |
31732 | 400 |
apply (auto intro:funcsetI) |
31719 | 401 |
apply (drule sym, subst (asm) inv_eq_one_eq) |
402 |
apply auto |
|
403 |
apply (drule sym, subst (asm) inv_eq_neg_one_eq) |
|
404 |
apply auto |
|
405 |
done |
|
406 |
also have "(\<Otimes>i: {\<one>, \<ominus> \<one>}. i) = \<ominus> \<one>" |
|
407 |
apply (subst finprod_insert) |
|
408 |
apply auto |
|
409 |
apply (frule one_eq_neg_one) |
|
410 |
apply (insert a, force) |
|
411 |
done |
|
412 |
also have "(\<Otimes>i:(Union ?InversePairs). i) = |
|
41541 | 413 |
(\<Otimes>A: ?InversePairs. (\<Otimes>y:A. y))" |
31719 | 414 |
apply (subst finprod_Union_disjoint) |
415 |
apply force |
|
416 |
apply force |
|
417 |
apply clarify |
|
418 |
apply (rule inv_pair_lemma) |
|
419 |
apply auto |
|
420 |
done |
|
421 |
also have "\<dots> = \<one>" |
|
422 |
apply (rule finprod_one) |
|
423 |
apply auto |
|
424 |
apply (subst finprod_insert) |
|
425 |
apply auto |
|
426 |
apply (frule inv_eq_self) |
|
31732 | 427 |
apply (auto) |
31719 | 428 |
done |
429 |
finally have "(\<Otimes>i: Units R. i) = \<ominus> \<one>" |
|
430 |
by simp |
|
431 |
also have "(\<Otimes>i: Units R. i) = (\<Otimes>i: Units R. i mod p)" |
|
432 |
apply (rule finprod_cong') |
|
31732 | 433 |
apply (auto) |
31719 | 434 |
apply (subst (asm) res_prime_units_eq) |
435 |
apply auto |
|
436 |
done |
|
437 |
also have "\<dots> = (PROD i: Units R. i) mod p" |
|
438 |
apply (rule prod_cong) |
|
439 |
apply auto |
|
440 |
done |
|
441 |
also have "\<dots> = fact (p - 1) mod p" |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
442 |
apply (subst fact_altdef_int) |
41541 | 443 |
apply (insert assms, force) |
31719 | 444 |
apply (subst res_prime_units_eq, rule refl) |
445 |
done |
|
446 |
finally have "fact (p - 1) mod p = \<ominus> \<one>". |
|
447 |
thus ?thesis |
|
448 |
by (simp add: res_to_cong_simps) |
|
449 |
qed |
|
450 |
||
451 |
lemma wilson_theorem: "prime (p::int) \<Longrightarrow> [fact (p - 1) = - 1] (mod p)" |
|
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
452 |
apply (frule prime_gt_1_int) |
31719 | 453 |
apply (case_tac "p = 2") |
31952
40501bb2d57c
renamed lemmas: nat_xyz/int_xyz -> xyz_nat/xyz_int
nipkow
parents:
31798
diff
changeset
|
454 |
apply (subst fact_altdef_int, simp) |
31719 | 455 |
apply (subst cong_int_def) |
456 |
apply simp |
|
457 |
apply (rule residues_prime.wilson_theorem1) |
|
458 |
apply (rule residues_prime.intro) |
|
459 |
apply auto |
|
460 |
done |
|
461 |
||
462 |
||
463 |
end |