thus
SCM R is IC-relocable
SCM R is Exec-preserving proof
let I be
Instruction of
(SCM R);
AMISTD_2:def 19 I is IC-relocable
per cases
( I = [0,{},{}] or ex a, b being Data-Location of R st I = a := b or ex a, b being Data-Location of R st I = AddTo (a,b) or ex a, b being Data-Location of R st I = SubFrom (a,b) or ex a, b being Data-Location of R st I = MultBy (a,b) or ex i1 being Element of NAT st I = goto (i1,R) or ex a being Data-Location of R ex i1 being Element of NAT st I = a =0_goto i1 or ex a being Data-Location of R ex r being Element of R st I = a := r )
by SCMRING2:8;
suppose A1:
ex
i1 being
Element of
NAT st
I = goto (
i1,
R)
;
I is IC-relocable let j,
k be
natural number ;
AMISTD_2:def 18 for b1 being set holds (IC (Exec ((IncAddr (I,j)),b1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (b1,k))))let s1 be
State of
(SCM R);
(IC (Exec ((IncAddr (I,j)),s1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))set s2 =
IncIC (
s1,
k);
consider i1 being
Element of
NAT such that A2:
I = goto (
i1,
R)
by A1;
thus (IC (Exec ((IncAddr (I,j)),s1))) + k =
(IC (Exec ((goto ((j + i1),R)),s1))) + k
by A2, Th69
.=
(j + i1) + k
by SCMRING2:17
.=
IC (Exec ((goto (((j + i1) + k),R)),(IncIC (s1,k))))
by SCMRING2:17
.=
IC (Exec ((goto (((j + k) + i1),R)),(IncIC (s1,k))))
.=
IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))
by A2, Th69
;
verum end; suppose
ex
a being
Data-Location of
R ex
i1 being
Element of
NAT st
I = a =0_goto i1
;
I is IC-relocable then consider a being
Data-Location of
R,
i1 being
Element of
NAT such that A3:
I = a =0_goto i1
;
let j,
k be
natural number ;
AMISTD_2:def 18 for b1 being set holds (IC (Exec ((IncAddr (I,j)),b1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (b1,k))))let s1 be
State of
(SCM R);
(IC (Exec ((IncAddr (I,j)),s1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))set s2 =
IncIC (
s1,
k);
(
a <> IC &
dom ((IC ) .--> ((IC s1) + k)) = {(IC )} )
by Th3, FUNCOP_1:19;
then
not
a in dom ((IC ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A4:
s1 . a = (IncIC (s1,k)) . a
by FUNCT_4:12;
per cases
( s1 . a = 0. R or s1 . a <> 0. R )
;
suppose A5:
s1 . a = 0. R
;
(IC (Exec ((IncAddr (I,j)),s1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))thus (IC (Exec ((IncAddr (I,j)),s1))) + k =
(IC (Exec ((a =0_goto (j + i1)),s1))) + k
by A3, Th70
.=
(j + i1) + k
by A5, SCMRING2:18
.=
IC (Exec ((a =0_goto ((j + i1) + k)),(IncIC (s1,k))))
by A4, A5, SCMRING2:18
.=
IC (Exec ((a =0_goto ((j + k) + i1)),(IncIC (s1,k))))
.=
IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))
by A3, Th70
;
verum end; suppose A6:
s1 . a <> 0. R
;
(IC (Exec ((IncAddr (I,j)),s1))) + k = IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))A7:
IncAddr (
I,
j)
= a =0_goto (i1 + j)
by A3, Th70;
A8:
IncAddr (
I,
(j + k))
= a =0_goto (i1 + (j + k))
by A3, Th70;
dom ((IC ) .--> ((IC s1) + k)) = {(IC )}
by FUNCOP_1:19;
then
IC in dom ((IC ) .--> ((IC s1) + k))
by TARSKI:def 1;
then A9:
IC (IncIC (s1,k)) =
((IC ) .--> ((IC s1) + k)) . (IC )
by FUNCT_4:14
.=
(IC s1) + k
by FUNCOP_1:87
;
thus (IC (Exec ((IncAddr (I,j)),s1))) + k =
(succ (IC s1)) + k
by A7, A6, SCMRING2:18
.=
((IC s1) + 1) + k
.=
succ (IC (IncIC (s1,k)))
by A9
.=
IC (Exec ((IncAddr (I,(j + k))),(IncIC (s1,k))))
by A8, A6, A4, SCMRING2:18
;
verum end; end; end; end;
end;
let I be Instruction of (SCM R); AMISTD_2:def 21 I is Exec-preserving
let s1, s2 be State of (SCM R); AMISTD_2:def 20 ( not NPP s1 = NPP s2 or NPP (Exec (I,s1)) = NPP (Exec (I,s2)) )
assume A10:
NPP s1 = NPP s2
; NPP (Exec (I,s1)) = NPP (Exec (I,s2))
A11:
IC s1 = IC s2
by A10, COMPOS_1:230;
A12:
dom (Exec (I,s1)) = the carrier of (SCM R)
by PARTFUN1:def 4;
then A13:
dom (Exec (I,s1)) = dom (Exec (I,s2))
by PARTFUN1:def 4;
X1:
( (Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = NPP (Exec (I,s1)) & (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT) = NPP (Exec (I,s2)) )
by COMPOS_1:232;
per cases
( I = [0,{},{}] or ex a, b being Data-Location of R st I = a := b or ex a, b being Data-Location of R st I = AddTo (a,b) or ex a, b being Data-Location of R st I = SubFrom (a,b) or ex a, b being Data-Location of R st I = MultBy (a,b) or ex i1 being Element of NAT st I = goto (i1,R) or ex a being Data-Location of R ex i1 being Element of NAT st I = a =0_goto i1 or ex a being Data-Location of R ex r being Element of R st I = a := r )
by SCMRING2:8;
suppose
ex
a,
b being
Data-Location of
R st
I = a := b
;
NPP (Exec (I,s1)) = NPP (Exec (I,s2))then consider a,
b being
Data-Location of
R such that A14:
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 ;
( x in (dom (Exec (I,s1))) \ NAT implies (Exec (I,s1)) . x = (Exec (I,s2)) . x )
assume A15:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A16:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC or x = a or ( x is Data-Location of R & x <> a ) )
by A12, A15, A16, Th5;
suppose that A19:
x is
Data-Location of
R
and A20:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A14, A19, A20, SCMRING2:13
.=
s2 . x
by A10, A19, Th7
.=
(Exec (I,s2)) . x
by A14, A19, A20, SCMRING2:13
;
verum end; end;
end; hence
NPP (Exec (I,s1)) = NPP (Exec (I,s2))
by X1, A13, FUNCT_1:165;
verum end; suppose
ex
a,
b being
Data-Location of
R st
I = AddTo (
a,
b)
;
NPP (Exec (I,s1)) = NPP (Exec (I,s2))then consider a,
b being
Data-Location of
R such that A21:
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 ;
( x in (dom (Exec (I,s1))) \ NAT implies (Exec (I,s1)) . x = (Exec (I,s2)) . x )
assume A22:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A23:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC or x = a or ( x is Data-Location of R & x <> a ) )
by A12, A22, A23, Th5;
suppose that A26:
x is
Data-Location of
R
and A27:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A21, A26, A27, SCMRING2:14
.=
s2 . x
by A10, A26, Th7
.=
(Exec (I,s2)) . x
by A21, A26, A27, SCMRING2:14
;
verum end; end;
end; hence
NPP (Exec (I,s1)) = NPP (Exec (I,s2))
by X1, A13, FUNCT_1:165;
verum end; suppose
ex
a,
b being
Data-Location of
R st
I = SubFrom (
a,
b)
;
NPP (Exec (I,s1)) = NPP (Exec (I,s2))then consider a,
b being
Data-Location of
R such that A28:
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 ;
( x in (dom (Exec (I,s1))) \ NAT implies (Exec (I,s1)) . x = (Exec (I,s2)) . x )
assume A29:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A30:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC or x = a or ( x is Data-Location of R & x <> a ) )
by A12, A29, A30, Th5;
suppose that A33:
x is
Data-Location of
R
and A34:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A28, A33, A34, SCMRING2:15
.=
s2 . x
by A10, A33, Th7
.=
(Exec (I,s2)) . x
by A28, A33, A34, SCMRING2:15
;
verum end; end;
end; hence
NPP (Exec (I,s1)) = NPP (Exec (I,s2))
by X1, A13, FUNCT_1:165;
verum end; suppose
ex
a,
b being
Data-Location of
R st
I = MultBy (
a,
b)
;
NPP (Exec (I,s1)) = NPP (Exec (I,s2))then consider a,
b being
Data-Location of
R such that A35:
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 ;
( x in (dom (Exec (I,s1))) \ NAT implies (Exec (I,s1)) . x = (Exec (I,s2)) . x )
assume A36:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A37:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC or x = a or ( x is Data-Location of R & x <> a ) )
by A12, A36, A37, Th5;
suppose that A40:
x is
Data-Location of
R
and A41:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A35, A40, A41, SCMRING2:16
.=
s2 . x
by A10, A40, Th7
.=
(Exec (I,s2)) . x
by A35, A40, A41, SCMRING2:16
;
verum end; end;
end; hence
NPP (Exec (I,s1)) = NPP (Exec (I,s2))
by X1, A13, FUNCT_1:165;
verum end; suppose
ex
a being
Data-Location of
R ex
r being
Element of
R st
I = a := r
;
NPP (Exec (I,s1)) = NPP (Exec (I,s2))then consider a being
Data-Location of
R,
r being
Element of
R such that A54:
I = a := r
;
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 ;
( x in (dom (Exec (I,s1))) \ NAT implies (Exec (I,s1)) . x = (Exec (I,s2)) . x )
assume A55:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A56:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC or x = a or ( x is Data-Location of R & x <> a ) )
by A12, A55, A56, Th5;
suppose that A59:
x is
Data-Location of
R
and A60:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A54, A59, A60, SCMRING2:19
.=
s2 . x
by A10, A59, Th7
.=
(Exec (I,s2)) . x
by A54, A59, A60, SCMRING2:19
;
verum end; end;
end; hence
NPP (Exec (I,s1)) = NPP (Exec (I,s2))
by X1, A13, FUNCT_1:165;
verum end; end;