:: 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 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 ) ) )
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;
:: 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 c
1 be
Element of
SCM-Instr ;
given c
2 being
Element of
SCM-Instr-Loc , c
3 being
Element of
SCM-Data-Loc , c
4 being
Element of
Segm 9
such that E15:
c
1 = [c4,<*c2,c3*>]
;
func c
1 cjump_address -> Element of
SCM-Instr-Loc means :
Def12:
:: AMI_2:def 12
ex b
1 being
Element of
SCM-Instr-Loc ex b
2 being
Element of
SCM-Data-Loc st
(
<*b1,b2*> = a
1 `2 & a
2 = <*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 holds
( 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 ) implies b1 = b2 );
;
func c
1 cond_address -> Element of
SCM-Data-Loc means :
Def13:
:: AMI_2:def 13
ex b
1 being
Element of
SCM-Instr-Loc ex b
2 being
Element of
SCM-Data-Loc st
(
<*b1,b2*> = a
1 `2 & a
2 = <*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 holds
( 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 ) implies 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 b
1 being non
empty set for b
2, b
3 being
real number for b
4, b
5 being
Element of b
1 holds
( ( b
2 > b
3 implies
IFGT b
2,b
3,b
4,b
5 = b
4 ) & ( not b
2 > b
3 implies
IFGT b
2,b
3,b
4,b
5 = b
5 ) );
:: deftheorem Def15 defines Next AMI_2:def 15 :
definition
let c
1 be
Element of
SCM-Instr ;
let c
2 be
SCM-State;
func SCM-Exec-Res c
1,c
2 -> SCM-State equals :: AMI_2:def 16
SCM-Chg (SCM-Chg a2,(a1 address_1 ),(a2 . (a1 address_2 ))),
(Next (IC a2)) if ex b
1, b
2 being
Element of
SCM-Data-Loc st a
1 = [1,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) + (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex b
1, b
2 being
Element of
SCM-Data-Loc st a
1 = [2,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) - (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex b
1, b
2 being
Element of
SCM-Data-Loc st a
1 = [3,<*b1,b2*>] SCM-Chg (SCM-Chg a2,(a1 address_1 ),((a2 . (a1 address_1 )) * (a2 . (a1 address_2 )))),
(Next (IC a2)) if ex b
1, b
2 being
Element of
SCM-Data-Loc st a
1 = [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 b
1, b
2 being
Element of
SCM-Data-Loc st a
1 = [5,<*b1,b2*>] SCM-Chg a
2,
(a1 jump_address ) if ex b
1 being
Element of
SCM-Instr-Loc st a
1 = [6,<*b1*>] SCM-Chg a
2,
(IFEQ (a2 . (a1 cond_address )),0,(a1 cjump_address ),(Next (IC a2))) if ex b
1 being
Element of
SCM-Instr-Loc ex b
2 being
Element of
SCM-Data-Loc st a
1 = [7,<*b1,b2*>] SCM-Chg a
2,
(IFGT (a2 . (a1 cond_address )),0,(a1 cjump_address ),(Next (IC a2))) if ex b
1 being
Element of
SCM-Instr-Loc ex b
2 being
Element of
SCM-Data-Loc st a
1 = [8,<*b1,b2*>] otherwise a
2;
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 b
1 being
Element of
SCM-Instr for b
2 being
SCM-State holds
( ( ex b
3, b
4 being
Element of
SCM-Data-Loc st b
1 = [1,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),(b2 . (b1 address_2 ))),
(Next (IC b2)) ) & ( ex b
3, b
4 being
Element of
SCM-Data-Loc st b
1 = [2,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) + (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex b
3, b
4 being
Element of
SCM-Data-Loc st b
1 = [3,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) - (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex b
3, b
4 being
Element of
SCM-Data-Loc st b
1 = [4,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg (SCM-Chg b2,(b1 address_1 ),((b2 . (b1 address_1 )) * (b2 . (b1 address_2 )))),
(Next (IC b2)) ) & ( ex b
3, b
4 being
Element of
SCM-Data-Loc st b
1 = [5,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = 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 b
3 being
Element of
SCM-Instr-Loc st b
1 = [6,<*b3*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg b
2,
(b1 jump_address ) ) & ( ex b
3 being
Element of
SCM-Instr-Loc ex b
4 being
Element of
SCM-Data-Loc st b
1 = [7,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg b
2,
(IFEQ (b2 . (b1 cond_address )),0,(b1 cjump_address ),(Next (IC b2))) ) & ( ex b
3 being
Element of
SCM-Instr-Loc ex b
4 being
Element of
SCM-Data-Loc st b
1 = [8,<*b3,b4*>] implies
SCM-Exec-Res b
1,b
2 = SCM-Chg b
2,
(IFGT (b2 . (b1 cond_address )),0,(b1 cjump_address ),(Next (IC b2))) ) & ( ( for b
3, b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [1,<*b3,b4*>] ) & ( for b
3, b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [2,<*b3,b4*>] ) & ( for b
3, b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [3,<*b3,b4*>] ) & ( for b
3, b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [4,<*b3,b4*>] ) & ( for b
3, b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [5,<*b3,b4*>] ) & ( for b
3 being
Element of
SCM-Instr-Loc holds
not b
1 = [6,<*b3*>] ) & ( for b
3 being
Element of
SCM-Instr-Loc for b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [7,<*b3,b4*>] ) & ( for b
3 being
Element of
SCM-Instr-Loc for b
4 being
Element of
SCM-Data-Loc holds
not b
1 = [8,<*b3,b4*>] ) implies
SCM-Exec-Res b
1,b
2 = b
2 ) );
definition
func SCM-Exec -> Function of
SCM-Instr ,
Funcs (product SCM-OK ),
(product SCM-OK ) means :: AMI_2:def 17
for b
1 being
Element of
SCM-Instr for b
2 being
SCM-State holds
(a1 . b1) . b
2 = SCM-Exec-Res b
1,b
2;
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 ) holds
( ( 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 ) implies b1 = b2 )
end;
:: deftheorem Def17 defines SCM-Exec AMI_2:def 17 :