let N be with_non-empty_elements set ; for S being non empty stored-program halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S st ex k being Element of NAT st s . (IC (Computation s,k)) = halt S holds
for i being Element of NAT holds Result s = Result (Computation s,i)
let S be non empty stored-program halting IC-Ins-separated steady-programmed definite AMI-Struct of N; for s being State of S st ex k being Element of NAT st s . (IC (Computation s,k)) = halt S holds
for i being Element of NAT holds Result s = Result (Computation s,i)
let s be State of S; ( ex k being Element of NAT st s . (IC (Computation s,k)) = halt S implies for i being Element of NAT holds Result s = Result (Computation s,i) )
given k being Element of NAT such that A1:
s . (IC (Computation s,k)) = halt S
; for i being Element of NAT holds Result s = Result (Computation s,i)
let i be Element of NAT ; Result s = Result (Computation s,i)
set s' = Computation s,k;
A2:
CurInstr (Computation s,k) = halt S
by A1, Th54;
IC (Computation s,k) in NAT
by Def4;
then X:
IC (Computation s,k) in dom (ProgramPart (Computation s,i))
by LmU;
now per cases
( i <= k or i >= k )
;
suppose
i <= k
;
Result s = Result (Computation s,i)then consider j being
Nat such that A3:
k = i + j
by NAT_1:10;
reconsider j =
j as
Element of
NAT by ORDINAL1:def 13;
A4:
Computation s,
k = Computation (Computation s,i),
j
by A3, Th51;
then
(ProgramPart (Computation s,i)) . (IC (Computation s,k)) = halt S
by A2, LmX;
then A5:
ProgramPart (Computation s,i) halts_on Computation s,
i
by A4, Def20, X;
thus Result s =
Computation s,
k
by A1, Th56
.=
Result (Computation s,i)
by A2, A4, A5, Def22
;
verum end; suppose A6:
i >= k
;
Result s = Result (Computation s,i)A7:
Computation (Computation s,k),
0 = Computation s,
k
by Th13;
A8:
Computation s,
i = Computation s,
k
by A2, A6, Th52;
IC (Computation (Computation s,k),0 ) in NAT
by Def4;
then X:
IC (Computation (Computation s,k),0 ) in dom (ProgramPart (Computation s,k))
by LmU;
(ProgramPart (Computation s,k)) . (IC (Computation (Computation s,k),0 )) = halt S
by A2, A7, LmX;
then A9:
ProgramPart (Computation s,i) halts_on Computation s,
i
by Def20, X, A8;
thus Result s =
Computation s,
k
by A1, Th56
.=
Result (Computation s,i)
by A2, A8, A7, A9, Def22
;
verum end; end; end;
hence
Result s = Result (Computation s,i)
; verum