let I be InitHalting good Program of SCM+FSA; for a being read-write Int-Location st ex f being Function of (product the Object-Kind of SCM+FSA),INT st
for s, t being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT holds
( ( f . s > 0 implies f . (IExec (I,P,s)) < f . s ) & ( DataPart s = DataPart t implies f . s = f . t ) & ( f . s <= 0 implies s . a <= 0 ) & ( s . a <= 0 implies f . s <= 0 ) ) holds
while>0 (a,I) is InitHalting
let a be read-write Int-Location ; ( ex f being Function of (product the Object-Kind of SCM+FSA),INT st
for s, t being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT holds
( ( f . s > 0 implies f . (IExec (I,P,s)) < f . s ) & ( DataPart s = DataPart t implies f . s = f . t ) & ( f . s <= 0 implies s . a <= 0 ) & ( s . a <= 0 implies f . s <= 0 ) ) implies while>0 (a,I) is InitHalting )
set D = Data-Locations SCM+FSA;
given f being Function of (product the Object-Kind of SCM+FSA),INT such that A1:
for s, t being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT holds
( ( f . s > 0 implies f . (IExec (I,P,s)) < f . s ) & ( DataPart s = DataPart t implies f . s = f . t ) & ( f . s <= 0 implies s . a <= 0 ) & ( s . a <= 0 implies f . s <= 0 ) )
; while>0 (a,I) is InitHalting
defpred S1[ Element of NAT ] means for t being State of SCM+FSA
for Q being the Instructions of SCM+FSA -valued ManySortedSet of NAT st f . t <= $1 holds
while>0 (a,I) is_halting_onInit t,Q;
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 the Instructions of SCM+FSA -valued ManySortedSet of NAT st f . t <= k + 1 holds
while>0 (a,I) is_halting_onInit b2,b3let Q be the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT ;
( f . t <= k + 1 implies while>0 (a,I) is_halting_onInit b1,b2 )assume A4:
f . t <= k + 1
;
while>0 (a,I) is_halting_onInit b1,b2per cases
( f . t <> k + 1 or f . t = k + 1 )
;
suppose A5:
f . t = k + 1
;
while>0 (a,I) is_halting_onInit b1,b2set l0 =
intloc 0;
set Iwhile =
Initialized (while>0 (a,I));
set tW0 =
t +* (Initialize ((intloc 0) .--> 1));
set QW =
Q +* (while>0 (a,I));
set t1 =
t +* (Initialize ((intloc 0) .--> 1));
set Q1 =
Q +* I;
set Wt =
Comput (
(Q +* (while>0 (a,I))),
(t +* (Initialize ((intloc 0) .--> 1))),
((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3));
set A =
NAT ;
set It =
Comput (
(Q +* I),
(t +* (Initialize ((intloc 0) .--> 1))),
(LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))));
A6:
I is_closed_onInit t,
Q
by SCM_HALT:35;
not
intloc 0 in NAT
by SCMFSA_2:84;
then
not
intloc 0 in (dom t) /\ NAT
by XBOOLE_0:def 4;
then A9:
not
intloc 0 in dom (t | NAT)
by RELAT_1:90;
A10:
I is_halting_onInit t,
Q
by SCM_HALT:36;
then A11:
Q +* I halts_on t +* (Initialize ((intloc 0) .--> 1))
by SCM_HALT:def 5;
A12:
not
t . a <= 0
by A1, A5;
then A13:
DataPart (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) = DataPart (Comput ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1)))))))
by A6, A10, Th21;
then A14:
(Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) . (intloc 0) =
(Comput ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))))) . (intloc 0)
by SCMFSA6A:38
.=
(Result ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) . (intloc 0)
by A11, EXTPRO_1:23
.=
((Result ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) +* (t | NAT)) . (intloc 0)
by A9, FUNCT_4:12
.=
(IExec (I,Q,t)) . (intloc 0)
by SCMFSA6B:def 1
.=
1
by SCM_HALT:17
;
DataPart (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) =
DataPart (Result ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1)))))
by A13, A11, EXTPRO_1:23
.=
DataPart ((Result ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) +* (t | NAT))
by COMPOS_1:82
.=
DataPart (IExec (I,Q,t))
by SCMFSA6B:def 1
;
then
f . (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) = f . (IExec (I,Q,t))
by A1;
then
f . (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) < k + 1
by A1, A5;
then
while>0 (
a,
I)
is_halting_onInit Comput (
(Q +* (while>0 (a,I))),
(t +* (Initialize ((intloc 0) .--> 1))),
((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3)),
Q +* (while>0 (a,I))
by A3, INT_1:20;
then A15:
(Q +* (while>0 (a,I))) +* (while>0 (a,I)) halts_on (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) +* (Initialize ((intloc 0) .--> 1))
by SCM_HALT:def 5;
IC (Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) = 0
by A12, A6, A10, Th21;
then A16:
(Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))) +* (Initialize ((intloc 0) .--> 1)) = Comput (
(Q +* (while>0 (a,I))),
(t +* (Initialize ((intloc 0) .--> 1))),
((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))
by A14, Th6;
A17:
(Q +* (while>0 (a,I))) +* (while>0 (a,I)) = Q +* (while>0 (a,I))
by FUNCT_4:99;
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))),(t +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3))),m)))
= halt SCM+FSA
by A16, A15, A17, EXTPRO_1:30;
take mm =
((LifeSpan ((Q +* I),(t +* (Initialize ((intloc 0) .--> 1))))) + 3) + m;
CurInstr ((Q +* (while>0 (a,I))),(Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),mm))) = halt SCM+FSAthus
CurInstr (
(Q +* (while>0 (a,I))),
(Comput ((Q +* (while>0 (a,I))),(t +* (Initialize ((intloc 0) .--> 1))),mm)))
= halt SCM+FSA
by A18, EXTPRO_1:5;
verum end; then
Q +* (while>0 (a,I)) halts_on t +* (Initialize ((intloc 0) .--> 1))
by EXTPRO_1:30;
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 ]
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:36; verum