let I be InitHalting good Program of SCM+FSA; for a being read-write Int-Location st ( for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA st s . a > 0 holds
(IExec (I,P,s)) . a < s . a ) holds
while>0 (a,I) is InitHalting
let a be read-write Int-Location ; ( ( for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA st s . a > 0 holds
(IExec (I,P,s)) . a < s . a ) implies while>0 (a,I) is InitHalting )
set D = Data-Locations ;
defpred S1[ Element of NAT ] means for t being State of SCM+FSA
for Q being Instruction-Sequence of SCM+FSA st t . a <= $1 holds
while>0 (a,I) is_halting_onInit t,Q;
assume A1:
for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA st s . a > 0 holds
(IExec (I,P,s)) . a < s . a
; while>0 (a,I) is InitHalting
A2:
now let k be
Element of
NAT ;
( S1[k] implies S1[k + 1] )assume A3:
S1[
k]
;
S1[k + 1]now let t be
State of
SCM+FSA;
for Q being Instruction-Sequence of SCM+FSA st t . a <= k + 1 holds
while>0 (a,I) is_halting_onInit b2,b3let Q be
Instruction-Sequence of
SCM+FSA;
( t . a <= k + 1 implies while>0 (a,I) is_halting_onInit b1,b2 )assume A4:
t . a <= k + 1
;
while>0 (a,I) is_halting_onInit b1,b2per cases
( t . a <> k + 1 or t . a = k + 1 )
;
suppose A5:
t . a = k + 1
;
while>0 (a,I) is_halting_onInit b1,b2set l0 =
intloc 0;
set tW0 =
Initialized t;
set QW =
Q +* (while>0 (a,I));
set t1 =
Initialized t;
set Q1 =
Q +* I;
set Wt =
Comput (
(Q +* (while>0 (a,I))),
(Initialized t),
((LifeSpan ((Q +* I),(Initialized t))) + 3));
set A =
NAT ;
set It =
Comput (
(Q +* I),
(Initialized t),
(LifeSpan ((Q +* I),(Initialized t))));
A6:
I is_halting_onInit t,
Q
by SCM_HALT:26;
then
Q +* I halts_on Initialized t
by SCM_HALT:def 5;
then A7:
Q +* I halts_on Initialized t
;
A9:
I is_closed_onInit t,
Q
by SCM_HALT:25;
then A10:
DataPart (Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) = DataPart (Comput ((Q +* I),(Initialized t),(LifeSpan ((Q +* I),(Initialized t)))))
by A5, A6, Th21;
then A11:
(Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) . (intloc 0) =
(Comput ((Q +* I),(Initialized t),(LifeSpan ((Q +* I),(Initialized t))))) . (intloc 0)
by SCMFSA6A:7
.=
(Result ((Q +* I),(Initialized t))) . (intloc 0)
by A7, EXTPRO_1:23
.=
(Result ((Q +* I),(Initialized t))) . (intloc 0)
.=
(IExec (I,Q,t)) . (intloc 0)
by SCMFSA6B:def 1
.=
1
by SCM_HALT:9
;
(Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) . a =
(Comput ((Q +* I),(Initialized t),(LifeSpan ((Q +* I),(Initialized t))))) . a
by A10, SCMFSA6A:7
.=
(Result ((Q +* I),(Initialized t))) . a
by A7, EXTPRO_1:23
.=
(Result ((Q +* I),(Initialized t))) . a
.=
(IExec (I,Q,t)) . a
by SCMFSA6B:def 1
;
then
(Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) . a < k + 1
by A1, A5;
then
while>0 (
a,
I)
is_halting_onInit Comput (
(Q +* (while>0 (a,I))),
(Initialized t),
((LifeSpan ((Q +* I),(Initialized t))) + 3)),
Q +* (while>0 (a,I))
by A3, INT_1:7;
then
(Q +* (while>0 (a,I))) +* (while>0 (a,I)) halts_on Initialized (Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3)))
by SCM_HALT:def 5;
then A15:
(Q +* (while>0 (a,I))) +* (while>0 (a,I)) halts_on Initialized (Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3)))
;
A16:
(Q +* (while>0 (a,I))) +* (while>0 (a,I)) = Q +* (while>0 (a,I))
by FUNCT_4:93;
IC (Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) = 0
by A5, A9, A6, Th21;
then A17:
Initialized (Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))) = Comput (
(Q +* (while>0 (a,I))),
(Initialized t),
((LifeSpan ((Q +* I),(Initialized t))) + 3))
by A11, Th6;
now consider m being
Element of
NAT such that A18:
CurInstr (
(Q +* (while>0 (a,I))),
(Comput ((Q +* (while>0 (a,I))),(Comput ((Q +* (while>0 (a,I))),(Initialized t),((LifeSpan ((Q +* I),(Initialized t))) + 3))),m)))
= halt SCM+FSA
by A17, A15, A16, EXTPRO_1:29;
take mm =
((LifeSpan ((Q +* I),(Initialized t))) + 3) + m;
CurInstr ((Q +* (while>0 (a,I))),(Comput ((Q +* (while>0 (a,I))),(Initialized t),mm))) = halt SCM+FSAthus
CurInstr (
(Q +* (while>0 (a,I))),
(Comput ((Q +* (while>0 (a,I))),(Initialized t),mm)))
= halt SCM+FSA
by A18, EXTPRO_1:4;
verum end; then
Q +* (while>0 (a,I)) halts_on Initialized t
by EXTPRO_1:29;
then
Q +* (while>0 (a,I)) halts_on Initialized t
;
hence
while>0 (
a,
I)
is_halting_onInit t,
Q
by SCM_HALT:def 5;
verum end; end; end; hence
S1[
k + 1]
;
verum end;
A19:
S1[ 0 ]
by Th16;
A20:
for k being Element of NAT holds S1[k]
from NAT_1:sch 1(A19, A2);
hence
while>0 (a,I) is InitHalting
by SCM_HALT:26; verum