let I be Instruction of SCM+FSA; AMISTD_2:def 21 I is Exec-preserving
let s1, s2 be State of SCM+FSA; AMISTD_2:def 20 ( not s1,s2 equal_outside K37() or Exec (I,s1), Exec (I,s2) equal_outside K37() )
assume A1:
s1,s2 equal_outside NAT
; Exec (I,s1), Exec (I,s2) equal_outside K37()
A2:
( not InsCode I <= 9 + 1 or InsCode I <= 8 + 1 or InsCode I = 10 )
by NAT_1:8;
A3:
( not InsCode I <= 10 + 1 or InsCode I <= 10 or InsCode I = 11 )
by NAT_1:8;
A4:
InsCode I <= 11 + 1
by SCMFSA_2:35;
per cases
( InsCode I = 0 or InsCode I = 1 or InsCode I = 2 or InsCode I = 3 or InsCode I = 4 or InsCode I = 5 or InsCode I = 6 or InsCode I = 7 or InsCode I = 8 or InsCode I = 9 or InsCode I = 10 or InsCode I = 11 or InsCode I = 12 )
by A4, A3, A2, NAT_1:8, NAT_1:33;
suppose
InsCode I = 1
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da,
db being
Int-Location such that A6:
I = da := db
by SCMFSA_2:54;
IC (Exec (I,s1)) =
succ (IC s1)
by A6, SCMFSA_2:89
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A6, SCMFSA_2:89
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A7, A10, Th28;
verum end; suppose
InsCode I = 2
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da,
db being
Int-Location such that A11:
I = AddTo (
da,
db)
by SCMFSA_2:55;
IC (Exec (I,s1)) =
succ (IC s1)
by A11, SCMFSA_2:90
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A11, SCMFSA_2:90
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A12, A15, Th28;
verum end; suppose
InsCode I = 3
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da,
db being
Int-Location such that A16:
I = SubFrom (
da,
db)
by SCMFSA_2:56;
IC (Exec (I,s1)) =
succ (IC s1)
by A16, SCMFSA_2:91
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A16, SCMFSA_2:91
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A17, A20, Th28;
verum end; suppose
InsCode I = 4
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da,
db being
Int-Location such that A21:
I = MultBy (
da,
db)
by SCMFSA_2:57;
IC (Exec (I,s1)) =
succ (IC s1)
by A21, SCMFSA_2:92
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A21, SCMFSA_2:92
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A22, A25, Th28;
verum end; suppose
InsCode I = 5
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da,
db being
Int-Location such that A26:
I = Divide (
da,
db)
by SCMFSA_2:58;
IC (Exec (I,s1)) =
succ (IC s1)
by A26, SCMFSA_2:93
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A26, SCMFSA_2:93
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A27, A31, Th28;
verum end; suppose
InsCode I = 9
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider db,
da being
Int-Location ,
f being
FinSeq-Location such that A49:
I = da := (
f,
db)
by SCMFSA_2:62;
A50:
now let c be
Int-Location ;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1per cases
( c = da or c <> da )
;
suppose A51:
c = da
;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1then consider n being
Element of
NAT such that A52:
n = abs (s2 . db)
and A53:
(Exec ((da := (f,db)),s2)) . c = (s2 . f) /. n
by SCMFSA_2:98;
consider m being
Element of
NAT such that A54:
m = abs (s1 . db)
and A55:
(Exec ((da := (f,db)),s1)) . c = (s1 . f) /. m
by A51, SCMFSA_2:98;
m = n
by A1, A54, A52, Th30;
hence
(Exec (I,s1)) . c = (Exec (I,s2)) . c
by A1, A49, A55, A53, Th31;
verum end; end; end; IC (Exec (I,s1)) =
succ (IC s1)
by A49, SCMFSA_2:98
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A49, SCMFSA_2:98
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A50, A57, Th28;
verum end; suppose
InsCode I = 10
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider db,
da being
Int-Location ,
f being
FinSeq-Location such that A58:
I = (
f,
db)
:= da
by SCMFSA_2:63;
A59:
now let g be
FinSeq-Location ;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1per cases
( g = f or g <> f )
;
suppose A60:
g = f
;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1A61:
s1 . da = s2 . da
by A1, Th30;
consider n being
Element of
NAT such that A62:
n = abs (s2 . db)
and A63:
(Exec (((f,db) := da),s2)) . f = (s2 . f) +* (
n,
(s2 . da))
by SCMFSA_2:99;
consider m being
Element of
NAT such that A64:
m = abs (s1 . db)
and A65:
(Exec (((f,db) := da),s1)) . f = (s1 . f) +* (
m,
(s1 . da))
by SCMFSA_2:99;
m = n
by A1, A64, A62, Th30;
hence
(Exec (I,s1)) . g = (Exec (I,s2)) . g
by A1, A58, A60, A65, A63, A61, Th31;
verum end; end; end; IC (Exec (I,s1)) =
succ (IC s1)
by A58, SCMFSA_2:99
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A58, SCMFSA_2:99
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A67, A59, Th28;
verum end; suppose
InsCode I = 11
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da being
Int-Location ,
f being
FinSeq-Location such that A68:
I = da :=len f
by SCMFSA_2:64;
IC (Exec (I,s1)) =
succ (IC s1)
by A68, SCMFSA_2:100
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A68, SCMFSA_2:100
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A69, A72, Th28;
verum end; suppose
InsCode I = 12
;
Exec (I,s1), Exec (I,s2) equal_outside K37()then consider da being
Int-Location ,
f being
FinSeq-Location such that A73:
I = f :=<0,...,0> da
by SCMFSA_2:65;
A74:
now let g be
FinSeq-Location ;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1per cases
( g = f or g <> f )
;
suppose A75:
g = f
;
(Exec (I,s1)) . b1 = (Exec (I,s2)) . b1
( ex
m being
Element of
NAT st
(
m = abs (s1 . da) &
(Exec ((f :=<0,...,0> da),s1)) . f = m |-> 0 ) & ex
n being
Element of
NAT st
(
n = abs (s2 . da) &
(Exec ((f :=<0,...,0> da),s2)) . f = n |-> 0 ) )
by SCMFSA_2:101;
hence
(Exec (I,s1)) . g = (Exec (I,s2)) . g
by A1, A73, A75, Th30;
verum end; end; end; IC (Exec (I,s1)) =
succ (IC s1)
by A73, SCMFSA_2:101
.=
succ (IC s2)
by A1, COMPOS_1:24
.=
IC (Exec (I,s2))
by A73, SCMFSA_2:101
;
hence
Exec (
I,
s1),
Exec (
I,
s2)
equal_outside K37()
by A77, A74, Th28;
verum end; end;