begin
Lm1:
for n, x, y being Nat st n > 1 & x >= 1 & 1 = (((x * y) * n) + x) + y holds
( x = 1 & y = 0 )
Lm2:
for n being Nat holds 2 |^ (2 |^ n) > 1
Lm3:
for n being Nat st n <> 0 holds
n - 1 >= 0
Lm4:
for n being Nat st n <> 0 holds
(n -' 1) + 1 = (n + 1) -' 1
theorem
theorem Th2:
theorem Th3:
theorem Th4:
theorem
theorem Th6:
theorem Th7:
theorem
theorem
theorem Th10:
theorem Th11:
theorem Th12:
Lm5:
for k, n being Nat holds (k * (2 |^ (n + 1))) div 2 = k * (2 |^ n)
Lm6:
for k, n, m being Nat st k <= n holds
m |^ k divides m |^ n
Lm7:
2 |^ 8 = 256
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem Th21:
theorem
theorem
theorem Th24:
theorem
canceled;
theorem Th26:
for
m,
n being
Nat st
m > 1 &
n > 0 holds
m |^ n > 1
Lm8:
for n being Nat holds (2 |^ (2 |^ n)) ^2 = 2 |^ (2 |^ (n + 1))
theorem Th27:
theorem Th28:
theorem Th29:
theorem
theorem Th31:
for
k,
n,
m being
Nat st
k > 1 &
k |^ n = k |^ m holds
n = m
Lm9:
for k, n, x being Nat st k > n & x > 1 holds
x |^ k > x |^ n
Lm10:
for m, n being Nat st 2 |^ m divides 2 |^ n holds
m <= n
theorem
theorem Th33:
theorem Th34:
theorem Th35:
theorem Th36:
theorem Th37:
theorem Th38:
theorem Th39:
theorem Th40:
Lm11:
for n, m being Nat st n > 1 & m > 1 & m,1 are_congruent_mod n holds
m mod n = 1
theorem
canceled;
theorem
canceled;
theorem Th43:
theorem Th44:
theorem Th45:
theorem
for
n being
Nat st
n <> 0 holds
- n < n ;
theorem
canceled;
theorem Th48:
begin
:: deftheorem defines Crypto PEPIN:def 1 :
for k, m, n being Nat holds Crypto (m,n,k) = (m |^ k) mod n;
theorem
begin
:: deftheorem Def2 defines order PEPIN:def 2 :
for i, p being Nat st p > 1 & i,p are_relative_prime holds
for b3 being Element of NAT holds
( b3 = order (i,p) iff ( b3 > 0 & (i |^ b3) mod p = 1 & ( for k being Nat st k > 0 & (i |^ k) mod p = 1 holds
( 0 < b3 & b3 <= k ) ) ) );
theorem
theorem
canceled;
theorem Th52:
theorem Th53:
theorem Th54:
begin
:: deftheorem defines Fermat PEPIN:def 3 :
for n being Nat holds Fermat n = (2 |^ (2 |^ n)) + 1;
theorem Th55:
theorem Th56:
theorem Th57:
theorem Th58:
theorem Th59:
theorem Th60:
Lm12:
for n being Nat holds Fermat n > 1
Lm13:
for n being Nat holds ((Fermat n) -' 1) mod 2 = 0
Lm14:
for n being Nat holds (Fermat n) -' 1 > 0
Lm15:
for n being Nat holds (Fermat n) mod (2 |^ (2 |^ n)) = 1
Lm16:
for n being Nat holds not Fermat n is even
theorem Th61:
theorem Th62:
begin
theorem Th63:
Lm17:
3 |^ 2 = 9
Lm18:
3 |^ 4 = 81
Lm19:
3 |^ 8 = 6561
Lm20:
3 |^ 16 = 6561 * 6561
Lm21:
for i being Nat holds Fermat 1 divides (3 |^ ((4 * i) + 2)) + 1
Lm22:
for n being Nat st n = 1 holds
3 |^ (((Fermat n) -' 1) div 2), - 1 are_congruent_mod Fermat n
Lm23:
for n being Nat holds Fermat 2 divides (3 |^ ((16 * n) + 8)) + 1
Lm24:
(3 |^ 1) mod (Fermat 3) = 3
Lm25:
(3 |^ 2) mod (Fermat 3) = 9
Lm26:
(3 |^ 4) mod (Fermat 3) = 81
Lm27:
(3 |^ 8) mod (Fermat 3) = 136
Lm28:
(3 |^ 16) mod (Fermat 3) = 83 * 3
Lm29:
(3 |^ 32) mod (Fermat 3) = 64
Lm30:
(3 |^ 64) mod (Fermat 3) = 241
Lm31:
(3 |^ 128) mod (Fermat 3) = 256
Lm32:
(3 |^ 1) mod (Fermat 4) = 3
Lm33:
(3 |^ 2) mod (Fermat 4) = 9
Lm34:
(3 |^ 4) mod (Fermat 4) = 81
Lm35:
(3 |^ 8) mod (Fermat 4) = 6561
Lm36:
(3 |^ 16) mod (Fermat 4) = (164 * 332) + 1
Lm37:
(3 |^ 32) mod (Fermat 4) = 123 * 503
Lm38:
(3 |^ 64) mod (Fermat 4) = (14 * 1367) + 1
Lm39:
(3 |^ 128) mod (Fermat 4) = 52 * 289
Lm40:
(3 |^ 256) mod (Fermat 4) = 282
Lm41:
(3 |^ (256 * 2)) mod (Fermat 4) = 71 * 197
Lm42:
(3 |^ (256 * 4)) mod (Fermat 4) = 32 * 257
Lm43:
(3 |^ (256 * 8)) mod (Fermat 4) = 81 * 809
Lm44:
(3 |^ (256 * 16)) mod (Fermat 4) = 64
Lm45:
(3 |^ (256 * 32)) mod (Fermat 4) = 256 * 16
Lm46:
(3 |^ (256 * 64)) mod (Fermat 4) = 673 * 97
Lm47:
(3 |^ (256 * 128)) mod (Fermat 4) = 256 * 256
Lm48:
Fermat 3 divides (3 |^ ((32 * 0) + 128)) + 1
Lm49:
Fermat 4 divides (3 |^ ((64 * 0) + (256 * 128))) + 1
theorem
theorem
theorem
theorem
theorem Th68:
theorem
theorem Th70:
theorem