:: AMI_2 semantic presentation
:: deftheorem Def1 defines SCM-Halt AMI_2:def 1 :
:: deftheorem Def2 defines SCM-Data-Loc AMI_2:def 2 :
:: deftheorem Def3 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 ) * ):]
end;
:: deftheorem Def4 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 Th1: :: AMI_2:1
canceled;
theorem Th2: :: AMI_2:2
theorem Th3: :: AMI_2:3
theorem Th4: :: AMI_2:4
theorem Th5: :: AMI_2:5
E1:
now
let c1 be
Nat;
consider c2 being
Nat such that E2:
(
c1 = 2
* c2 or
c1 = (2 * c2) + 1 )
by SCHEME1:1;
now
assume E3:
c1 = 2
* c2
;
E4:
(
c2 = 0 or ex
b1 being
Nat st
c2 = b1 + 1 )
by NAT_1:22;
now
given c3 being
Nat such that E5:
c2 = c3 + 1
;
take c4 =
c3;
thus
c1 = (2 * c4) + (2 * 1)
by E3, E5;
end;
hence
(
c1 = 0 or ex
b1 being
Nat st
c1 = (2 * b1) + 2 )
by E3, E4;
end;
hence
(
c1 = 0 or ex
b1 being
Nat st
c1 = (2 * b1) + 1 or ex
b1 being
Nat st
c1 = (2 * b1) + 2 )
by E2;
end;
E2:
now
let c1 be
Nat;
thus
( ex
b1 being
Nat st
c1 = (2 * b1) + 1 implies (
c1 <> 0 & ( for
b1 being
Nat holds not
c1 = (2 * b1) + 2 ) ) )
given c2 being
Nat such that E3:
c1 = (2 * c2) + (1 + 1)
;
thus
c1 <> 0
by E3;
given c3 being
Nat such that E4:
c1 = (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
contradiction
;
end;
:: deftheorem Def5 defines SCM-OK AMI_2:def 5 :
theorem Th6: :: AMI_2:6
theorem Th7: :: AMI_2:7
theorem Th8: :: AMI_2:8
theorem Th9: :: AMI_2:9
theorem Th10: :: AMI_2:10
theorem Th11: :: AMI_2:11
theorem Th12: :: AMI_2:12
theorem Th13: :: AMI_2:13
theorem Th14: :: AMI_2:14
theorem Th15: :: AMI_2:15
:: deftheorem Def6 defines IC AMI_2:def 6 :
:: deftheorem Def7 defines SCM-Chg AMI_2:def 7 :
theorem Th16: :: AMI_2:16
theorem Th17: :: AMI_2:17
theorem Th18: :: AMI_2:18
:: deftheorem Def8 defines SCM-Chg AMI_2:def 8 :
theorem Th19: :: AMI_2:19
theorem Th20: :: AMI_2:20
theorem Th21: :: AMI_2:21
theorem Th22: :: AMI_2:22
:: deftheorem Def9 defines address_1 AMI_2:def 9 :
:: deftheorem Def10 defines address_2 AMI_2:def 10 :
theorem Th23: :: AMI_2:23
:: deftheorem Def11 defines jump_address AMI_2:def 11 :
theorem Th24: :: AMI_2:24
definition
let c1 be
Element of
SCM-Instr ;
given c2 being
Element of
SCM-Instr-Loc ,
c3 being
Element of
SCM-Data-Loc ,
c4 being
Element of
Segm 9
such that E15:
c1 = [c4,<*c2,c3*>]
;
func c1 cjump_address -> Element of
SCM-Instr-Loc means :
Def12:
:: AMI_2:def 12
ex
b1 being
Element of
SCM-Instr-Loc ex
b2 being
Element of
SCM-Data-Loc st
(
<*b1,b2*> = a1 `2 &
a2 = <*b1,b2*> /. 1 );
existence
ex b1, b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st
( <*b2,b3*> = c1 `2 & b1 = <*b2,b3*> /. 1 )
correctness
uniqueness
for b1, b2 being Element of SCM-Instr-Loc st ex b3 being Element of SCM-Instr-Loc ex b4 being Element of SCM-Data-Loc st
( <*b3,b4*> = c1 `2 & b1 = <*b3,b4*> /. 1 ) & ex b3 being Element of SCM-Instr-Loc ex b4 being Element of SCM-Data-Loc st
( <*b3,b4*> = c1 `2 & b2 = <*b3,b4*> /. 1 ) holds
b1 = b2;
;
func c1 cond_address -> Element of
SCM-Data-Loc means :
Def13:
:: AMI_2:def 13
ex
b1 being
Element of
SCM-Instr-Loc ex
b2 being
Element of
SCM-Data-Loc st
(
<*b1,b2*> = a1 `2 &
a2 = <*b1,b2*> /. 2 );
existence
ex b1 being Element of SCM-Data-Loc ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st
( <*b2,b3*> = c1 `2 & b1 = <*b2,b3*> /. 2 )
correctness
uniqueness
for b1, b2 being Element of SCM-Data-Loc st ex b3 being Element of SCM-Instr-Loc ex b4 being Element of SCM-Data-Loc st
( <*b3,b4*> = c1 `2 & b1 = <*b3,b4*> /. 2 ) & ex b3 being Element of SCM-Instr-Loc ex b4 being Element of SCM-Data-Loc st
( <*b3,b4*> = c1 `2 & b2 = <*b3,b4*> /. 2 ) holds
b1 = b2;
;
end;
:: deftheorem Def12 defines cjump_address AMI_2:def 12 :
:: deftheorem Def13 defines cond_address AMI_2:def 13 :
theorem Th25: :: AMI_2:25
:: deftheorem Def14 defines IFGT AMI_2:def 14 :
for
b1 being non
empty set for
b2,
b3 being
real number for
b4,
b5 being
Element of
b1 holds
( (
b2 > b3 implies
IFGT b2,
b3,
b4,
b5 = b4 ) & ( not
b2 > b3 implies
IFGT b2,
b3,
b4,
b5 = b5 ) );
:: deftheorem Def15 defines Next AMI_2:def 15 :
definition
let c1 be
Element of
SCM-Instr ;
let c2 be
SCM-State;
func SCM-Exec-Res c1,
c2 -> SCM-State equals :: AMI_2:def 16
SCM-Chg (SCM-Chg a2,(a1 address_1 ),(a2 . (a1 address_2 ))),
(Next (IC a2)) if ex
b1,
b2 being
Element of
SCM-Data-Loc st
a1 = [1,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) + (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex
b1,
b2 being
Element of
SCM-Data-Loc st
a1 = [2,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) - (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex
b1,
b2 being
Element of
SCM-Data-Loc st
a1 = [3,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) * (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex
b1,
b2 being
Element of
SCM-Data-Loc st
a1 = [4,<*b1,b2*>] SCM-Chg (SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) div (a2 . (a1 address_2 )))),(a1 address_2 ),((a2 . (a1 address_1 )) mod (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex
b1,
b2 being
Element of
SCM-Data-Loc st
a1 = [5,<*b1,b2*>] SCM-Chg a2,
(a1 jump_address ) if ex
b1 being
Element of
SCM-Instr-Loc st
a1 = [6,<*b1*>] SCM-Chg a2,
(IFEQ (a2 . (a1 cond_address )),0,(a1 cjump_address ),(Next (IC a2))) if ex
b1 being
Element of
SCM-Instr-Loc ex
b2 being
Element of
SCM-Data-Loc st
a1 = [7,<*b1,b2*>] SCM-Chg a2,
(IFGT (a2 . (a1 cond_address )),0,(a1 cjump_address ),(Next (IC a2))) if ex
b1 being
Element of
SCM-Instr-Loc ex
b2 being
Element of
SCM-Data-Loc st
a1 = [8,<*b1,b2*>] otherwise a2;
consistency
for b1 being SCM-State holds
( ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg c2,(c1 jump_address ) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [1,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(c1 jump_address ) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [2,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(c1 jump_address ) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [3,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] & ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(c1 jump_address ) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [4,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] implies ( b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(c1 jump_address ) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2, b3 being Element of SCM-Data-Loc st c1 = [5,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] implies ( b1 = SCM-Chg c2,(c1 jump_address ) iff b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2 being Element of SCM-Instr-Loc st c1 = [6,<*b2*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg c2,(c1 jump_address ) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) & ( ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [7,<*b2,b3*>] & ex b2 being Element of SCM-Instr-Loc ex b3 being Element of SCM-Data-Loc st c1 = [8,<*b2,b3*>] implies ( b1 = SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) iff b1 = SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) ) ) )
by ZFMISC_1:33;
coherence
( ( ex b1, b2 being Element of SCM-Data-Loc st c1 = [1,<*b1,b2*>] implies SCM-Chg (SCM-Chg c2,(c1 address_1 ),(c2 . (c1 address_2 ))),(Next (IC c2)) is SCM-State ) & ( ex b1, b2 being Element of SCM-Data-Loc st c1 = [2,<*b1,b2*>] implies SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) + (c2 . (c1 address_2 )))),(Next (IC c2)) is SCM-State ) & ( ex b1, b2 being Element of SCM-Data-Loc st c1 = [3,<*b1,b2*>] implies SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) - (c2 . (c1 address_2 )))),(Next (IC c2)) is SCM-State ) & ( ex b1, b2 being Element of SCM-Data-Loc st c1 = [4,<*b1,b2*>] implies SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) * (c2 . (c1 address_2 )))),(Next (IC c2)) is SCM-State ) & ( ex b1, b2 being Element of SCM-Data-Loc st c1 = [5,<*b1,b2*>] implies SCM-Chg (SCM-Chg (SCM-Chg c2,(c1 address_1 ),((c2 . (c1 address_1 )) div (c2 . (c1 address_2 )))),(c1 address_2 ),((c2 . (c1 address_1 )) mod (c2 . (c1 address_2 )))),(Next (IC c2)) is SCM-State ) & ( ex b1 being Element of SCM-Instr-Loc st c1 = [6,<*b1*>] implies SCM-Chg c2,(c1 jump_address ) is SCM-State ) & ( ex b1 being Element of SCM-Instr-Loc ex b2 being Element of SCM-Data-Loc st c1 = [7,<*b1,b2*>] implies SCM-Chg c2,(IFEQ (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) is SCM-State ) & ( ex b1 being Element of SCM-Instr-Loc ex b2 being Element of SCM-Data-Loc st c1 = [8,<*b1,b2*>] implies SCM-Chg c2,(IFGT (c2 . (c1 cond_address )),0,(c1 cjump_address ),(Next (IC c2))) is SCM-State ) & ( ( for b1, b2 being Element of SCM-Data-Loc holds not c1 = [1,<*b1,b2*>] ) & ( for b1, b2 being Element of SCM-Data-Loc holds not c1 = [2,<*b1,b2*>] ) & ( for b1, b2 being Element of SCM-Data-Loc holds not c1 = [3,<*b1,b2*>] ) & ( for b1, b2 being Element of SCM-Data-Loc holds not c1 = [4,<*b1,b2*>] ) & ( for b1, b2 being Element of SCM-Data-Loc holds not c1 = [5,<*b1,b2*>] ) & ( for b1 being Element of SCM-Instr-Loc holds not c1 = [6,<*b1*>] ) & ( for b1 being Element of SCM-Instr-Loc
for b2 being Element of SCM-Data-Loc holds not c1 = [7,<*b1,b2*>] ) & ( for b1 being Element of SCM-Instr-Loc
for b2 being Element of SCM-Data-Loc holds not c1 = [8,<*b1,b2*>] ) implies c2 is SCM-State ) )
;
end;
:: deftheorem Def16 defines SCM-Exec-Res AMI_2:def 16 :
for
b1 being
Element of
SCM-Instr for
b2 being
SCM-State holds
( ( ex
b3,
b4 being
Element of
SCM-Data-Loc st
b1 = [1,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),(b2 . (b1 address_2 ))),
(Next (IC b2)) ) & ( ex
b3,
b4 being
Element of
SCM-Data-Loc st
b1 = [2,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) + (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex
b3,
b4 being
Element of
SCM-Data-Loc st
b1 = [3,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) - (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex
b3,
b4 being
Element of
SCM-Data-Loc st
b1 = [4,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) * (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex
b3,
b4 being
Element of
SCM-Data-Loc st
b1 = [5,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg (SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) div (b2 . (b1 address_2 )))),(b1 address_2 ),((b2 . (b1 address_1 )) mod (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex
b3 being
Element of
SCM-Instr-Loc st
b1 = [6,<*b3*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg b2,
(b1 jump_address ) ) & ( ex
b3 being
Element of
SCM-Instr-Loc ex
b4 being
Element of
SCM-Data-Loc st
b1 = [7,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg b2,
(IFEQ (b2 . (b1 cond_address )),0,(b1 cjump_address ),(Next (IC b2))) ) & ( ex
b3 being
Element of
SCM-Instr-Loc ex
b4 being
Element of
SCM-Data-Loc st
b1 = [8,<*b3,b4*>] implies
SCM-Exec-Res b1,
b2 = SCM-Chg b2,
(IFGT (b2 . (b1 cond_address )),0,(b1 cjump_address ),(Next (IC b2))) ) & ( ( for
b3,
b4 being
Element of
SCM-Data-Loc holds not
b1 = [1,<*b3,b4*>] ) & ( for
b3,
b4 being
Element of
SCM-Data-Loc holds not
b1 = [2,<*b3,b4*>] ) & ( for
b3,
b4 being
Element of
SCM-Data-Loc holds not
b1 = [3,<*b3,b4*>] ) & ( for
b3,
b4 being
Element of
SCM-Data-Loc holds not
b1 = [4,<*b3,b4*>] ) & ( for
b3,
b4 being
Element of
SCM-Data-Loc holds not
b1 = [5,<*b3,b4*>] ) & ( for
b3 being
Element of
SCM-Instr-Loc holds not
b1 = [6,<*b3*>] ) & ( for
b3 being
Element of
SCM-Instr-Loc for
b4 being
Element of
SCM-Data-Loc holds not
b1 = [7,<*b3,b4*>] ) & ( for
b3 being
Element of
SCM-Instr-Loc for
b4 being
Element of
SCM-Data-Loc holds not
b1 = [8,<*b3,b4*>] ) implies
SCM-Exec-Res b1,
b2 = b2 ) );
definition
func SCM-Exec -> Function of
SCM-Instr ,
Funcs (product SCM-OK ),
(product SCM-OK ) means :: AMI_2:def 17
for
b1 being
Element of
SCM-Instr for
b2 being
SCM-State holds
(a1 . b1) . b2 = SCM-Exec-Res b1,
b2;
existence
ex b1 being Function of SCM-Instr , Funcs (product SCM-OK ),(product SCM-OK ) st
for b2 being Element of SCM-Instr
for b3 being SCM-State holds (b1 . b2) . b3 = SCM-Exec-Res b2,b3
uniqueness
for b1, b2 being Function of SCM-Instr , Funcs (product SCM-OK ),(product SCM-OK ) st ( for b3 being Element of SCM-Instr
for b4 being SCM-State holds (b1 . b3) . b4 = SCM-Exec-Res b3,b4 ) & ( for b3 being Element of SCM-Instr
for b4 being SCM-State holds (b2 . b3) . b4 = SCM-Exec-Res b3,b4 ) holds
b1 = b2
end;
:: deftheorem Def17 defines SCM-Exec AMI_2:def 17 :