:: PEPIN semantic presentation
Lemma1:
for b1, b2 being Integer
for b3, b4 being Nat holds
( b1 = b3 & b2 = b4 implies ( b1 divides b2 iff b3 divides b4 ) )
Lemma2:
for b1 being Nat
for b2 being Integer holds
not ( b1 > 1 & b1 * b2 > 0 & not b2 > 0 )
by XREAL_1:133;
Lemma3:
for b1, b2, b3 being Nat holds
( b1 > 1 & b2 >= 1 & b3 >= 0 & 1 = (((b2 * b3) * b1) + b2) + b3 implies ( b2 = 1 & b3 = 0 ) )
Lemma4:
for b1 being Nat holds
2 |^ (2 |^ b1) > 1
Lemma5:
for b1 being Nat holds
( b1 <> 0 implies b1 - 1 >= 0 )
Lemma6:
for b1 being Nat holds
( b1 <> 0 implies (b1 -' 1) + 1 = (b1 + 1) -' 1 )
theorem Th1: :: PEPIN:1
theorem Th2: :: PEPIN:2
theorem Th3: :: PEPIN:3
theorem Th4: :: PEPIN:4
theorem Th5: :: PEPIN:5
theorem Th6: :: PEPIN:6
for b
1, b
2 being
Nat holds
( b
2 <> 0 implies ( b
2 divides b
1 iff b
1 mod b
2 = 0 ) )
theorem Th7: :: PEPIN:7
theorem Th8: :: PEPIN:8
for b
1, b
2, b
3 being
Nat holds
( 0
< b
1 & b
2 mod b
1 = b
3 implies b
1 divides b
2 - b
3 )
theorem Th9: :: PEPIN:9
for b
1, b
2, b
3 being
Nat holds
( b
1 * b
2 <> 0 & b
2 is
prime & b
3 mod (b1 * b2) < b
2 implies b
3 mod (b1 * b2) = b
3 mod b
2 )
theorem Th10: :: PEPIN:10
theorem Th11: :: PEPIN:11
theorem Th12: :: PEPIN:12
Lemma15:
for b1, b2 being Nat holds (b1 * (2 |^ (b2 + 1))) div 2 = b1 * (2 |^ b2)
Lemma16:
for b1, b2, b3 being Nat holds
( b1 <= b2 implies b3 |^ b1 divides b3 |^ b2 )
Lemma17:
2 |^ 2 = 4
Lemma18:
2 |^ 3 = 8
Lemma19:
2 |^ 4 = 16
Lemma20:
2 |^ 8 = 256
theorem Th13: :: PEPIN:13
for b
1 being
Nat holds
( b
1 <> 0 implies
(b1 ^2 ) mod (b1 + 1) = 1 )
theorem Th14: :: PEPIN:14
for b
1, b
2, b
3 being
Nat holds
( b
1 ^2 < b
2 & b
3 mod b
2 = b
1 implies
(b3 ^2 ) mod b
2 = b
1 ^2 )
theorem Th15: :: PEPIN:15
theorem Th16: :: PEPIN:16
theorem Th17: :: PEPIN:17
theorem Th18: :: PEPIN:18
Lemma22:
for b1, b2 being Nat holds
( b1 is even & b2 is even implies b1 * b2 is even )
theorem Th19: :: PEPIN:19
for b
1, b
2 being
Nat holds
not ( not b
1 is
even & not b
2 is
even & b
1 * b
2 is
even )
theorem Th20: :: PEPIN:20
for b
1, b
2 being
Nat holds
not ( not b
1 is
even & b
1 |^ b
2 is
even )
theorem Th21: :: PEPIN:21
for b
1, b
2 being
Nat holds
( b
1 > 0 & b
2 is
even implies b
2 |^ b
1 is
even )
theorem Th22: :: PEPIN:22
theorem Th23: :: PEPIN:23
theorem Th24: :: PEPIN:24
theorem Th25: :: PEPIN:25
canceled;
theorem Th26: :: PEPIN:26
for b
1, b
2 being
Nat holds
not ( b
1 > 1 & b
2 > 0 & not b
1 |^ b
2 > 1 )
Lemma27:
for b1 being Nat holds (2 |^ (2 |^ b1)) ^2 = 2 |^ (2 |^ (b1 + 1))
theorem Th27: :: PEPIN:27
for b
1, b
2 being
Nat holds
( b
1 <> 0 & b
2 <> 0 implies b
1 |^ b
2 = b
1 * (b1 |^ (b2 -' 1)) )
theorem Th28: :: PEPIN:28
theorem Th29: :: PEPIN:29
for b
1, b
2 being
Nat holds
( b
1 <> 0 & 1
<= b
2 implies
(b1 |^ b2) div b
1 = b
1 |^ (b2 -' 1) )
theorem Th30: :: PEPIN:30
for b
1 being
Nat holds 2
|^ (b1 + 1) = (2 |^ b1) + (2 |^ b1)
theorem Th31: :: PEPIN:31
for b
1, b
2, b
3 being
Nat holds
( b
1 > 1 & b
1 |^ b
2 = b
1 |^ b
3 implies b
2 = b
3 )
Lemma32:
for b1, b2, b3 being Nat holds
not ( b1 > b2 & b3 > 1 & not b3 |^ b1 > b3 |^ b2 )
Lemma33:
for b1, b2 being Nat holds
( 2 |^ b1 divides 2 |^ b2 implies b1 <= b2 )
theorem Th32: :: PEPIN:32
theorem Th33: :: PEPIN:33
for b
1, b
2, b
3 being
Nat holds
not ( b
1 is
prime & b
2 divides b
1 |^ b
3 & not b
2 = 1 & ( for b
4 being
Nat holds
not b
2 = b
1 * b
4 ) )
theorem Th34: :: PEPIN:34
theorem Th35: :: PEPIN:35
for b
1, b
2, b
3 being
Nat holds
not ( b
1 is
prime & b
2 divides b
1 |^ b
3 & b
2 <> 0 & ( for b
4 being
Nat holds
not ( b
2 = b
1 |^ b
4 & b
4 <= b
3 ) ) )
theorem Th36: :: PEPIN:36
for b
1, b
2, b
3 being
Nat holds
( b
1 > 1 & b
2 mod b
1 = 1 implies
(b2 |^ b3) mod b
1 = 1 )
theorem Th37: :: PEPIN:37
theorem Th38: :: PEPIN:38
theorem Th39: :: PEPIN:39
theorem Th40: :: PEPIN:40
Lemma42:
for b1, b2 being Nat holds
( b1 > 1 & b2 > 1 & b2,1 are_congruent_mod b1 implies b2 mod b1 = 1 )
theorem Th41: :: PEPIN:41
theorem Th42: :: PEPIN:42
canceled;
theorem Th43: :: PEPIN:43
theorem Th44: :: PEPIN:44
theorem Th45: :: PEPIN:45
theorem Th46: :: PEPIN:46
for b
1 being
Nat holds
not ( b
1 <> 0 & not
- b
1 < b
1 ) ;
theorem Th47: :: PEPIN:47
canceled;
theorem Th48: :: PEPIN:48
for b
1 being
Nat holds
( b
1 <> 0 implies b
1 div b
1 = 1 )
:: deftheorem Def1 defines Crypto PEPIN:def 1 :
theorem Th49: :: PEPIN:49
:: deftheorem Def2 defines order PEPIN:def 2 :
theorem Th50: :: PEPIN:50
for b
1 being
Nat holds
( b
1 > 1 implies
order 1,b
1 = 1 )
theorem Th51: :: PEPIN:51
canceled;
theorem Th52: :: PEPIN:52
theorem Th53: :: PEPIN:53
theorem Th54: :: PEPIN:54
:: deftheorem Def3 defines Fermat PEPIN:def 3 :
theorem Th55: :: PEPIN:55
theorem Th56: :: PEPIN:56
theorem Th57: :: PEPIN:57
theorem Th58: :: PEPIN:58
theorem Th59: :: PEPIN:59
theorem Th60: :: PEPIN:60
Lemma58:
for b1 being Nat holds
Fermat b1 > 1
Lemma59:
for b1 being Nat holds ((Fermat b1) -' 1) mod 2 = 0
Lemma60:
for b1 being Nat holds
(Fermat b1) -' 1 > 0
Lemma61:
for b1 being Nat holds (Fermat b1) mod (2 |^ (2 |^ b1)) = 1
Lemma62:
for b1 being Nat holds
not Fermat b1 is even
theorem Th61: :: PEPIN:61
theorem Th62: :: PEPIN:62
theorem Th63: :: PEPIN:63
Lemma66:
3 |^ 2 = 9
Lemma67:
3 |^ 4 = 81
Lemma68:
3 |^ 8 = 6561
Lemma69:
3 |^ 16 = 6561 * 6561
Lemma70:
for b1 being Nat holds Fermat 1 divides (3 |^ ((4 * b1) + 2)) + 1
Lemma71:
for b1 being Nat holds
( b1 = 1 implies 3 |^ (((Fermat b1) -' 1) div 2), - 1 are_congruent_mod Fermat b1 )
Lemma72:
for b1 being Nat holds Fermat 2 divides (3 |^ ((16 * b1) + 8)) + 1
Lemma73:
(3 |^ 1) mod (Fermat 3) = 3
Lemma74:
(3 |^ 2) mod (Fermat 3) = 9
Lemma75:
(3 |^ 4) mod (Fermat 3) = 81
Lemma76:
(3 |^ 8) mod (Fermat 3) = 136
Lemma77:
(3 |^ 16) mod (Fermat 3) = 83 * 3
Lemma78:
(3 |^ 32) mod (Fermat 3) = 64
Lemma79:
(3 |^ 64) mod (Fermat 3) = 241
Lemma80:
(3 |^ 128) mod (Fermat 3) = 256
Lemma81:
(3 |^ 1) mod (Fermat 4) = 3
Lemma82:
(3 |^ 2) mod (Fermat 4) = 9
Lemma83:
(3 |^ 4) mod (Fermat 4) = 81
Lemma84:
(3 |^ 8) mod (Fermat 4) = 6561
Lemma85:
(3 |^ 16) mod (Fermat 4) = (164 * 332) + 1
Lemma86:
(3 |^ 32) mod (Fermat 4) = 123 * 503
Lemma87:
(3 |^ 64) mod (Fermat 4) = (14 * 1367) + 1
Lemma88:
(3 |^ 128) mod (Fermat 4) = 52 * 289
Lemma89:
(3 |^ 256) mod (Fermat 4) = 282
Lemma90:
(3 |^ (256 * 2)) mod (Fermat 4) = 71 * 197
Lemma91:
(3 |^ (256 * 4)) mod (Fermat 4) = 32 * 257
Lemma92:
(3 |^ (256 * 8)) mod (Fermat 4) = 81 * 809
Lemma93:
(3 |^ (256 * 16)) mod (Fermat 4) = 64
Lemma94:
(3 |^ (256 * 32)) mod (Fermat 4) = 256 * 16
Lemma95:
(3 |^ (256 * 64)) mod (Fermat 4) = 673 * 97
Lemma96:
(3 |^ (256 * 128)) mod (Fermat 4) = 256 * 256
Lemma97:
Fermat 3 divides (3 |^ ((32 * 0) + 128)) + 1
Lemma98:
Fermat 4 divides (3 |^ ((64 * 0) + (256 * 128))) + 1
theorem Th64: :: PEPIN:64
theorem Th65: :: PEPIN:65
theorem Th66: :: PEPIN:66
theorem Th67: :: PEPIN:67
theorem Th68: :: PEPIN:68
theorem Th69: :: PEPIN:69
theorem Th70: :: PEPIN:70
theorem Th71: :: PEPIN:71