let IL be non empty set ; :: thesis: for N being with_non-empty_elements set
for S being non empty stored-program halting IC-Ins-separated steady-programmed definite AMI-Struct of IL,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 N be with_non-empty_elements set ; :: thesis: for S being non empty stored-program halting IC-Ins-separated steady-programmed definite AMI-Struct of IL,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 IL,N; :: thesis: 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; :: thesis: ( 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
; :: thesis: for i being Element of NAT holds Result s = Result (Computation s,i)
set s' = Computation s,k;
A2:
CurInstr (Computation s,k) = halt S
by A1, Th54;
let i be Element of NAT ; :: thesis: Result s = Result (Computation s,i)
now per cases
( i <= k or i >= k )
;
suppose
i <= k
;
:: thesis: 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 A5:
Computation s,
i is
halting
by A2, Def20;
thus Result s =
Computation s,
k
by A1, Th56
.=
Result (Computation s,i)
by A2, A4, A5, Def22
;
:: thesis: verum end; suppose
i >= k
;
:: thesis: Result s = Result (Computation s,i)then A6:
Computation s,
i = Computation s,
k
by A2, Th52;
A7:
Computation (Computation s,k),
0 = Computation s,
k
by Tx0;
then A8:
Computation s,
i is
halting
by A2, A6, Def20;
thus Result s =
Computation s,
k
by A1, Th56
.=
Result (Computation s,i)
by A2, A6, A7, A8, Def22
;
:: thesis: verum end; end; end;
hence
Result s = Result (Computation s,i)
; :: thesis: verum