thus
SCM is IC-good
:: thesis: SCM is Exec-preserving proof
let I be
Instruction of
SCM ;
:: according to AMISTD_2:def 18 :: thesis: I is IC-good
per cases
( I = [0 ,{} ] or ex a, b being Data-Location st I = a := b or ex a, b being Data-Location st I = AddTo a,b or ex a, b being Data-Location st I = SubFrom a,b or ex a, b being Data-Location st I = MultBy a,b or ex a, b being Data-Location st I = Divide a,b or ex i1 being Instruction-Location of SCM st I = goto i1 or ex a being Data-Location ex i1 being Instruction-Location of SCM st I = a =0_goto i1 or ex a being Data-Location ex i1 being Instruction-Location of SCM st I = a >0_goto i1 )
by AMI_3:69;
suppose A1:
ex
i1 being
Instruction-Location of
SCM st
I = goto i1
;
:: thesis: I is IC-good let k be
natural number ;
:: according to AMISTD_2:def 17 :: thesis: for b1, b2 being Element of product the Object-Kind of SCM holds
( not b2 = b1 +* ((IC SCM ) .--> ((IC b1) + k)) or (IC (Exec I,b1)) + k = IC (Exec (IncAddr I,k),b2) )let s1,
s2 be
State of
SCM ;
:: thesis: ( not s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k)) or (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2) )assume
s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k))
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)consider i1 being
Instruction-Location of
SCM such that A2:
I = goto i1
by A1;
IC (Exec I,s1) = i1
by A2, AMI_3:13;
hence (IC (Exec I,s1)) + k =
IC (Exec (goto (il. SCM ,((locnum i1) + k))),s2)
by AMI_3:13
.=
IC (Exec (IncAddr I,k),s2)
by A2, Th57
;
:: thesis: verum end; suppose
ex
a being
Data-Location ex
i1 being
Instruction-Location of
SCM st
I = a =0_goto i1
;
:: thesis: I is IC-good then consider a being
Data-Location ,
i1 being
Instruction-Location of
SCM such that A3:
I = a =0_goto i1
;
let k be
natural number ;
:: according to AMISTD_2:def 17 :: thesis: for b1, b2 being Element of product the Object-Kind of SCM holds
( not b2 = b1 +* ((IC SCM ) .--> ((IC b1) + k)) or (IC (Exec I,b1)) + k = IC (Exec (IncAddr I,k),b2) )let s1,
s2 be
State of
SCM ;
:: thesis: ( not s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k)) or (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2) )assume A4:
s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k))
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
(
a <> IC SCM &
dom ((IC SCM ) .--> ((IC s1) + k)) = {(IC SCM )} )
by AMI_5:20, FUNCOP_1:19;
then
not
a in dom ((IC SCM ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A5:
s1 . a = s2 . a
by A4, FUNCT_4:12;
now per cases
( s1 . a = 0 or s1 . a <> 0 )
;
suppose A6:
s1 . a = 0
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)then
IC (Exec I,s1) = i1
by A3, AMI_3:14;
hence (IC (Exec I,s1)) + k =
IC (Exec (a =0_goto (il. SCM ,((locnum i1) + k))),s2)
by A5, A6, AMI_3:14
.=
IC (Exec (IncAddr I,k),s2)
by A3, Th58
;
:: thesis: verum end; suppose A7:
s1 . a <> 0
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
dom ((IC SCM ) .--> ((IC s1) + k)) = {(IC SCM )}
by FUNCOP_1:19;
then
IC SCM in dom ((IC SCM ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A8:
IC s2 =
((IC SCM ) .--> ((IC s1) + k)) . (IC SCM )
by A4, FUNCT_4:14
.=
il. SCM ,
((locnum (IC s1)) + k)
by FUNCOP_1:87
;
A9:
IC (Exec I,s1) =
Next
by A3, A7, AMI_3:14
.=
NextLoc (IC s1)
by Th56
.=
il. SCM ,
((locnum (IC s1)) + 1)
;
IC (Exec I,s2) =
Next
by A3, A5, A7, AMI_3:14
.=
NextLoc (IC s2)
by Th56
.=
il. SCM ,
(((locnum (IC s1)) + k) + 1)
by A8, AMISTD_1:def 13
.=
il. SCM ,
(((locnum (IC s1)) + 1) + k)
;
hence (IC (Exec I,s1)) + k =
(Exec I,s2) . (IC SCM )
by A9, AMISTD_1:def 13
.=
Next
by A3, A5, A7, AMI_3:14
.=
IC (Exec (a =0_goto (il. SCM ,((locnum i1) + k))),s2)
by A5, A7, AMI_3:14
.=
IC (Exec (IncAddr I,k),s2)
by A3, Th58
;
:: thesis: verum end; end; end; hence
(IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
;
:: thesis: verum end; suppose
ex
a being
Data-Location ex
i1 being
Instruction-Location of
SCM st
I = a >0_goto i1
;
:: thesis: I is IC-good then consider a being
Data-Location ,
i1 being
Instruction-Location of
SCM such that A10:
I = a >0_goto i1
;
let k be
natural number ;
:: according to AMISTD_2:def 17 :: thesis: for b1, b2 being Element of product the Object-Kind of SCM holds
( not b2 = b1 +* ((IC SCM ) .--> ((IC b1) + k)) or (IC (Exec I,b1)) + k = IC (Exec (IncAddr I,k),b2) )let s1,
s2 be
State of
SCM ;
:: thesis: ( not s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k)) or (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2) )assume A11:
s2 = s1 +* ((IC SCM ) .--> ((IC s1) + k))
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
(
a <> IC SCM &
dom ((IC SCM ) .--> ((IC s1) + k)) = {(IC SCM )} )
by AMI_5:20, FUNCOP_1:19;
then
not
a in dom ((IC SCM ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A12:
s1 . a = s2 . a
by A11, FUNCT_4:12;
now per cases
( s1 . a > 0 or s1 . a <= 0 )
;
suppose A13:
s1 . a > 0
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)then
IC (Exec I,s1) = i1
by A10, AMI_3:15;
hence (IC (Exec I,s1)) + k =
IC (Exec (a >0_goto (il. SCM ,((locnum i1) + k))),s2)
by A12, A13, AMI_3:15
.=
IC (Exec (IncAddr I,k),s2)
by A10, Th59
;
:: thesis: verum end; suppose A14:
s1 . a <= 0
;
:: thesis: (IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
dom ((IC SCM ) .--> ((IC s1) + k)) = {(IC SCM )}
by FUNCOP_1:19;
then
IC SCM in dom ((IC SCM ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A15:
IC s2 =
((IC SCM ) .--> ((IC s1) + k)) . (IC SCM )
by A11, FUNCT_4:14
.=
il. SCM ,
((locnum (IC s1)) + k)
by FUNCOP_1:87
;
A16:
IC (Exec I,s1) =
Next
by A10, A14, AMI_3:15
.=
NextLoc (IC s1)
by Th56
.=
il. SCM ,
((locnum (IC s1)) + 1)
;
IC (Exec I,s2) =
Next
by A10, A12, A14, AMI_3:15
.=
NextLoc (IC s2)
by Th56
.=
il. SCM ,
(((locnum (IC s1)) + k) + 1)
by A15, AMISTD_1:def 13
.=
il. SCM ,
(((locnum (IC s1)) + 1) + k)
;
hence (IC (Exec I,s1)) + k =
(Exec I,s2) . (IC SCM )
by A16, AMISTD_1:def 13
.=
Next
by A10, A12, A14, AMI_3:15
.=
IC (Exec (a >0_goto (il. SCM ,((locnum i1) + k))),s2)
by A12, A14, AMI_3:15
.=
IC (Exec (IncAddr I,k),s2)
by A10, Th59
;
:: thesis: verum end; end; end; hence
(IC (Exec I,s1)) + k = IC (Exec (IncAddr I,k),s2)
;
:: thesis: verum end; end;
end;
let I be Instruction of SCM ; :: according to AMISTD_2:def 20 :: thesis: I is Exec-preserving
A17:
dom the Object-Kind of SCM = the carrier of SCM
by FUNCT_2:def 1;
let s1, s2 be State of SCM ; :: according to AMISTD_2:def 19 :: thesis: ( not s1,s2 equal_outside NAT or Exec I,s1, Exec I,s2 equal_outside NAT )
assume A18:
s1,s2 equal_outside NAT
; :: thesis: Exec I,s1, Exec I,s2 equal_outside NAT
A19:
IC s1 = IC s2
by A18, AMI_1:121;
A20:
dom (Exec I,s1) = dom the Object-Kind of SCM
by CARD_3:18;
then A21:
dom (Exec I,s1) = dom (Exec I,s2)
by CARD_3:18;
per cases
( I = [0 ,{} ] or ex a, b being Data-Location st I = a := b or ex a, b being Data-Location st I = AddTo a,b or ex a, b being Data-Location st I = SubFrom a,b or ex a, b being Data-Location st I = MultBy a,b or ex a, b being Data-Location st I = Divide a,b or ex i1 being Instruction-Location of SCM st I = goto i1 or ex a being Data-Location ex i1 being Instruction-Location of SCM st I = a =0_goto i1 or ex a being Data-Location ex i1 being Instruction-Location of SCM st I = a >0_goto i1 )
by AMI_3:69;
suppose
ex
a,
b being
Data-Location st
I = a := b
;
:: thesis: Exec I,s1, Exec I,s2 equal_outside NAT then consider a,
b being
Data-Location such that A22:
I = a := b
;
for
x being
set st
x in (dom (Exec I,s1)) \ NAT holds
(Exec I,s1) . x = (Exec I,s2) . x
proof
let x be
set ;
:: thesis: ( x in (dom (Exec I,s1)) \ NAT implies (Exec I,s1) . x = (Exec I,s2) . x )
assume A23:
x in (dom (Exec I,s1)) \ NAT
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . x
then A24:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC SCM or x = a or ( x is Data-Location & x <> a ) )
by A20, A17, A23, A24, Th3;
suppose that A27:
x is
Data-Location
and A28:
x <> a
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . xthus (Exec I,s1) . x =
s1 . x
by A22, A27, A28, AMI_3:8
.=
s2 . x
by A18, A27, Th5
.=
(Exec I,s2) . x
by A22, A27, A28, AMI_3:8
;
:: thesis: verum end; end;
end; hence
(Exec I,s1) | ((dom (Exec I,s1)) \ NAT ) = (Exec I,s2) | ((dom (Exec I,s2)) \ NAT )
by A21, FUNCT_1:165;
:: according to FUNCT_7:def 2 :: thesis: verum end; suppose
ex
a,
b being
Data-Location st
I = AddTo a,
b
;
:: thesis: Exec I,s1, Exec I,s2 equal_outside NAT then consider a,
b being
Data-Location such that A29:
I = AddTo a,
b
;
for
x being
set st
x in (dom (Exec I,s1)) \ NAT holds
(Exec I,s1) . x = (Exec I,s2) . x
proof
let x be
set ;
:: thesis: ( x in (dom (Exec I,s1)) \ NAT implies (Exec I,s1) . x = (Exec I,s2) . x )
assume A30:
x in (dom (Exec I,s1)) \ NAT
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . x
then A31:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC SCM or x = a or ( x is Data-Location & x <> a ) )
by A20, A17, A30, A31, Th3;
suppose that A34:
x is
Data-Location
and A35:
x <> a
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . xthus (Exec I,s1) . x =
s1 . x
by A29, A34, A35, AMI_3:9
.=
s2 . x
by A18, A34, Th5
.=
(Exec I,s2) . x
by A29, A34, A35, AMI_3:9
;
:: thesis: verum end; end;
end; hence
(Exec I,s1) | ((dom (Exec I,s1)) \ NAT ) = (Exec I,s2) | ((dom (Exec I,s2)) \ NAT )
by A21, FUNCT_1:165;
:: according to FUNCT_7:def 2 :: thesis: verum end; suppose
ex
a,
b being
Data-Location st
I = SubFrom a,
b
;
:: thesis: Exec I,s1, Exec I,s2 equal_outside NAT then consider a,
b being
Data-Location such that A36:
I = SubFrom a,
b
;
for
x being
set st
x in (dom (Exec I,s1)) \ NAT holds
(Exec I,s1) . x = (Exec I,s2) . x
proof
let x be
set ;
:: thesis: ( x in (dom (Exec I,s1)) \ NAT implies (Exec I,s1) . x = (Exec I,s2) . x )
assume A37:
x in (dom (Exec I,s1)) \ NAT
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . x
then A38:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC SCM or x = a or ( x is Data-Location & x <> a ) )
by A20, A17, A37, A38, Th3;
suppose that A41:
x is
Data-Location
and A42:
x <> a
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . xthus (Exec I,s1) . x =
s1 . x
by A36, A41, A42, AMI_3:10
.=
s2 . x
by A18, A41, Th5
.=
(Exec I,s2) . x
by A36, A41, A42, AMI_3:10
;
:: thesis: verum end; end;
end; hence
(Exec I,s1) | ((dom (Exec I,s1)) \ NAT ) = (Exec I,s2) | ((dom (Exec I,s2)) \ NAT )
by A21, FUNCT_1:165;
:: according to FUNCT_7:def 2 :: thesis: verum end; suppose
ex
a,
b being
Data-Location st
I = MultBy a,
b
;
:: thesis: Exec I,s1, Exec I,s2 equal_outside NAT then consider a,
b being
Data-Location such that A43:
I = MultBy a,
b
;
for
x being
set st
x in (dom (Exec I,s1)) \ NAT holds
(Exec I,s1) . x = (Exec I,s2) . x
proof
let x be
set ;
:: thesis: ( x in (dom (Exec I,s1)) \ NAT implies (Exec I,s1) . x = (Exec I,s2) . x )
assume A44:
x in (dom (Exec I,s1)) \ NAT
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . x
then A45:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC SCM or x = a or ( x is Data-Location & x <> a ) )
by A20, A17, A44, A45, Th3;
suppose that A48:
x is
Data-Location
and A49:
x <> a
;
:: thesis: (Exec I,s1) . x = (Exec I,s2) . xthus (Exec I,s1) . x =
s1 . x
by A43, A48, A49, AMI_3:11
.=
s2 . x
by A18, A48, Th5
.=
(Exec I,s2) . x
by A43, A48, A49, AMI_3:11
;
:: thesis: verum end; end;
end; hence
(Exec I,s1) | ((dom (Exec I,s1)) \ NAT ) = (Exec I,s2) | ((dom (Exec I,s2)) \ NAT )
by A21, FUNCT_1:165;
:: according to FUNCT_7:def 2 :: thesis: verum end; suppose
ex
a,
b being
Data-Location st
I = Divide a,
b
;
:: thesis: Exec I,s1, Exec I,s2 equal_outside NAT then consider a,
b being
Data-Location such that A50:
I = Divide a,
b
;
for
x being
set st
x in (dom (Exec I,s1)) \ NAT holds
(Exec I,s1) . x = (Exec I,s2) . x
hence
(Exec I,s1) | ((dom (Exec I,s1)) \ NAT ) = (Exec I,s2) | ((dom (Exec I,s2)) \ NAT )
by A21, FUNCT_1:165;
:: according to FUNCT_7:def 2 :: thesis: verum end; end;