:: IDEA_1 semantic presentation
Lemma1:
for b1, b2 being Nat holds
( b1 <> 0 & b1 < b2 & b2 is prime implies b1,b2 are_relative_prime )
Lemma2:
for b1, b2, b3 being Nat holds
not ( b1 is prime & b2 < b1 & b3 < b1 & b2 <> 0 & ( for b4 being Nat holds
not (b4 * b2) mod b1 = b3 ) )
theorem Th1: :: IDEA_1:1
for b
1, b
2, b
3 being
Nat holds
not ( b
2 is
prime & b
1 < b
2 & b
3 < b
2 & b
1 <> 0 & ( for b
4 being
Nat holds
not (
(b4 * b1) mod b
2 = b
3 & b
4 < b
2 ) ) )
theorem Th2: :: IDEA_1:2
for b
1, b
2, b
3 being
Nat holds
not ( b
1 <> 0 & b
2 mod b
1 = b
3 mod b
1 & b
2 <= b
3 & ( for b
4 being
Nat holds
not b
3 - b
2 = b
1 * b
4 ) )
theorem Th3: :: IDEA_1:3
for b
1, b
2 being
Nat holds b
1 - b
2 <= b
1
theorem Th4: :: IDEA_1:4
for b
1, b
2, b
3 being
Nat holds
( b
2 <= b
3 implies b
2 - b
1 <= b
3 )
theorem Th5: :: IDEA_1:5
for b
1, b
2, b
3 being
Nat holds
not ( 0
< b
1 & 0
< b
2 & b
1 < b
3 & b
2 < b
3 & b
3 is
prime & not
(b1 * b2) mod b
3 <> 0 )
:: deftheorem Def1 defines ZERO IDEA_1:def 1 :
:: deftheorem Def2 defines 'xor' IDEA_1:def 2 :
theorem Th6: :: IDEA_1:6
canceled;
theorem Th7: :: IDEA_1:7
theorem Th8: :: IDEA_1:8
theorem Th9: :: IDEA_1:9
theorem Th10: :: IDEA_1:10
:: deftheorem Def3 defines is_expressible_by IDEA_1:def 3 :
theorem Th11: :: IDEA_1:11
:: deftheorem Def4 defines ADD_MOD IDEA_1:def 4 :
:: deftheorem Def5 defines NEG_N IDEA_1:def 5 :
:: deftheorem Def6 defines NEG_MOD IDEA_1:def 6 :
theorem Th12: :: IDEA_1:12
theorem Th13: :: IDEA_1:13
theorem Th14: :: IDEA_1:14
theorem Th15: :: IDEA_1:15
for b
1, b
2, b
3, b
4 being
Nat holds
ADD_MOD (ADD_MOD b1,b2,b3),b
4,b
3 = ADD_MOD b
1,
(ADD_MOD b2,b4,b3),b
3
theorem Th16: :: IDEA_1:16
theorem Th17: :: IDEA_1:17
:: deftheorem Def7 defines ChangeVal_1 IDEA_1:def 7 :
theorem Th18: :: IDEA_1:18
theorem Th19: :: IDEA_1:19
:: deftheorem Def8 defines ChangeVal_2 IDEA_1:def 8 :
theorem Th20: :: IDEA_1:20
theorem Th21: :: IDEA_1:21
:: deftheorem Def9 defines MUL_MOD IDEA_1:def 9 :
definition
let c
1 be non
empty Nat;
let c
2 be
Nat;
assume E24:
( c
2 is_expressible_by c
1 &
(2 to_power c1) + 1 is
prime )
;
func INV_MOD c
2,c
1 -> Nat means :
Def10:
:: IDEA_1:def 10
(
MUL_MOD a
2,a
3,a
1 = 1 & a
3 is_expressible_by a
1 );
existence
ex b1 being Nat st
( MUL_MOD c2,b1,c1 = 1 & b1 is_expressible_by c1 )
uniqueness
for b1, b2 being Nat holds
( MUL_MOD c2,b1,c1 = 1 & b1 is_expressible_by c1 & MUL_MOD c2,b2,c1 = 1 & b2 is_expressible_by c1 implies b1 = b2 )
end;
:: deftheorem Def10 defines INV_MOD IDEA_1:def 10 :
theorem Th22: :: IDEA_1:22
theorem Th23: :: IDEA_1:23
theorem Th24: :: IDEA_1:24
for b
1, b
2, b
3, b
4 being
Nat holds
(
(2 to_power b1) + 1 is
prime & b
2 is_expressible_by b
1 & b
3 is_expressible_by b
1 & b
4 is_expressible_by b
1 implies
MUL_MOD (MUL_MOD b2,b3,b1),b
4,b
1 = MUL_MOD b
2,
(MUL_MOD b3,b4,b1),b
1 )
theorem Th25: :: IDEA_1:25
theorem Th26: :: IDEA_1:26
definition
let c
1 be
Nat;
let c
2, c
3 be
FinSequence of
NAT ;
func IDEAoperationA c
2,c
3,c
1 -> FinSequence of
NAT means :
Def11:
:: IDEA_1:def 11
(
len a
4 = len a
2 & ( for b
1 being
Nat holds
( b
1 in dom a
2 implies ( ( b
1 = 1 implies a
4 . b
1 = MUL_MOD (a2 . 1),
(a3 . 1),a
1 ) & ( b
1 = 2 implies a
4 . b
1 = ADD_MOD (a2 . 2),
(a3 . 2),a
1 ) & ( b
1 = 3 implies a
4 . b
1 = ADD_MOD (a2 . 3),
(a3 . 3),a
1 ) & ( b
1 = 4 implies a
4 . b
1 = MUL_MOD (a2 . 4),
(a3 . 4),a
1 ) & ( b
1 <> 1 & b
1 <> 2 & b
1 <> 3 & b
1 <> 4 implies a
4 . b
1 = a
2 . b
1 ) ) ) ) );
existence
ex b1 being FinSequence of NAT st
( len b1 = len c2 & ( for b2 being Nat holds
( b2 in dom c2 implies ( ( b2 = 1 implies b1 . b2 = MUL_MOD (c2 . 1),(c3 . 1),c1 ) & ( b2 = 2 implies b1 . b2 = ADD_MOD (c2 . 2),(c3 . 2),c1 ) & ( b2 = 3 implies b1 . b2 = ADD_MOD (c2 . 3),(c3 . 3),c1 ) & ( b2 = 4 implies b1 . b2 = MUL_MOD (c2 . 4),(c3 . 4),c1 ) & ( b2 <> 1 & b2 <> 2 & b2 <> 3 & b2 <> 4 implies b1 . b2 = c2 . b2 ) ) ) ) )
uniqueness
for b1, b2 being FinSequence of NAT holds
( len b1 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies ( ( b3 = 1 implies b1 . b3 = MUL_MOD (c2 . 1),(c3 . 1),c1 ) & ( b3 = 2 implies b1 . b3 = ADD_MOD (c2 . 2),(c3 . 2),c1 ) & ( b3 = 3 implies b1 . b3 = ADD_MOD (c2 . 3),(c3 . 3),c1 ) & ( b3 = 4 implies b1 . b3 = MUL_MOD (c2 . 4),(c3 . 4),c1 ) & ( b3 <> 1 & b3 <> 2 & b3 <> 3 & b3 <> 4 implies b1 . b3 = c2 . b3 ) ) ) ) & len b2 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies ( ( b3 = 1 implies b2 . b3 = MUL_MOD (c2 . 1),(c3 . 1),c1 ) & ( b3 = 2 implies b2 . b3 = ADD_MOD (c2 . 2),(c3 . 2),c1 ) & ( b3 = 3 implies b2 . b3 = ADD_MOD (c2 . 3),(c3 . 3),c1 ) & ( b3 = 4 implies b2 . b3 = MUL_MOD (c2 . 4),(c3 . 4),c1 ) & ( b3 <> 1 & b3 <> 2 & b3 <> 3 & b3 <> 4 implies b2 . b3 = c2 . b3 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def11 defines IDEAoperationA IDEA_1:def 11 :
for b
1 being
Natfor b
2, b
3, b
4 being
FinSequence of
NAT holds
( b
4 = IDEAoperationA b
2,b
3,b
1 iff (
len b
4 = len b
2 & ( for b
5 being
Nat holds
( b
5 in dom b
2 implies ( ( b
5 = 1 implies b
4 . b
5 = MUL_MOD (b2 . 1),
(b3 . 1),b
1 ) & ( b
5 = 2 implies b
4 . b
5 = ADD_MOD (b2 . 2),
(b3 . 2),b
1 ) & ( b
5 = 3 implies b
4 . b
5 = ADD_MOD (b2 . 3),
(b3 . 3),b
1 ) & ( b
5 = 4 implies b
4 . b
5 = MUL_MOD (b2 . 4),
(b3 . 4),b
1 ) & ( b
5 <> 1 & b
5 <> 2 & b
5 <> 3 & b
5 <> 4 implies b
4 . b
5 = b
2 . b
5 ) ) ) ) ) );
definition
let c
1 be non
empty Nat;
let c
2, c
3 be
FinSequence of
NAT ;
func IDEAoperationB c
2,c
3,c
1 -> FinSequence of
NAT means :
Def12:
:: IDEA_1:def 12
(
len a
4 = len a
2 & ( for b
1 being
Nat holds
( b
1 in dom a
2 implies ( ( b
1 = 1 implies a
4 . b
1 = Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(Absval ((a1 -BinarySequence (a2 . 2)) 'xor' (a1 -BinarySequence (a2 . 4)))),a1),(a3 . 6),a1))) ) & ( b
1 = 2 implies a
4 . b
1 = Absval ((a1 -BinarySequence (a2 . 2)) 'xor' (a1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(Absval ((a1 -BinarySequence (a2 . 2)) 'xor' (a1 -BinarySequence (a2 . 4)))),a1),(a3 . 6),a1),a1))) ) & ( b
1 = 3 implies a
4 . b
1 = Absval ((a1 -BinarySequence (a2 . 3)) 'xor' (a1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(Absval ((a1 -BinarySequence (a2 . 2)) 'xor' (a1 -BinarySequence (a2 . 4)))),a1),(a3 . 6),a1))) ) & ( b
1 = 4 implies a
4 . b
1 = Absval ((a1 -BinarySequence (a2 . 4)) 'xor' (a1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((a1 -BinarySequence (a2 . 1)) 'xor' (a1 -BinarySequence (a2 . 3)))),(a3 . 5),a1),(Absval ((a1 -BinarySequence (a2 . 2)) 'xor' (a1 -BinarySequence (a2 . 4)))),a1),(a3 . 6),a1),a1))) ) & ( b
1 <> 1 & b
1 <> 2 & b
1 <> 3 & b
1 <> 4 implies a
4 . b
1 = a
2 . b
1 ) ) ) ) );
existence
ex b1 being FinSequence of NAT st
( len b1 = len c2 & ( for b2 being Nat holds
( b2 in dom c2 implies ( ( b2 = 1 implies b1 . b2 = Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b2 = 2 implies b1 . b2 = Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b2 = 3 implies b1 . b2 = Absval ((c1 -BinarySequence (c2 . 3)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b2 = 4 implies b1 . b2 = Absval ((c1 -BinarySequence (c2 . 4)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b2 <> 1 & b2 <> 2 & b2 <> 3 & b2 <> 4 implies b1 . b2 = c2 . b2 ) ) ) ) )
uniqueness
for b1, b2 being FinSequence of NAT holds
( len b1 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies ( ( b3 = 1 implies b1 . b3 = Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b3 = 2 implies b1 . b3 = Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b3 = 3 implies b1 . b3 = Absval ((c1 -BinarySequence (c2 . 3)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b3 = 4 implies b1 . b3 = Absval ((c1 -BinarySequence (c2 . 4)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b3 <> 1 & b3 <> 2 & b3 <> 3 & b3 <> 4 implies b1 . b3 = c2 . b3 ) ) ) ) & len b2 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies ( ( b3 = 1 implies b2 . b3 = Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b3 = 2 implies b2 . b3 = Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b3 = 3 implies b2 . b3 = Absval ((c1 -BinarySequence (c2 . 3)) 'xor' (c1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1))) ) & ( b3 = 4 implies b2 . b3 = Absval ((c1 -BinarySequence (c2 . 4)) 'xor' (c1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((c1 -BinarySequence (c2 . 1)) 'xor' (c1 -BinarySequence (c2 . 3)))),(c3 . 5),c1),(Absval ((c1 -BinarySequence (c2 . 2)) 'xor' (c1 -BinarySequence (c2 . 4)))),c1),(c3 . 6),c1),c1))) ) & ( b3 <> 1 & b3 <> 2 & b3 <> 3 & b3 <> 4 implies b2 . b3 = c2 . b3 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def12 defines IDEAoperationB IDEA_1:def 12 :
for b
1 being non
empty Natfor b
2, b
3, b
4 being
FinSequence of
NAT holds
( b
4 = IDEAoperationB b
2,b
3,b
1 iff (
len b
4 = len b
2 & ( for b
5 being
Nat holds
( b
5 in dom b
2 implies ( ( b
5 = 1 implies b
4 . b
5 = Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(Absval ((b1 -BinarySequence (b2 . 2)) 'xor' (b1 -BinarySequence (b2 . 4)))),b1),(b3 . 6),b1))) ) & ( b
5 = 2 implies b
4 . b
5 = Absval ((b1 -BinarySequence (b2 . 2)) 'xor' (b1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(Absval ((b1 -BinarySequence (b2 . 2)) 'xor' (b1 -BinarySequence (b2 . 4)))),b1),(b3 . 6),b1),b1))) ) & ( b
5 = 3 implies b
4 . b
5 = Absval ((b1 -BinarySequence (b2 . 3)) 'xor' (b1 -BinarySequence (MUL_MOD (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(Absval ((b1 -BinarySequence (b2 . 2)) 'xor' (b1 -BinarySequence (b2 . 4)))),b1),(b3 . 6),b1))) ) & ( b
5 = 4 implies b
4 . b
5 = Absval ((b1 -BinarySequence (b2 . 4)) 'xor' (b1 -BinarySequence (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(MUL_MOD (ADD_MOD (MUL_MOD (Absval ((b1 -BinarySequence (b2 . 1)) 'xor' (b1 -BinarySequence (b2 . 3)))),(b3 . 5),b1),(Absval ((b1 -BinarySequence (b2 . 2)) 'xor' (b1 -BinarySequence (b2 . 4)))),b1),(b3 . 6),b1),b1))) ) & ( b
5 <> 1 & b
5 <> 2 & b
5 <> 3 & b
5 <> 4 implies b
4 . b
5 = b
2 . b
5 ) ) ) ) ) );
definition
let c
1 be
FinSequence of
NAT ;
func IDEAoperationC c
1 -> FinSequence of
NAT means :
Def13:
:: IDEA_1:def 13
(
len a
2 = len a
1 & ( for b
1 being
Nat holds
( b
1 in dom a
1 implies a
2 . b
1 = IFEQ b
1,2,
(a1 . 3),
(IFEQ b1,3,(a1 . 2),(a1 . b1)) ) ) );
existence
ex b1 being FinSequence of NAT st
( len b1 = len c1 & ( for b2 being Nat holds
( b2 in dom c1 implies b1 . b2 = IFEQ b2,2,(c1 . 3),(IFEQ b2,3,(c1 . 2),(c1 . b2)) ) ) )
uniqueness
for b1, b2 being FinSequence of NAT holds
( len b1 = len c1 & ( for b3 being Nat holds
( b3 in dom c1 implies b1 . b3 = IFEQ b3,2,(c1 . 3),(IFEQ b3,3,(c1 . 2),(c1 . b3)) ) ) & len b2 = len c1 & ( for b3 being Nat holds
( b3 in dom c1 implies b2 . b3 = IFEQ b3,2,(c1 . 3),(IFEQ b3,3,(c1 . 2),(c1 . b3)) ) ) implies b1 = b2 )
end;
:: deftheorem Def13 defines IDEAoperationC IDEA_1:def 13 :
theorem Th27: :: IDEA_1:27
theorem Th28: :: IDEA_1:28
Lemma33:
for b1 being FinSequence of NAT
for b2 being Nat holds
( b2 = 2 & b2 in dom b1 implies (IDEAoperationC b1) . b2 = b1 . 3 )
Lemma34:
for b1 being FinSequence of NAT
for b2 being Nat holds
( b2 = 3 & b2 in dom b1 implies (IDEAoperationC b1) . b2 = b1 . 2 )
Lemma35:
for b1 being FinSequence of NAT
for b2 being Nat holds
( b2 <> 2 & b2 <> 3 & b2 in dom b1 implies (IDEAoperationC b1) . b2 = b1 . b2 )
theorem Th29: :: IDEA_1:29
theorem Th30: :: IDEA_1:30
for b
1 being non
empty Natfor b
2, b
3, b
4 being
FinSequence of
NAT holds
(
(2 to_power b1) + 1 is
prime &
len b
2 >= 4 & b
2 . 1
is_expressible_by b
1 & b
2 . 2
is_expressible_by b
1 & b
2 . 3
is_expressible_by b
1 & b
2 . 4
is_expressible_by b
1 & b
3 . 1
is_expressible_by b
1 & b
3 . 2
is_expressible_by b
1 & b
3 . 3
is_expressible_by b
1 & b
3 . 4
is_expressible_by b
1 & b
4 . 1
= INV_MOD (b3 . 1),b
1 & b
4 . 2
= NEG_MOD (b3 . 2),b
1 & b
4 . 3
= NEG_MOD (b3 . 3),b
1 & b
4 . 4
= INV_MOD (b3 . 4),b
1 implies
IDEAoperationA (IDEAoperationA b2,b3,b1),b
4,b
1 = b
2 )
theorem Th31: :: IDEA_1:31
for b
1 being non
empty Natfor b
2, b
3, b
4 being
FinSequence of
NAT holds
(
(2 to_power b1) + 1 is
prime &
len b
2 >= 4 & b
2 . 1
is_expressible_by b
1 & b
2 . 2
is_expressible_by b
1 & b
2 . 3
is_expressible_by b
1 & b
2 . 4
is_expressible_by b
1 & b
3 . 1
is_expressible_by b
1 & b
3 . 2
is_expressible_by b
1 & b
3 . 3
is_expressible_by b
1 & b
3 . 4
is_expressible_by b
1 & b
4 . 1
= INV_MOD (b3 . 1),b
1 & b
4 . 2
= NEG_MOD (b3 . 3),b
1 & b
4 . 3
= NEG_MOD (b3 . 2),b
1 & b
4 . 4
= INV_MOD (b3 . 4),b
1 implies
IDEAoperationA (IDEAoperationC (IDEAoperationA (IDEAoperationC b2),b3,b1)),b
4,b
1 = b
2 )
theorem Th32: :: IDEA_1:32
theorem Th33: :: IDEA_1:33
:: deftheorem Def14 defines MESSAGES IDEA_1:def 14 :
definition
let c
1 be non
empty Nat;
let c
2 be
FinSequence of
NAT ;
func IDEA_P c
2,c
1 -> Function of
MESSAGES ,
MESSAGES means :
Def15:
:: IDEA_1:def 15
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationA (IDEAoperationC (IDEAoperationB b1,a2,a1)),a
2,a
1;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationA (IDEAoperationC (IDEAoperationB b2,c2,c1)),c2,c1
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationA (IDEAoperationC (IDEAoperationB b3,c2,c1)),c2,c1 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationA (IDEAoperationC (IDEAoperationB b3,c2,c1)),c2,c1 ) implies b1 = b2 )
end;
:: deftheorem Def15 defines IDEA_P IDEA_1:def 15 :
definition
let c
1 be non
empty Nat;
let c
2 be
FinSequence of
NAT ;
func IDEA_Q c
2,c
1 -> Function of
MESSAGES ,
MESSAGES means :
Def16:
:: IDEA_1:def 16
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationB (IDEAoperationA (IDEAoperationC b1),a2,a1),a
2,a
1;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationB (IDEAoperationA (IDEAoperationC b2),c2,c1),c2,c1
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationB (IDEAoperationA (IDEAoperationC b3),c2,c1),c2,c1 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationB (IDEAoperationA (IDEAoperationC b3),c2,c1),c2,c1 ) implies b1 = b2 )
end;
:: deftheorem Def16 defines IDEA_Q IDEA_1:def 16 :
definition
let c
1, c
2 be
Nat;
let c
3 be non
empty Nat;
let c
4 be
Matrix of c
2,6,
NAT ;
func IDEA_P_F c
4,c
3,c
1 -> FinSequence means :
Def17:
:: IDEA_1:def 17
(
len a
5 = a
1 & ( for b
1 being
Nat holds
( b
1 in dom a
5 implies a
5 . b
1 = IDEA_P (Line a4,b1),a
3 ) ) );
existence
ex b1 being FinSequence st
( len b1 = c1 & ( for b2 being Nat holds
( b2 in dom b1 implies b1 . b2 = IDEA_P (Line c4,b2),c3 ) ) )
uniqueness
for b1, b2 being FinSequence holds
( len b1 = c1 & ( for b3 being Nat holds
( b3 in dom b1 implies b1 . b3 = IDEA_P (Line c4,b3),c3 ) ) & len b2 = c1 & ( for b3 being Nat holds
( b3 in dom b2 implies b2 . b3 = IDEA_P (Line c4,b3),c3 ) ) implies b1 = b2 )
end;
:: deftheorem Def17 defines IDEA_P_F IDEA_1:def 17 :
definition
let c
1, c
2 be
Nat;
let c
3 be non
empty Nat;
let c
4 be
Matrix of c
2,6,
NAT ;
func IDEA_Q_F c
4,c
3,c
1 -> FinSequence means :
Def18:
:: IDEA_1:def 18
(
len a
5 = a
1 & ( for b
1 being
Nat holds
( b
1 in dom a
5 implies a
5 . b
1 = IDEA_Q (Line a4,((a1 -' b1) + 1)),a
3 ) ) );
existence
ex b1 being FinSequence st
( len b1 = c1 & ( for b2 being Nat holds
( b2 in dom b1 implies b1 . b2 = IDEA_Q (Line c4,((c1 -' b2) + 1)),c3 ) ) )
uniqueness
for b1, b2 being FinSequence holds
( len b1 = c1 & ( for b3 being Nat holds
( b3 in dom b1 implies b1 . b3 = IDEA_Q (Line c4,((c1 -' b3) + 1)),c3 ) ) & len b2 = c1 & ( for b3 being Nat holds
( b3 in dom b2 implies b2 . b3 = IDEA_Q (Line c4,((c1 -' b3) + 1)),c3 ) ) implies b1 = b2 )
end;
:: deftheorem Def18 defines IDEA_Q_F IDEA_1:def 18 :
definition
let c
1 be
FinSequence of
NAT ;
let c
2 be
Nat;
func IDEA_PS c
1,c
2 -> Function of
MESSAGES ,
MESSAGES means :
Def19:
:: IDEA_1:def 19
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationA b
1,a
1,a
2;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationA b2,c1,c2
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationA b3,c1,c2 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationA b3,c1,c2 ) implies b1 = b2 )
end;
:: deftheorem Def19 defines IDEA_PS IDEA_1:def 19 :
definition
let c
1 be
FinSequence of
NAT ;
let c
2 be
Nat;
func IDEA_QS c
1,c
2 -> Function of
MESSAGES ,
MESSAGES means :
Def20:
:: IDEA_1:def 20
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationA b
1,a
1,a
2;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationA b2,c1,c2
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationA b3,c1,c2 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationA b3,c1,c2 ) implies b1 = b2 )
end;
:: deftheorem Def20 defines IDEA_QS IDEA_1:def 20 :
definition
let c
1 be non
empty Nat;
let c
2 be
FinSequence of
NAT ;
func IDEA_PE c
2,c
1 -> Function of
MESSAGES ,
MESSAGES means :
Def21:
:: IDEA_1:def 21
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationA (IDEAoperationB b1,a2,a1),a
2,a
1;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationA (IDEAoperationB b2,c2,c1),c2,c1
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationA (IDEAoperationB b3,c2,c1),c2,c1 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationA (IDEAoperationB b3,c2,c1),c2,c1 ) implies b1 = b2 )
end;
:: deftheorem Def21 defines IDEA_PE IDEA_1:def 21 :
definition
let c
1 be non
empty Nat;
let c
2 be
FinSequence of
NAT ;
func IDEA_QE c
2,c
1 -> Function of
MESSAGES ,
MESSAGES means :
Def22:
:: IDEA_1:def 22
for b
1 being
FinSequence of
NAT holds a
3 . b
1 = IDEAoperationB (IDEAoperationA b1,a2,a1),a
2,a
1;
existence
ex b1 being Function of MESSAGES , MESSAGES st
for b2 being FinSequence of NAT holds b1 . b2 = IDEAoperationB (IDEAoperationA b2,c2,c1),c2,c1
uniqueness
for b1, b2 being Function of MESSAGES , MESSAGES holds
( ( for b3 being FinSequence of NAT holds b1 . b3 = IDEAoperationB (IDEAoperationA b3,c2,c1),c2,c1 ) & ( for b3 being FinSequence of NAT holds b2 . b3 = IDEAoperationB (IDEAoperationA b3,c2,c1),c2,c1 ) implies b1 = b2 )
end;
:: deftheorem Def22 defines IDEA_QE IDEA_1:def 22 :
theorem Th34: :: IDEA_1:34
theorem Th35: :: IDEA_1:35
theorem Th36: :: IDEA_1:36
theorem Th37: :: IDEA_1:37
theorem Th38: :: IDEA_1:38
theorem Th39: :: IDEA_1:39
theorem Th40: :: IDEA_1:40
theorem Th41: :: IDEA_1:41
theorem Th42: :: IDEA_1:42
theorem Th43: :: IDEA_1:43
theorem Th44: :: IDEA_1:44
theorem Th45: :: IDEA_1:45
theorem Th46: :: IDEA_1:46
canceled;
theorem Th47: :: IDEA_1:47
theorem Th48: :: IDEA_1:48
for b
1 being non
empty Natfor b
2 being
Natfor b
3, b
4 being
Matrix of b
2,6,
NAT for b
5 being
Natfor b
6 being
FinSequence of
NAT holds
( b
2 >= b
5 &
(2 to_power b1) + 1 is
prime &
len b
6 >= 4 & b
6 . 1
is_expressible_by b
1 & b
6 . 2
is_expressible_by b
1 & b
6 . 3
is_expressible_by b
1 & b
6 . 4
is_expressible_by b
1 & ( for b
7 being
Nat holds
( b
7 <= b
5 implies ( b
3 * b
7,1
is_expressible_by b
1 & b
3 * b
7,2
is_expressible_by b
1 & b
3 * b
7,3
is_expressible_by b
1 & b
3 * b
7,4
is_expressible_by b
1 & b
3 * b
7,5
is_expressible_by b
1 & b
3 * b
7,6
is_expressible_by b
1 & b
4 * b
7,1
is_expressible_by b
1 & b
4 * b
7,2
is_expressible_by b
1 & b
4 * b
7,3
is_expressible_by b
1 & b
4 * b
7,4
is_expressible_by b
1 & b
4 * b
7,5
is_expressible_by b
1 & b
4 * b
7,6
is_expressible_by b
1 & b
4 * b
7,1
= INV_MOD (b3 * b7,1),b
1 & b
4 * b
7,2
= NEG_MOD (b3 * b7,3),b
1 & b
4 * b
7,3
= NEG_MOD (b3 * b7,2),b
1 & b
4 * b
7,4
= INV_MOD (b3 * b7,4),b
1 & b
3 * b
7,5
= b
4 * b
7,5 & b
3 * b
7,6
= b
4 * b
7,6 ) ) ) implies
(compose ((IDEA_P_F b3,b1,b5) ^ (IDEA_Q_F b4,b1,b5)),MESSAGES ) . b
6 = b
6 )
theorem Th49: :: IDEA_1:49
for b
1 being non
empty Natfor b
2 being
Natfor b
3, b
4 being
Matrix of b
2,6,
NAT for b
5 being
Natfor b
6, b
7, b
8, b
9, b
10 being
FinSequence of
NAT holds
( b
2 >= b
5 &
(2 to_power b1) + 1 is
prime &
len b
10 >= 4 & b
10 . 1
is_expressible_by b
1 & b
10 . 2
is_expressible_by b
1 & b
10 . 3
is_expressible_by b
1 & b
10 . 4
is_expressible_by b
1 & ( for b
11 being
Nat holds
( b
11 <= b
5 implies ( b
3 * b
11,1
is_expressible_by b
1 & b
3 * b
11,2
is_expressible_by b
1 & b
3 * b
11,3
is_expressible_by b
1 & b
3 * b
11,4
is_expressible_by b
1 & b
3 * b
11,5
is_expressible_by b
1 & b
3 * b
11,6
is_expressible_by b
1 & b
4 * b
11,1
is_expressible_by b
1 & b
4 * b
11,2
is_expressible_by b
1 & b
4 * b
11,3
is_expressible_by b
1 & b
4 * b
11,4
is_expressible_by b
1 & b
4 * b
11,5
is_expressible_by b
1 & b
4 * b
11,6
is_expressible_by b
1 & b
4 * b
11,1
= INV_MOD (b3 * b11,1),b
1 & b
4 * b
11,2
= NEG_MOD (b3 * b11,3),b
1 & b
4 * b
11,3
= NEG_MOD (b3 * b11,2),b
1 & b
4 * b
11,4
= INV_MOD (b3 * b11,4),b
1 & b
3 * b
11,5
= b
4 * b
11,5 & b
3 * b
11,6
= b
4 * b
11,6 ) ) ) & b
6 . 1
is_expressible_by b
1 & b
6 . 2
is_expressible_by b
1 & b
6 . 3
is_expressible_by b
1 & b
6 . 4
is_expressible_by b
1 & b
7 . 1
= INV_MOD (b6 . 1),b
1 & b
7 . 2
= NEG_MOD (b6 . 2),b
1 & b
7 . 3
= NEG_MOD (b6 . 3),b
1 & b
7 . 4
= INV_MOD (b6 . 4),b
1 & b
8 . 1
is_expressible_by b
1 & b
8 . 2
is_expressible_by b
1 & b
8 . 3
is_expressible_by b
1 & b
8 . 4
is_expressible_by b
1 & b
8 . 5
is_expressible_by b
1 & b
8 . 6
is_expressible_by b
1 & b
9 . 1
= INV_MOD (b8 . 1),b
1 & b
9 . 2
= NEG_MOD (b8 . 2),b
1 & b
9 . 3
= NEG_MOD (b8 . 3),b
1 & b
9 . 4
= INV_MOD (b8 . 4),b
1 & b
9 . 5
= b
8 . 5 & b
9 . 6
= b
8 . 6 implies
((IDEA_QS b7,b1) * ((compose (IDEA_Q_F b4,b1,b5),MESSAGES ) * ((IDEA_QE b9,b1) * ((IDEA_PE b8,b1) * ((compose (IDEA_P_F b3,b1,b5),MESSAGES ) * (IDEA_PS b6,b1)))))) . b
10 = b
10 )