let P be Instruction-Sequence of SCMPDS; :: thesis: for s being 0 -started State of SCMPDS

for I being halt-free shiftable Program of SCMPDS

for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let s be 0 -started State of SCMPDS; :: thesis: for I being halt-free shiftable Program of SCMPDS

for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let I be halt-free shiftable Program of SCMPDS; :: thesis: for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let a be Int_position; :: thesis: for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let i be Integer; :: thesis: for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let X be set ; :: thesis: for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let f be Function of (product (the_Values_of SCMPDS)),NAT; :: thesis: ( ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) implies ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

set b = DataLoc ((s . a),i);

set WHL = while<0 (a,i,I);

set pWHL = stop (while<0 (a,i,I));

set pI = stop I;

set i1 = (a,i) >=0_goto ((card I) + 2);

set i2 = goto (- ((card I) + 1));

defpred S_{1}[ Nat] means for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st f . t <= $1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q );

assume A1: for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ; :: thesis: ( ex t being 0 -started State of SCMPDS ex Q being Instruction-Sequence of SCMPDS st

( ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 & not ( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) or ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

assume A2: for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ; :: thesis: ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

A3: for k being Nat st S_{1}[k] holds

S_{1}[k + 1]

A51: S_{1}[ 0 ]
_{1}[k]
from NAT_1:sch 2(A51, A3);

then A53: S_{1}[f . s]
;

for x being Int_position st x in X holds

s . x = s . x ;

hence ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) by A53; :: thesis: verum

for I being halt-free shiftable Program of SCMPDS

for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let s be 0 -started State of SCMPDS; :: thesis: for I being halt-free shiftable Program of SCMPDS

for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let I be halt-free shiftable Program of SCMPDS; :: thesis: for a being Int_position

for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let a be Int_position; :: thesis: for i being Integer

for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let i be Integer; :: thesis: for X being set

for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let X be set ; :: thesis: for f being Function of (product (the_Values_of SCMPDS)),NAT st ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) holds

( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let f be Function of (product (the_Values_of SCMPDS)),NAT; :: thesis: ( ( for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ) & ( for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) implies ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

set b = DataLoc ((s . a),i);

set WHL = while<0 (a,i,I);

set pWHL = stop (while<0 (a,i,I));

set pI = stop I;

set i1 = (a,i) >=0_goto ((card I) + 2);

set i2 = goto (- ((card I) + 1));

defpred S

for Q being Instruction-Sequence of SCMPDS st f . t <= $1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q );

assume A1: for t being 0 -started State of SCMPDS st f . t = 0 holds

t . (DataLoc ((s . a),i)) >= 0 ; :: thesis: ( ex t being 0 -started State of SCMPDS ex Q being Instruction-Sequence of SCMPDS st

( ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 & not ( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ) or ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

assume A2: for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a & t . (DataLoc ((s . a),i)) < 0 holds

( (IExec (I,Q,t)) . a = t . a & f . (Initialize (IExec (I,Q,t))) < f . t & I is_closed_on t,Q & I is_halting_on t,Q & ( for x being Int_position st x in X holds

(IExec (I,Q,t)) . x = t . x ) ) ; :: thesis: ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

A3: for k being Nat st S

S

proof

set n = f . s;
let k be Nat; :: thesis: ( S_{1}[k] implies S_{1}[k + 1] )

assume A4: S_{1}[k]
; :: thesis: S_{1}[k + 1]

_{1}[k + 1]
; :: thesis: verum

end;assume A4: S

now :: thesis: for t being 0 -started State of SCMPDS

for Q being Instruction-Sequence of SCMPDS st f . t <= k + 1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

hence
Sfor Q being Instruction-Sequence of SCMPDS st f . t <= k + 1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

let t be 0 -started State of SCMPDS; :: thesis: for Q being Instruction-Sequence of SCMPDS st f . t <= k + 1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on b_{2},b_{3} & while<0 (a,i,I) is_halting_on b_{2},b_{3} )

let Q be Instruction-Sequence of SCMPDS; :: thesis: ( f . t <= k + 1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} ) )

A5: Initialize t = t by MEMSTR_0:44;

assume A6: f . t <= k + 1 ; :: thesis: ( ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} ) )

assume A7: for x being Int_position st x in X holds

t . x = s . x ; :: thesis: ( t . a = s . a implies ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} ) )

assume A8: t . a = s . a ; :: thesis: ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} )

end;t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on b

let Q be Instruction-Sequence of SCMPDS; :: thesis: ( f . t <= k + 1 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on b

A5: Initialize t = t by MEMSTR_0:44;

assume A6: f . t <= k + 1 ; :: thesis: ( ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on b

assume A7: for x being Int_position st x in X holds

t . x = s . x ; :: thesis: ( t . a = s . a implies ( while<0 (a,i,I) is_closed_on b

assume A8: t . a = s . a ; :: thesis: ( while<0 (a,i,I) is_closed_on b

per cases
( t . (DataLoc ((s . a),i)) >= 0 or t . (DataLoc ((s . a),i)) < 0 )
;

end;

suppose
t . (DataLoc ((s . a),i)) >= 0
; :: thesis: ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} )

hence
( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )
by A8, Th7; :: thesis: verum

end;suppose A9:
t . (DataLoc ((s . a),i)) < 0
; :: thesis: ( while<0 (a,i,I) is_closed_on b_{1},b_{2} & while<0 (a,i,I) is_halting_on b_{1},b_{2} )

A10:
0 in dom (stop (while<0 (a,i,I)))
by COMPOS_1:36;

A11: while<0 (a,i,I) = ((a,i) >=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:15;

A12: f . (Initialize (IExec (I,Q,t))) < f . t by A2, A7, A8, A9;

set t2 = t;

set Q2 = Q +* (stop I);

set t3 = t;

set Q3 = Q +* (stop (while<0 (a,i,I)));

set t4 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,1);

set Q4 = Q +* (stop (while<0 (a,i,I)));

A13: stop I c= Q +* (stop I) by FUNCT_4:25;

A14: Comput ((Q +* (stop (while<0 (a,i,I)))),t,(0 + 1)) = Following ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,0))) by EXTPRO_1:3

.= Following ((Q +* (stop (while<0 (a,i,I)))),t)

.= Exec (((a,i) >=0_goto ((card I) + 2)),t) by A11, A5, SCMPDS_6:11 ;

for a being Int_position holds t . a = (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) . a by A14, SCMPDS_2:57;

then A15: DataPart t = DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) by SCMPDS_4:8;

A16: while<0 (a,i,I) c= stop (while<0 (a,i,I)) by AFINSQ_1:74;

stop (while<0 (a,i,I)) c= Q +* (stop (while<0 (a,i,I))) by FUNCT_4:25;

then A17: while<0 (a,i,I) c= Q +* (stop (while<0 (a,i,I))) by A16, XBOOLE_1:1;

Shift (I,1) c= while<0 (a,i,I) by Lm2;

then A18: Shift (I,1) c= Q +* (stop (while<0 (a,i,I))) by A17, XBOOLE_1:1;

set m2 = LifeSpan ((Q +* (stop I)),t);

set t5 = Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)));

set Q5 = Q +* (stop (while<0 (a,i,I)));

set l1 = (card I) + 1;

A19: IC t = 0 by MEMSTR_0:def 11;

set m3 = (LifeSpan ((Q +* (stop I)),t)) + 1;

set t6 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1));

set Q6 = Q +* (stop (while<0 (a,i,I)));

set t7 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1));

set Q7 = Q +* (stop (while<0 (a,i,I)));

(card I) + 1 < (card I) + 2 by XREAL_1:6;

then A20: (card I) + 1 in dom (while<0 (a,i,I)) by Th5;

A21: I is_closed_on t,Q by A2, A7, A8, A9;

A22: I is_closed_on t,Q +* (stop I) by A2, A7, A8, A9;

I is_halting_on t,Q by A2, A7, A8, A9;

then A23: Q +* (stop I) halts_on t by A5, SCMPDS_6:def 3;

(Q +* (stop I)) +* (stop I) halts_on t by A23;

then A24: I is_halting_on t,Q +* (stop I) by A5, SCMPDS_6:def 3;

A25: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) = (IC t) + 1 by A9, A14, A8, SCMPDS_2:57

.= 0 + 1 by A19 ;

then A26: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) = (card I) + 1 by A13, A24, A22, A15, A18, SCMPDS_7:18;

A27: (Q +* (stop (while<0 (a,i,I)))) /. (IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) = (Q +* (stop (while<0 (a,i,I)))) . (IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by PBOOLE:143;

A28: Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)) = Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t))) by EXTPRO_1:4;

then A29: CurInstr ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) = (Q +* (stop (while<0 (a,i,I)))) . ((card I) + 1) by A13, A24, A22, A25, A15, A18, A27, SCMPDS_7:18

.= (while<0 (a,i,I)) . ((card I) + 1) by A20, A17, GRFUNC_1:2

.= goto (- ((card I) + 1)) by Th6 ;

A30: DataPart (Comput ((Q +* (stop I)),t,(LifeSpan ((Q +* (stop I)),t)))) = DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) by A13, A24, A22, A25, A15, A18, SCMPDS_7:18;

then A31: DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) = DataPart (Result ((Q +* (stop I)),t)) by A23, EXTPRO_1:23

.= DataPart (IExec (I,Q,t)) by SCMPDS_4:def 5 ;

A32: Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) = Following ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by EXTPRO_1:3

.= Exec ((goto (- ((card I) + 1))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by A29 ;

then IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = ICplusConst ((Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))),(0 - ((card I) + 1))) by SCMPDS_2:54

.= 0 by A26, A28, SCMPDS_7:1 ;

then A33: Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) by MEMSTR_0:46;

A34: IExec (I,Q,t) = Result ((Q +* (stop I)),t) by SCMPDS_4:def 5;

then InsCode (goto (- ((card I) + 1))) in {0,4,5,6,14} by ENUMSET1:def 3;

then A37: Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))) by A32, Th2

.= Initialize (IExec (I,Q,t)) by A31, A28, MEMSTR_0:80 ;

.= (Result ((Q +* (stop I)),t)) . a by A23, EXTPRO_1:23

.= s . a by A8, A2, A7, A9, A34 ;

A41: (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . a = (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))) . a by A32, SCMPDS_2:54

.= s . a by A40, EXTPRO_1:4 ;

then A42: while<0 (a,i,I) is_closed_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)),Q +* (stop (while<0 (a,i,I))) by A4, A35, A38, A33;

A50: Q +* (stop (while<0 (a,i,I))) = (Q +* (stop (while<0 (a,i,I)))) +* (stop (while<0 (a,i,I))) ;

while<0 (a,i,I) is_halting_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)),Q +* (stop (while<0 (a,i,I))) by A4, A41, A35, A38, A33;

then Q +* (stop (while<0 (a,i,I))) halts_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) by A33, A50, SCMPDS_6:def 3;

then Q +* (stop (while<0 (a,i,I))) halts_on t by EXTPRO_1:22;

hence while<0 (a,i,I) is_halting_on t,Q by A5, SCMPDS_6:def 3; :: thesis: verum

end;A11: while<0 (a,i,I) = ((a,i) >=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:15;

A12: f . (Initialize (IExec (I,Q,t))) < f . t by A2, A7, A8, A9;

set t2 = t;

set Q2 = Q +* (stop I);

set t3 = t;

set Q3 = Q +* (stop (while<0 (a,i,I)));

set t4 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,1);

set Q4 = Q +* (stop (while<0 (a,i,I)));

A13: stop I c= Q +* (stop I) by FUNCT_4:25;

A14: Comput ((Q +* (stop (while<0 (a,i,I)))),t,(0 + 1)) = Following ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,0))) by EXTPRO_1:3

.= Following ((Q +* (stop (while<0 (a,i,I)))),t)

.= Exec (((a,i) >=0_goto ((card I) + 2)),t) by A11, A5, SCMPDS_6:11 ;

for a being Int_position holds t . a = (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) . a by A14, SCMPDS_2:57;

then A15: DataPart t = DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) by SCMPDS_4:8;

A16: while<0 (a,i,I) c= stop (while<0 (a,i,I)) by AFINSQ_1:74;

stop (while<0 (a,i,I)) c= Q +* (stop (while<0 (a,i,I))) by FUNCT_4:25;

then A17: while<0 (a,i,I) c= Q +* (stop (while<0 (a,i,I))) by A16, XBOOLE_1:1;

Shift (I,1) c= while<0 (a,i,I) by Lm2;

then A18: Shift (I,1) c= Q +* (stop (while<0 (a,i,I))) by A17, XBOOLE_1:1;

set m2 = LifeSpan ((Q +* (stop I)),t);

set t5 = Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)));

set Q5 = Q +* (stop (while<0 (a,i,I)));

set l1 = (card I) + 1;

A19: IC t = 0 by MEMSTR_0:def 11;

set m3 = (LifeSpan ((Q +* (stop I)),t)) + 1;

set t6 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1));

set Q6 = Q +* (stop (while<0 (a,i,I)));

set t7 = Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1));

set Q7 = Q +* (stop (while<0 (a,i,I)));

(card I) + 1 < (card I) + 2 by XREAL_1:6;

then A20: (card I) + 1 in dom (while<0 (a,i,I)) by Th5;

A21: I is_closed_on t,Q by A2, A7, A8, A9;

A22: I is_closed_on t,Q +* (stop I) by A2, A7, A8, A9;

I is_halting_on t,Q by A2, A7, A8, A9;

then A23: Q +* (stop I) halts_on t by A5, SCMPDS_6:def 3;

(Q +* (stop I)) +* (stop I) halts_on t by A23;

then A24: I is_halting_on t,Q +* (stop I) by A5, SCMPDS_6:def 3;

A25: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)) = (IC t) + 1 by A9, A14, A8, SCMPDS_2:57

.= 0 + 1 by A19 ;

then A26: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) = (card I) + 1 by A13, A24, A22, A15, A18, SCMPDS_7:18;

A27: (Q +* (stop (while<0 (a,i,I)))) /. (IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) = (Q +* (stop (while<0 (a,i,I)))) . (IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by PBOOLE:143;

A28: Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)) = Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t))) by EXTPRO_1:4;

then A29: CurInstr ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) = (Q +* (stop (while<0 (a,i,I)))) . ((card I) + 1) by A13, A24, A22, A25, A15, A18, A27, SCMPDS_7:18

.= (while<0 (a,i,I)) . ((card I) + 1) by A20, A17, GRFUNC_1:2

.= goto (- ((card I) + 1)) by Th6 ;

A30: DataPart (Comput ((Q +* (stop I)),t,(LifeSpan ((Q +* (stop I)),t)))) = DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) by A13, A24, A22, A25, A15, A18, SCMPDS_7:18;

then A31: DataPart (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) = DataPart (Result ((Q +* (stop I)),t)) by A23, EXTPRO_1:23

.= DataPart (IExec (I,Q,t)) by SCMPDS_4:def 5 ;

A32: Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) = Following ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by EXTPRO_1:3

.= Exec ((goto (- ((card I) + 1))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1)))) by A29 ;

then IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = ICplusConst ((Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))),(0 - ((card I) + 1))) by SCMPDS_2:54

.= 0 by A26, A28, SCMPDS_7:1 ;

then A33: Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) by MEMSTR_0:46;

A34: IExec (I,Q,t) = Result ((Q +* (stop I)),t) by SCMPDS_4:def 5;

A35: now :: thesis: for x being Int_position st x in X holds

(Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x

InsCode (goto (- ((card I) + 1))) = 14
by SCMPDS_2:12;(Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x

let x be Int_position; :: thesis: ( x in X implies (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x )

assume A36: x in X ; :: thesis: (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x

(Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) . x = (Comput ((Q +* (stop I)),t,(LifeSpan ((Q +* (stop I)),t)))) . x by A30, SCMPDS_4:8

.= (Result ((Q +* (stop I)),t)) . x by A23, EXTPRO_1:23

.= (IExec (I,Q,t)) . x by SCMPDS_4:def 5

.= t . x by A2, A7, A8, A9, A36

.= s . x by A7, A36 ;

hence (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x by A28, A32, SCMPDS_2:54; :: thesis: verum

end;assume A36: x in X ; :: thesis: (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x

(Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) . x = (Comput ((Q +* (stop I)),t,(LifeSpan ((Q +* (stop I)),t)))) . x by A30, SCMPDS_4:8

.= (Result ((Q +* (stop I)),t)) . x by A23, EXTPRO_1:23

.= (IExec (I,Q,t)) . x by SCMPDS_4:def 5

.= t . x by A2, A7, A8, A9, A36

.= s . x by A7, A36 ;

hence (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . x = s . x by A28, A32, SCMPDS_2:54; :: thesis: verum

then InsCode (goto (- ((card I) + 1))) in {0,4,5,6,14} by ENUMSET1:def 3;

then A37: Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) = Initialize (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))) by A32, Th2

.= Initialize (IExec (I,Q,t)) by A31, A28, MEMSTR_0:80 ;

A38: now :: thesis: not f . (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) > k

A40: (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),(LifeSpan ((Q +* (stop I)),t)))) . a =
(Comput ((Q +* (stop I)),t,(LifeSpan ((Q +* (stop I)),t)))) . a
by A30, SCMPDS_4:8
assume A39:
f . (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) > k
; :: thesis: contradiction

f . (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) < k + 1 by A6, A12, A37, A33, XXREAL_0:2;

hence contradiction by A39, INT_1:7; :: thesis: verum

end;f . (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) < k + 1 by A6, A12, A37, A33, XXREAL_0:2;

hence contradiction by A39, INT_1:7; :: thesis: verum

.= (Result ((Q +* (stop I)),t)) . a by A23, EXTPRO_1:23

.= s . a by A8, A2, A7, A9, A34 ;

A41: (Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))) . a = (Comput ((Q +* (stop (while<0 (a,i,I)))),t,((LifeSpan ((Q +* (stop I)),t)) + 1))) . a by A32, SCMPDS_2:54

.= s . a by A40, EXTPRO_1:4 ;

then A42: while<0 (a,i,I) is_closed_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)),Q +* (stop (while<0 (a,i,I))) by A4, A35, A38, A33;

now :: thesis: for k being Nat holds IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))

hence
while<0 (a,i,I) is_closed_on t,Q
by A5, SCMPDS_6:def 2; :: thesis: while<0 (a,i,I) is_halting_on t,Qlet k be Nat; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,b_{1})) in dom (stop (while<0 (a,i,I)))

end;per cases
( k < ((LifeSpan ((Q +* (stop I)),t)) + 1) + 1 or k >= ((LifeSpan ((Q +* (stop I)),t)) + 1) + 1 )
;

end;

suppose
k < ((LifeSpan ((Q +* (stop I)),t)) + 1) + 1
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,b_{1})) in dom (stop (while<0 (a,i,I)))

then A43:
k <= (LifeSpan ((Q +* (stop I)),t)) + 1
by INT_1:7;

end;hereby :: thesis: verum
end;

per cases
( k <= LifeSpan ((Q +* (stop I)),t) or k = (LifeSpan ((Q +* (stop I)),t)) + 1 )
by A43, NAT_1:8;

end;

suppose A44:
k <= LifeSpan ((Q +* (stop I)),t)
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))

end;

hereby :: thesis: verum
end;

per cases
( k = 0 or k <> 0 )
;

end;

suppose
k = 0
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))

hence
IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))
by A10, A19; :: thesis: verum

end;suppose
k <> 0
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))

then consider kn being Nat such that

A45: k = kn + 1 by NAT_1:6;

reconsider kn = kn as Nat ;

reconsider lm = IC (Comput ((Q +* (stop I)),t,kn)) as Element of NAT ;

kn < k by A45, XREAL_1:29;

then kn < LifeSpan ((Q +* (stop I)),t) by A44, XXREAL_0:2;

then (IC (Comput ((Q +* (stop I)),t,kn))) + 1 = IC (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),kn)) by A13, A24, A22, A25, A15, A18, SCMPDS_7:16;

then A46: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) = lm + 1 by A45, EXTPRO_1:4;

IC (Comput ((Q +* (stop I)),t,kn)) in dom (stop I) by A21, A5, SCMPDS_6:def 2;

then lm < card (stop I) by AFINSQ_1:66;

then lm < (card I) + 1 by COMPOS_1:55;

then A47: lm + 1 <= (card I) + 1 by INT_1:7;

(card I) + 1 < (card I) + 3 by XREAL_1:6;

then lm + 1 < (card I) + 3 by A47, XXREAL_0:2;

then lm + 1 < card (stop (while<0 (a,i,I))) by Lm1;

hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A46, AFINSQ_1:66; :: thesis: verum

end;A45: k = kn + 1 by NAT_1:6;

reconsider kn = kn as Nat ;

reconsider lm = IC (Comput ((Q +* (stop I)),t,kn)) as Element of NAT ;

kn < k by A45, XREAL_1:29;

then kn < LifeSpan ((Q +* (stop I)),t) by A44, XXREAL_0:2;

then (IC (Comput ((Q +* (stop I)),t,kn))) + 1 = IC (Comput ((Q +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,1)),kn)) by A13, A24, A22, A25, A15, A18, SCMPDS_7:16;

then A46: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) = lm + 1 by A45, EXTPRO_1:4;

IC (Comput ((Q +* (stop I)),t,kn)) in dom (stop I) by A21, A5, SCMPDS_6:def 2;

then lm < card (stop I) by AFINSQ_1:66;

then lm < (card I) + 1 by COMPOS_1:55;

then A47: lm + 1 <= (card I) + 1 by INT_1:7;

(card I) + 1 < (card I) + 3 by XREAL_1:6;

then lm + 1 < (card I) + 3 by A47, XXREAL_0:2;

then lm + 1 < card (stop (while<0 (a,i,I))) by Lm1;

hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A46, AFINSQ_1:66; :: thesis: verum

suppose A48:
k = (LifeSpan ((Q +* (stop I)),t)) + 1
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I)))

(card I) + 1 in dom (stop (while<0 (a,i,I)))
by A20, COMPOS_1:62;

hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A13, A24, A22, A25, A15, A18, A28, A48, SCMPDS_7:18; :: thesis: verum

end;hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A13, A24, A22, A25, A15, A18, A28, A48, SCMPDS_7:18; :: thesis: verum

suppose
k >= ((LifeSpan ((Q +* (stop I)),t)) + 1) + 1
; :: thesis: IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,b_{1})) in dom (stop (while<0 (a,i,I)))

then consider nn being Nat such that

A49: k = (((LifeSpan ((Q +* (stop I)),t)) + 1) + 1) + nn by NAT_1:10;

reconsider nn = nn as Nat ;

Comput ((Q +* (stop (while<0 (a,i,I)))),t,k) = Comput (((Q +* (stop (while<0 (a,i,I)))) +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))),nn) by A49, EXTPRO_1:4;

hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A42, A33, SCMPDS_6:def 2; :: thesis: verum

end;A49: k = (((LifeSpan ((Q +* (stop I)),t)) + 1) + 1) + nn by NAT_1:10;

reconsider nn = nn as Nat ;

Comput ((Q +* (stop (while<0 (a,i,I)))),t,k) = Comput (((Q +* (stop (while<0 (a,i,I)))) +* (stop (while<0 (a,i,I)))),(Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1))),nn) by A49, EXTPRO_1:4;

hence IC (Comput ((Q +* (stop (while<0 (a,i,I)))),t,k)) in dom (stop (while<0 (a,i,I))) by A42, A33, SCMPDS_6:def 2; :: thesis: verum

A50: Q +* (stop (while<0 (a,i,I))) = (Q +* (stop (while<0 (a,i,I)))) +* (stop (while<0 (a,i,I))) ;

while<0 (a,i,I) is_halting_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)),Q +* (stop (while<0 (a,i,I))) by A4, A41, A35, A38, A33;

then Q +* (stop (while<0 (a,i,I))) halts_on Comput ((Q +* (stop (while<0 (a,i,I)))),t,(((LifeSpan ((Q +* (stop I)),t)) + 1) + 1)) by A33, A50, SCMPDS_6:def 3;

then Q +* (stop (while<0 (a,i,I))) halts_on t by EXTPRO_1:22;

hence while<0 (a,i,I) is_halting_on t,Q by A5, SCMPDS_6:def 3; :: thesis: verum

A51: S

proof

for k being Nat holds S
let t be 0 -started State of SCMPDS; :: thesis: for Q being Instruction-Sequence of SCMPDS st f . t <= 0 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

let Q be Instruction-Sequence of SCMPDS; :: thesis: ( f . t <= 0 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

assume f . t <= 0 ; :: thesis: ( ex x being Int_position st

( x in X & not t . x = s . x ) or not t . a = s . a or ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

then f . t = 0 ;

then A52: t . (DataLoc ((s . a),i)) >= 0 by A1;

assume for x being Int_position st x in X holds

t . x = s . x ; :: thesis: ( not t . a = s . a or ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

assume t . a = s . a ; :: thesis: ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

hence ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) by A52, Th7; :: thesis: verum

end;t . x = s . x ) & t . a = s . a holds

( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

let Q be Instruction-Sequence of SCMPDS; :: thesis: ( f . t <= 0 & ( for x being Int_position st x in X holds

t . x = s . x ) & t . a = s . a implies ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

assume f . t <= 0 ; :: thesis: ( ex x being Int_position st

( x in X & not t . x = s . x ) or not t . a = s . a or ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

then f . t = 0 ;

then A52: t . (DataLoc ((s . a),i)) >= 0 by A1;

assume for x being Int_position st x in X holds

t . x = s . x ; :: thesis: ( not t . a = s . a or ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) )

assume t . a = s . a ; :: thesis: ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q )

hence ( while<0 (a,i,I) is_closed_on t,Q & while<0 (a,i,I) is_halting_on t,Q ) by A52, Th7; :: thesis: verum

then A53: S

for x being Int_position st x in X holds

s . x = s . x ;

hence ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) by A53; :: thesis: verum