let I be good InitHalting 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 holds
( ( f . s > 0 implies f . (IExec I,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 holds
( ( f . s > 0 implies f . (IExec I,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 = Int-Locations \/ FinSeq-Locations ;
given f being Function of (product the Object-Kind of SCM+FSA ),INT such that A1:
for s, t being State of SCM+FSA holds
( ( f . s > 0 implies f . (IExec I,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 st f . t <= $1 holds
while>0 a,I is_halting_onInit t;
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 ;
( f . t <= k + 1 implies while>0 a,I is_halting_onInit b1 )assume A4:
f . t <= k + 1
;
while>0 a,I is_halting_onInit b1per cases
( f . t <> k + 1 or f . t = k + 1 )
;
suppose A5:
f . t = k + 1
;
while>0 a,I is_halting_onInit b1set l0 =
intloc 0 ;
set Iwhile =
Initialized (while>0 a,I);
set tW0 =
t +* (Initialized (while>0 a,I));
set t1 =
t +* (Initialized I);
set Wt =
Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
((LifeSpan (t +* (Initialized I))) + 3);
set A =
NAT ;
set It =
Comput (ProgramPart (t +* (Initialized I))),
(t +* (Initialized I)),
(LifeSpan (t +* (Initialized I)));
A6:
I is_closed_onInit t
by SCM_HALT:35;
A7:
while>0 a,
I c= Initialized (while>0 a,I)
by SCMFSA6A:26;
Initialized (while>0 a,I) c= t +* (Initialized (while>0 a,I))
by FUNCT_4:26;
then
while>0 a,
I c= t +* (Initialized (while>0 a,I))
by A7, XBOOLE_1:1;
then
while>0 a,
I c= Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
((LifeSpan (t +* (Initialized I))) + 3)
by AMI_1:81;
then A8:
(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) +* (while>0 a,I) = Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
((LifeSpan (t +* (Initialized I))) + 3)
by FUNCT_4:79;
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
by SCM_HALT:36;
then A11:
ProgramPart (t +* (Initialized I)) halts_on t +* (Initialized I)
by SCM_HALT:def 5;
A12:
not
t . a <= 0
by A1, A5;
then A13:
DataPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) = DataPart (Comput (ProgramPart (t +* (Initialized I))),(t +* (Initialized I)),(LifeSpan (t +* (Initialized I))))
by A6, A10, Th21;
then A14:
(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) . (intloc 0 ) =
(Comput (ProgramPart (t +* (Initialized I))),(t +* (Initialized I)),(LifeSpan (t +* (Initialized I)))) . (intloc 0 )
by SCMFSA6A:38
.=
(Result (t +* (Initialized I))) . (intloc 0 )
by A11, AMI_1:122
.=
((Result (t +* (Initialized I))) +* (t | NAT )) . (intloc 0 )
by A9, FUNCT_4:12
.=
(IExec I,t) . (intloc 0 )
by SCMFSA6B:def 1
.=
1
by SCM_HALT:17
;
DataPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) =
DataPart (Result (t +* (Initialized I)))
by A13, A11, AMI_1:122
.=
DataPart ((Result (t +* (Initialized I))) +* (t | NAT ))
by SCMFSA8C:35
.=
DataPart (IExec I,t)
by SCMFSA6B:def 1
;
then
f . (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) = f . (IExec I,t)
by A1;
then
f . (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) < k + 1
by A1, A5;
then
while>0 a,
I is_halting_onInit Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
((LifeSpan (t +* (Initialized I))) + 3)
by A3, INT_1:20;
then A15:
ProgramPart ((Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) +* (Initialized (while>0 a,I))) halts_on (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) +* (Initialized (while>0 a,I))
by SCM_HALT:def 5;
IC (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) = 0
by A12, A6, A10, Th21;
then A16:
(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)) +* (Initialized (while>0 a,I)) = Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
((LifeSpan (t +* (Initialized I))) + 3)
by A14, A8, Th6;
now consider m being
Element of
NAT such that A17:
CurInstr (ProgramPart (Comput (ProgramPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3))),(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)),m)),
(Comput (ProgramPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3))),(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)),m) = halt SCM+FSA
by A16, A15, AMI_1:146;
T:
ProgramPart (t +* (Initialized (while>0 a,I))) = ProgramPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3))
by AMI_1:144;
x:
Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(t +* (Initialized (while>0 a,I))),
(((LifeSpan (t +* (Initialized I))) + 3) + m) = Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),
(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),((LifeSpan (t +* (Initialized I))) + 3)),
m
by AMI_1:51;
take mm =
((LifeSpan (t +* (Initialized I))) + 3) + m;
CurInstr (ProgramPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),mm)),(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),mm) = halt SCM+FSA thus
CurInstr (ProgramPart (Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),mm)),
(Comput (ProgramPart (t +* (Initialized (while>0 a,I)))),(t +* (Initialized (while>0 a,I))),mm) = halt SCM+FSA
by A17, x, T;
verum end; then
ProgramPart (t +* (Initialized (while>0 a,I))) halts_on t +* (Initialized (while>0 a,I))
by AMI_1:146;
hence
while>0 a,
I is_halting_onInit t
by SCM_HALT:def 5;
verum end; end; end; hence
S1[
k + 1]
;
verum end;
A18:
S1[ 0 ]
A19:
for k being Element of NAT holds S1[k]
from NAT_1:sch 1(A18, A2);
hence
while>0 a,I is InitHalting
by SCM_HALT:36; verum