thus
SCM R is IC-good
SCM R is Exec-preserving proof
let I be
Instruction of
(SCM R);
AMISTD_2:def 19 I is IC-good
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-good let k be
natural number ;
AMISTD_2:def 18 for b1 being set holds (IC (Exec (I,b1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (b1,k))))let s1 be
State of
(SCM R);
(IC (Exec (I,s1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))set s2 =
IncrIC (
s1,
k);
consider i1 being
Element of
NAT such that A2:
I = goto (
i1,
R)
by A1;
IC (Exec (I,s1)) = i1
by A2, SCMRING2:17;
hence (IC (Exec (I,s1))) + k =
IC (Exec ((goto ((i1 + k),R)),(IncrIC (s1,k))))
by SCMRING2:17
.=
IC (Exec ((IncAddr (I,k)),(IncrIC (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-good then consider a being
Data-Location of
R,
i1 being
Element of
NAT such that A3:
I = a =0_goto i1
;
let k be
natural number ;
AMISTD_2:def 18 for b1 being set holds (IC (Exec (I,b1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (b1,k))))let s1 be
State of
(SCM R);
(IC (Exec (I,s1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))set s2 =
IncrIC (
s1,
k);
(
a <> IC (SCM R) &
dom ((IC (SCM R)) .--> ((IC s1) + k)) = {(IC (SCM R))} )
by Th3, FUNCOP_1:19;
then
not
a in dom ((IC (SCM R)) .--> ((IC s1) + k))
by TARSKI:def 1;
then A5:
s1 . a = (IncrIC (s1,k)) . a
by FUNCT_4:12;
now per cases
( s1 . a = 0. R or s1 . a <> 0. R )
;
suppose A6:
s1 . a = 0. R
;
(IC (Exec (I,s1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))then
IC (Exec (I,s1)) = i1
by A3, SCMRING2:18;
hence (IC (Exec (I,s1))) + k =
IC (Exec ((a =0_goto (i1 + k)),(IncrIC (s1,k))))
by A5, A6, SCMRING2:18
.=
IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))
by A3, Th70
;
verum end; suppose A7:
s1 . a <> 0. R
;
(IC (Exec (I,s1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))
dom ((IC (SCM R)) .--> ((IC s1) + k)) = {(IC (SCM R))}
by FUNCOP_1:19;
then
IC (SCM R) in dom ((IC (SCM R)) .--> ((IC s1) + k))
by TARSKI:def 1;
then A8:
IC (IncrIC (s1,k)) =
((IC (SCM R)) .--> ((IC s1) + k)) . (IC (SCM R))
by FUNCT_4:14
.=
(IC s1) + k
by FUNCOP_1:87
;
A9:
IC (Exec (I,s1)) =
succ (IC s1)
by A3, A7, SCMRING2:18
.=
(IC s1) + 1
;
IC (Exec (I,(IncrIC (s1,k)))) =
succ (IC (IncrIC (s1,k)))
by A3, A5, A7, SCMRING2:18
.=
((IC s1) + k) + 1
by A8
;
hence (IC (Exec (I,s1))) + k =
succ (IC (IncrIC (s1,k)))
by A3, A5, A7, A9, SCMRING2:18
.=
IC (Exec ((a =0_goto (i1 + k)),(IncrIC (s1,k))))
by A5, A7, SCMRING2:18
.=
IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))
by A3, Th70
;
verum end; end; end; hence
(IC (Exec (I,s1))) + k = IC (Exec ((IncAddr (I,k)),(IncrIC (s1,k))))
;
verum 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 s1,s2 equal_outside NAT or Exec (I,s1), Exec (I,s2) equal_outside NAT )
assume A11:
s1,s2 equal_outside NAT
; Exec (I,s1), Exec (I,s2) equal_outside NAT
A12:
IC s1 = IC s2
by A11, COMPOS_1:24;
A13:
dom (Exec (I,s1)) = the carrier of (SCM R)
by PARTFUN1:def 4;
then A14:
dom (Exec (I,s1)) = dom (Exec (I,s2))
by PARTFUN1:def 4;
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
;
Exec (I,s1), Exec (I,s2) equal_outside NAT then consider a,
b being
Data-Location of
R such that A15:
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 A16:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A17:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC (SCM R) or x = a or ( x is Data-Location of R & x <> a ) )
by A13, A16, A17, Th5;
suppose that A20:
x is
Data-Location of
R
and A21:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A15, A20, A21, SCMRING2:13
.=
s2 . x
by A11, A20, Th7
.=
(Exec (I,s2)) . x
by A15, A20, A21, SCMRING2:13
;
verum end; end;
end; hence
(Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT)
by A14, FUNCT_1:165;
FUNCT_7:def 2 verum end; suppose
ex
a,
b being
Data-Location of
R st
I = AddTo (
a,
b)
;
Exec (I,s1), Exec (I,s2) equal_outside NAT then consider a,
b being
Data-Location of
R such that A22:
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 A23:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A24:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC (SCM R) or x = a or ( x is Data-Location of R & x <> a ) )
by A13, A23, A24, Th5;
suppose that A27:
x is
Data-Location of
R
and A28:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A22, A27, A28, SCMRING2:14
.=
s2 . x
by A11, A27, Th7
.=
(Exec (I,s2)) . x
by A22, A27, A28, SCMRING2:14
;
verum end; end;
end; hence
(Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT)
by A14, FUNCT_1:165;
FUNCT_7:def 2 verum end; suppose
ex
a,
b being
Data-Location of
R st
I = SubFrom (
a,
b)
;
Exec (I,s1), Exec (I,s2) equal_outside NAT then consider a,
b being
Data-Location of
R such that A29:
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 A30:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A31:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC (SCM R) or x = a or ( x is Data-Location of R & x <> a ) )
by A13, A30, A31, Th5;
suppose that A34:
x is
Data-Location of
R
and A35:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A29, A34, A35, SCMRING2:15
.=
s2 . x
by A11, A34, Th7
.=
(Exec (I,s2)) . x
by A29, A34, A35, SCMRING2:15
;
verum end; end;
end; hence
(Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT)
by A14, FUNCT_1:165;
FUNCT_7:def 2 verum end; suppose
ex
a,
b being
Data-Location of
R st
I = MultBy (
a,
b)
;
Exec (I,s1), Exec (I,s2) equal_outside NAT then consider a,
b being
Data-Location of
R such that A36:
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 A37:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A38:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC (SCM R) or x = a or ( x is Data-Location of R & x <> a ) )
by A13, A37, A38, Th5;
suppose that A41:
x is
Data-Location of
R
and A42:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A36, A41, A42, SCMRING2:16
.=
s2 . x
by A11, A41, Th7
.=
(Exec (I,s2)) . x
by A36, A41, A42, SCMRING2:16
;
verum end; end;
end; hence
(Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT)
by A14, FUNCT_1:165;
FUNCT_7:def 2 verum end; suppose
ex
a being
Data-Location of
R ex
r being
Element of
R st
I = a := r
;
Exec (I,s1), Exec (I,s2) equal_outside NAT then consider a being
Data-Location of
R,
r being
Element of
R such that A55:
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 A56:
x in (dom (Exec (I,s1))) \ NAT
;
(Exec (I,s1)) . x = (Exec (I,s2)) . x
then A57:
not
x in NAT
by XBOOLE_0:def 5;
per cases
( x = IC (SCM R) or x = a or ( x is Data-Location of R & x <> a ) )
by A13, A56, A57, Th5;
suppose that A60:
x is
Data-Location of
R
and A61:
x <> a
;
(Exec (I,s1)) . x = (Exec (I,s2)) . xthus (Exec (I,s1)) . x =
s1 . x
by A55, A60, A61, SCMRING2:19
.=
s2 . x
by A11, A60, Th7
.=
(Exec (I,s2)) . x
by A55, A60, A61, SCMRING2:19
;
verum end; end;
end; hence
(Exec (I,s1)) | ((dom (Exec (I,s1))) \ NAT) = (Exec (I,s2)) | ((dom (Exec (I,s2))) \ NAT)
by A14, FUNCT_1:165;
FUNCT_7:def 2 verum end; end;