:: AMI_2 semantic presentation
:: deftheorem defines SCM-Halt AMI_2:def 1 :
:: deftheorem defines SCM-Data-Loc AMI_2:def 2 :
:: deftheorem defines SCM-Instr-Loc AMI_2:def 3 :
definition
func SCM-Instr -> Subset of
[:(Segm 9),(((union {INT }) \/ NAT ) * ):] equals :: AMI_2:def 4
(({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } ;
coherence
(({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } is Subset of [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
proof
E1:
NAT c= (union {INT }) \/ NAT
by XBOOLE_1:7;
E2:
{ [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
proof
let c
1 be
set ;
:: uses TARSKI:def 3
assume
c
1 in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} }
;
then consider c
2 being
Element of
Segm 9, c
3, c
4 being
Element of
SCM-Data-Loc such that
E3:
( c
1 = [c2,<*c3,c4*>] & c
2 in {1,2,3,4,5} )
;
reconsider c
5 = c
3, c
6 = c
4 as
Element of
(union {INT }) \/ NAT by E1, TARSKI:def 3;
<*c5,c6*> in ((union {INT }) \/ NAT ) *
by FINSEQ_1:def 11;
hence
c
1 in [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by E3, ZFMISC_1:106;
end;
E3:
{ [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
E4:
{ [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
proof
let c
1 be
set ;
:: uses TARSKI:def 3
assume
c
1 in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} }
;
then consider c
2 being
Element of
Segm 9, c
3 being
Element of
SCM-Instr-Loc , c
4 being
Element of
SCM-Data-Loc such that
E5:
( c
1 = [c2,<*c3,c4*>] & c
2 in {7,8} )
;
reconsider c
5 = c
4, c
6 = c
3 as
Element of
(union {INT }) \/ NAT by E1, TARSKI:def 3;
<*c6,c5*> in ((union {INT }) \/ NAT ) *
by FINSEQ_1:def 11;
hence
c
1 in [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by E5, ZFMISC_1:106;
end;
(
SCM-Halt in Segm 9 &
{} in ((union {INT }) \/ NAT ) * )
by FINSEQ_1:66;
then
[SCM-Halt ,{} ] in [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by ZFMISC_1:106;
then
{[SCM-Halt ,{} ]} c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by ZFMISC_1:37;
then
{[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by E3, XBOOLE_1:8;
then
({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } c= [:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by E4, XBOOLE_1:8;
hence
(({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } is
Subset of
[:(Segm 9),(((union {INT }) \/ NAT ) * ):]
by E2, XBOOLE_1:8;
end;
end;
:: deftheorem defines SCM-Instr AMI_2:def 4 :
SCM-Instr = (({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } ;
theorem :: AMI_2:1
canceled;
theorem :: AMI_2:2
proof
[0,{} ] in {[SCM-Halt ,{} ]}
by TARSKI:def 1;
then
[0,{} ] in {[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 }
by XBOOLE_0:def 2;
then
[0,{} ] in ({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} }
by XBOOLE_0:def 2;
hence
[0,{} ] in SCM-Instr
by XBOOLE_0:def 2;
end;
theorem :: AMI_2:3
proof
let c
1 be
Element of
SCM-Instr-Loc ;
reconsider c
2 = 6 as
Element of
Segm 9
by GR_CY_1:10;
[c2,<*c1*>] in { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 }
;
then
[c2,<*c1*>] in {[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 }
by XBOOLE_0:def 2;
then
[c2,<*c1*>] in ({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} }
by XBOOLE_0:def 2;
hence
[6,<*c1*>] in SCM-Instr
by XBOOLE_0:def 2;
end;
theorem :: AMI_2:4
proof
let c
1 be
set ;
let c
2 be
Element of
SCM-Instr-Loc ;
let c
3 be
Element of
SCM-Data-Loc ;
assume E1:
c
1 in {7,8}
;
then
( ( c
1 = 7 or c
1 = 8 ) & 9
> 0 & 7
< 9 & 8
< 9 )
by TARSKI:def 2;
then reconsider c
4 = c
1 as
Element of
Segm 9
by GR_CY_1:10;
[c4,<*c2,c3*>] in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} }
by E1;
then
[c4,<*c2,c3*>] in ({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} }
by XBOOLE_0:def 2;
hence
[c1,<*c2,c3*>] in SCM-Instr
by XBOOLE_0:def 2;
end;
theorem :: AMI_2:5
proof
let c
1 be
set ;
let c
2, c
3 be
Element of
SCM-Data-Loc ;
assume E1:
c
1 in {1,2,3,4,5}
;
then
not ( not c
1 = 1 & not c
1 = 2 & not c
1 = 3 & not c
1 = 4 & not c
1 = 5 )
by ENUMSET1:def 3;
then reconsider c
4 = c
1 as
Element of
Segm 9
by GR_CY_1:10;
[c4,<*c2,c3*>] in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} }
by E1;
hence
[c1,<*c2,c3*>] in SCM-Instr
by XBOOLE_0:def 2;
end;
E1:
now
let c
1 be
Nat;
consider c
2 being
Nat such that
E2:
( c
1 = 2
* c
2 or c
1 = (2 * c2) + 1 )
by SCHEME1:1;
now
assume E3:
c
1 = 2
* c
2
;
E4:
not ( not c
2 = 0 & for b
1 being
Nat holds
not c
2 = b
1 + 1 )
by NAT_1:22;
now
given c
3 being
Nat such that
E5:
c
2 = c
3 + 1
;
take c
4 = c
3;
thus
c
1 = (2 * c4) + (2 * 1)
by E3, E5;
end;
hence
not ( not c
1 = 0 & for b
1 being
Nat holds
not c
1 = (2 * b1) + 2 )
by E3, E4;
end;
hence
not ( not c
1 = 0 & for b
1 being
Nat holds
not c
1 = (2 * b1) + 1 & for b
1 being
Nat holds
not c
1 = (2 * b1) + 2 )
by E2;
end;
E2:
now
let c
1 be
Nat;
thus
( ex b
1 being
Nat st c
1 = (2 * b1) + 1 implies ( c
1 <> 0 & for b
1 being
Nat holds
not c
1 = (2 * b1) + 2 ) )
proof
given c
2 being
Nat such that
E3:
c
1 = (2 * c2) + 1
;
thus
c
1 <> 0
by E3;
given c
3 being
Nat such that
E4:
c
1 = (2 * c3) + 2
;
E5:
(2 * c3) + (2 * 1) = (2 * (c3 + 1)) + 0
;
1 =
((2 * c3) + 2) mod 2
by E3, E4, NAT_1:def 2
.=
0
by E5, NAT_1:def 2
;
hence
not verum
;
end;
given c
2 being
Nat such that
E3:
c
1 = (2 * c2) + (1 + 1)
;
thus
c
1 <> 0
by E3;
given c
3 being
Nat such that
E4:
c
1 = (2 * c3) + 1
;
E5:
(2 * c2) + (2 * 1) = (2 * (c2 + 1)) + 0
;
1 =
((2 * c2) + 2) mod 2
by E3, E4, NAT_1:def 2
.=
0
by E5, NAT_1:def 2
;
hence
not verum
;
end;
definition
func SCM-OK -> Function of
NAT ,
{INT } \/ {SCM-Instr ,SCM-Instr-Loc } means :
E3:
:: AMI_2:def 5
( a
1 . 0
= SCM-Instr-Loc & for b
1 being
Nat holds
( a
1 . ((2 * b1) + 1) = INT & a
1 . ((2 * b1) + 2) = SCM-Instr ) );
existence
ex b1 being Function of NAT ,{INT } \/ {SCM-Instr ,SCM-Instr-Loc } st
( b1 . 0 = SCM-Instr-Loc & for b2 being Nat holds
( b1 . ((2 * b2) + 1) = INT & b1 . ((2 * b2) + 2) = SCM-Instr ) )
proof
defpred S
1[
set ,
set ] means not ( not ( a
1 = 0 & a
2 = SCM-Instr-Loc ) & not ( ex b
1 being
Nat st a
1 = (2 * b1) + 1 & a
2 = INT ) & not ( ex b
1 being
Nat st a
1 = (2 * b1) + 2 & a
2 = SCM-Instr ) );
E3:
now
let c
1 be
Nat;
{INT } \/ {SCM-Instr ,SCM-Instr-Loc } = {INT ,SCM-Instr ,SCM-Instr-Loc }
by ENUMSET1:42;
then E4:
(
INT in {INT } \/ {SCM-Instr ,SCM-Instr-Loc } &
SCM-Instr in {INT } \/ {SCM-Instr ,SCM-Instr-Loc } &
SCM-Instr-Loc in {INT } \/ {SCM-Instr ,SCM-Instr-Loc } )
by ENUMSET1:def 1;
not ( not S
1[c
1,
SCM-Instr-Loc ] & not S
1[c
1,
INT ] & not S
1[c
1,
SCM-Instr ] )
by E1;
hence
ex b
1 being
Element of
{INT } \/ {SCM-Instr ,SCM-Instr-Loc } st
S
1[c
1,b
1]
by E4;
end;
consider c
1 being
Function of
NAT ,
{INT } \/ {SCM-Instr ,SCM-Instr-Loc } such that
E4:
for b
1 being
Element of
NAT holds
S
1[b
1,c
1 . b
1]
from FUNCT_2:sch 3(E3);
take
c
1
;
S
1[0,c
1 . 0]
by E4;
hence
c
1 . 0
= SCM-Instr-Loc
;
let c
2 be
Nat;
( S
1[
(2 * c2) + 1,c
1 . ((2 * c2) + 1)] & S
1[
(2 * c2) + 2,c
1 . ((2 * c2) + 2)] )
by E4;
hence
( c
1 . ((2 * c2) + 1) = INT & c
1 . ((2 * c2) + 2) = SCM-Instr )
by E2;
end;
uniqueness
for b1, b2 being Function of NAT ,{INT } \/ {SCM-Instr ,SCM-Instr-Loc } holds
( ( b1 . 0 = SCM-Instr-Loc & for b3 being Nat holds
( b1 . ((2 * b3) + 1) = INT & b1 . ((2 * b3) + 2) = SCM-Instr ) & b2 . 0 = SCM-Instr-Loc & for b3 being Nat holds
( b2 . ((2 * b3) + 1) = INT & b2 . ((2 * b3) + 2) = SCM-Instr ) ) implies ( b1 = b2 ) )
end;
:: deftheorem E3 defines SCM-OK AMI_2:def 5 :
theorem E4: :: AMI_2:6
proof
thus
SCM-Instr-Loc <> INT
by NUMBERS:17, NUMBERS:27, XBOOLE_0:def 10;
E5:
2
* 1
in { (2 * b1) where B is Nat : b1 > 0 }
;
now
assume
2
in SCM-Instr
;
then
( 2
in ({[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } ) \/ { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } or 2
in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } )
by XBOOLE_0:def 2;
then
not ( not 2
in {[SCM-Halt ,{} ]} \/ { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } & not 2
in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } & not 2
in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } )
by XBOOLE_0:def 2;
then
not ( not 2
in {[SCM-Halt ,{} ]} & not 2
in { [b1,<*b2*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc : b1 = 6 } & not 2
in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Instr-Loc , B is Element of SCM-Data-Loc : b1 in {7,8} } & not 2
in { [b1,<*b2,b3*>] where B is Element of Segm 9, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc : b1 in {1,2,3,4,5} } )
by XBOOLE_0:def 2;
then
not ( not 2
= [SCM-Halt ,{} ] & for b
1 being
Element of
Segm 9
for b
2 being
Element of
SCM-Instr-Loc holds
not ( 2
= [b1,<*b2*>] & b
1 = 6 ) & for b
1 being
Element of
Segm 9
for b
2 being
Element of
SCM-Instr-Loc for b
3 being
Element of
SCM-Data-Loc holds
not ( 2
= [b1,<*b2,b3*>] & b
1 in {7,8} ) & for b
1 being
Element of
Segm 9
for b
2, b
3 being
Element of
SCM-Data-Loc holds
not ( 2
= [b1,<*b2,b3*>] & b
1 in {1,2,3,4,5} ) )
by TARSKI:def 1;
hence
not verum
by AMI_1:3;
end;
hence
(
SCM-Instr <> INT &
SCM-Instr-Loc <> SCM-Instr )
by E5, INT_1:def 2;
end;
theorem E5: :: AMI_2:7
theorem E6: :: AMI_2:8
proof
let c
1 be
Nat;
thus
not (
SCM-OK . c
1 = INT & for b
1 being
Nat holds
not c
1 = (2 * b1) + 1 )
proof
assume E7:
SCM-OK . c
1 = INT
;
assume
for b
1 being
Nat holds
not c
1 = (2 * b1) + 1
;
then
not ( not c
1 = 0 & for b
1 being
Nat holds
not c
1 = (2 * b1) + 2 )
by E1;
hence
not verum
by E7, E3, E4;
end;
thus
( ex b
1 being
Nat st c
1 = (2 * b1) + 1 implies
SCM-OK . c
1 = INT )
by E3;
end;
theorem E7: :: AMI_2:9
theorem E8: :: AMI_2:10
theorem E9: :: AMI_2:11
theorem :: AMI_2:12
theorem E10: :: AMI_2:13
theorem E11: :: AMI_2:14
theorem :: AMI_2:15
:: deftheorem defines IC AMI_2:def 6 :