let s be State of SCMPDS ; :: thesis: for I being shiftable No-StopCode Program of SCMPDS
for a being Int_position
for i, c being Integer
for X, Y being set
for f being Function of (product the Object-Kind of SCMPDS ),NAT st card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let I be shiftable No-StopCode Program of SCMPDS ; :: thesis: for a being Int_position
for i, c being Integer
for X, Y being set
for f being Function of (product the Object-Kind of SCMPDS ),NAT st card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let a be Int_position ; :: thesis: for i, c being Integer
for X, Y being set
for f being Function of (product the Object-Kind of SCMPDS ),NAT st card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let i, c be Integer; :: thesis: for X, Y being set
for f being Function of (product the Object-Kind of SCMPDS ),NAT st card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let X, Y be set ; :: thesis: for f being Function of (product the Object-Kind of SCMPDS ),NAT st card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let f be Function of (product the Object-Kind of SCMPDS ),NAT ; :: thesis: ( card I > 0 & ( for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ) & ( for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ) & ( for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) implies ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) )

set b = DataLoc (s . a),i;
set WHL = while>0 a,i,I;
set pWHL = stop (while>0 a,i,I);
set iWHL = Initialized (stop (while>0 a,i,I));
set pI = stop I;
set IsI = Initialized (stop I);
set i1 = a,i <=0_goto ((card I) + 2);
set i2 = goto (- ((card I) + 1));
assume A1: card I > 0 ; :: thesis: ( ex t being State of SCMPDS st
( f . (Dstate t) = 0 & not t . (DataLoc (s . a),i) <= 0 ) or ex x being Int_position st
( x in X & not s . x >= c + (s . (DataLoc (s . a),i)) ) or ex t being State of SCMPDS st
( ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 & not ( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) or ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) )

assume A2: for t being State of SCMPDS st f . (Dstate t) = 0 holds
t . (DataLoc (s . a),i) <= 0 ; :: thesis: ( ex x being Int_position st
( x in X & not s . x >= c + (s . (DataLoc (s . a),i)) ) or ex t being State of SCMPDS st
( ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 & not ( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) or ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) )

assume A3: for x being Int_position st x in X holds
s . x >= c + (s . (DataLoc (s . a),i)) ; :: thesis: ( ex t being State of SCMPDS st
( ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 & not ( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ) or ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) )

assume A4: for t being State of SCMPDS st ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a & t . (DataLoc (s . a),i) > 0 holds
( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) ; :: thesis: ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )
defpred S1[ Element of NAT ] means for t being State of SCMPDS st f . (Dstate t) <= $1 & ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a holds
( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t );
A5: S1[ 0 ]
proof
let t be State of SCMPDS ; :: thesis: ( f . (Dstate t) <= 0 & ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a implies ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t ) )

assume A6: f . (Dstate t) <= 0 ; :: thesis: ( ex x being Int_position st
( x in X & not t . x >= c + (t . (DataLoc (s . a),i)) ) or ex x being Int_position st
( x in Y & not t . x = s . x ) or not t . a = s . a or ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t ) )

assume for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ; :: thesis: ( ex x being Int_position st
( x in Y & not t . x = s . x ) or not t . a = s . a or ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t ) )

assume for x being Int_position st x in Y holds
t . x = s . x ; :: thesis: ( not t . a = s . a or ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t ) )
assume A7: t . a = s . a ; :: thesis: ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t )
f . (Dstate t) = 0 by A6;
then t . (DataLoc (s . a),i) <= 0 by A2;
hence ( while>0 a,i,I is_closed_on t & while>0 a,i,I is_halting_on t ) by A7, Th20; :: thesis: verum
end;
A8: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; :: thesis: ( S1[k] implies S1[k + 1] )
assume A9: S1[k] ; :: thesis: S1[k + 1]
now
let t be State of SCMPDS ; :: thesis: ( f . (Dstate t) <= k + 1 & ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a implies ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 ) )

assume A10: f . (Dstate t) <= k + 1 ; :: thesis: ( ( for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a implies ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 ) )

assume A11: for x being Int_position st x in X holds
t . x >= c + (t . (DataLoc (s . a),i)) ; :: thesis: ( ( for x being Int_position st x in Y holds
t . x = s . x ) & t . a = s . a implies ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 ) )

assume A12: for x being Int_position st x in Y holds
t . x = s . x ; :: thesis: ( t . a = s . a implies ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 ) )
assume A13: t . a = s . a ; :: thesis: ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 )
per cases ( t . (DataLoc (s . a),i) <= 0 or t . (DataLoc (s . a),i) > 0 ) ;
suppose A14: t . (DataLoc (s . a),i) > 0 ; :: thesis: ( while>0 a,i,I is_closed_on b1 & while>0 a,i,I is_halting_on b1 )
set t2 = t +* (Initialized (stop I));
set t3 = t +* (Initialized (stop (while>0 a,i,I)));
set t4 = Computation (t +* (Initialized (stop (while>0 a,i,I)))),1;
A15: ( (IExec I,t) . a = t . a & I is_closed_on t & I is_halting_on t & f . (Dstate (IExec I,t)) < f . (Dstate t) & ( for x being Int_position st x in X holds
(IExec I,t) . x >= c + ((IExec I,t) . (DataLoc (s . a),i)) ) & ( for x being Int_position st x in Y holds
(IExec I,t) . x = t . x ) ) by A4, A11, A12, A13, A14;
A16: Initialized (stop I) c= t +* (Initialized (stop I)) by FUNCT_4:26;
A17: t +* (Initialized (stop I)) is halting by A15, SCMPDS_6:def 3;
then (t +* (Initialized (stop I))) +* (Initialized (stop I)) is halting by A16, FUNCT_4:79;
then A18: I is_halting_on t +* (Initialized (stop I)) by SCMPDS_6:def 3;
A19: I is_closed_on t +* (Initialized (stop I)) by A15, SCMPDS_6:38;
A20: inspos 0 in dom (stop (while>0 a,i,I)) by SCMPDS_4:75;
A21: IC (t +* (Initialized (stop (while>0 a,i,I)))) = inspos 0 by SCMPDS_6:21;
A22: while>0 a,i,I = (a,i <=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:51;
A23: Computation (t +* (Initialized (stop (while>0 a,i,I)))),(0 + 1) = Following (Computation (t +* (Initialized (stop (while>0 a,i,I)))),0 ) by AMI_1:14
.= Following (t +* (Initialized (stop (while>0 a,i,I)))) by AMI_1:13
.= Exec (a,i <=0_goto ((card I) + 2)),(t +* (Initialized (stop (while>0 a,i,I)))) by A22, SCMPDS_6:22 ;
A24: ( not a in dom (Initialized (stop (while>0 a,i,I))) & a in dom t ) by SCMPDS_2:49, SCMPDS_4:31;
A25: ( not DataLoc (s . a),i in dom (Initialized (stop (while>0 a,i,I))) & DataLoc (s . a),i in dom t ) by SCMPDS_2:49, SCMPDS_4:31;
(t +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc ((t +* (Initialized (stop (while>0 a,i,I)))) . a),i) = (t +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc (s . a),i) by A13, A24, FUNCT_4:12
.= t . (DataLoc (s . a),i) by A25, FUNCT_4:12 ;
then A26: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1) = Next (IC (t +* (Initialized (stop (while>0 a,i,I))))) by A14, A23, SCMPDS_2:68
.= inspos (0 + 1) by A21 ;
A27: DataPart (t +* (Initialized (stop I))) = DataPart (t +* (Initialized (stop (while>0 a,i,I)))) by SCMPDS_4:24, SCMPDS_4:36;
now
let a be Int_position ; :: thesis: (t +* (Initialized (stop I))) . a = (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1) . a
thus (t +* (Initialized (stop I))) . a = (t +* (Initialized (stop (while>0 a,i,I)))) . a by A27, SCMPDS_4:23
.= (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1) . a by A23, SCMPDS_2:68 ; :: thesis: verum
end;
then A28: DataPart (t +* (Initialized (stop I))) = DataPart (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1) by SCMPDS_4:23;
set m2 = LifeSpan (t +* (Initialized (stop I)));
set t5 = Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))));
set l1 = inspos ((card I) + 1);
A29: IExec I,t = (Result (t +* (Initialized (stop I)))) +* (t | NAT ) by SCMPDS_4:def 8;
A30: dom (t | NAT ) = NAT by SCMPDS_6:1;
A31: now
assume a in dom (t | NAT ) ; :: thesis: contradiction
then reconsider l = a as Instruction-Location of SCMPDS by A30, AMI_1:def 4;
l = a ;
hence contradiction by SCMPDS_2:53; :: thesis: verum
end;
(card I) + 1 < (card I) + 2 by XREAL_1:8;
then A32: inspos ((card I) + 1) in dom (while>0 a,i,I) by Th18;
A33: while>0 a,i,I c= Initialized (stop (while>0 a,i,I)) by SCMPDS_6:17;
Initialized (stop (while>0 a,i,I)) c= t +* (Initialized (stop (while>0 a,i,I))) by FUNCT_4:26;
then A34: while>0 a,i,I c= t +* (Initialized (stop (while>0 a,i,I))) by A33, XBOOLE_1:1;
Shift I,1 c= while>0 a,i,I by Lm4;
then Shift I,1 c= t +* (Initialized (stop (while>0 a,i,I))) by A34, XBOOLE_1:1;
then A35: Shift I,1 c= Computation (t +* (Initialized (stop (while>0 a,i,I)))),1 by AMI_1:81;
then A36: DataPart (Computation (t +* (Initialized (stop I))),(LifeSpan (t +* (Initialized (stop I))))) = DataPart (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) by A1, A16, A18, A19, A26, A28, SCMPDS_7:36;
then A37: (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) . a = (Computation (t +* (Initialized (stop I))),(LifeSpan (t +* (Initialized (stop I))))) . a by SCMPDS_4:23
.= (Result (t +* (Initialized (stop I)))) . a by A17, AMI_1:122
.= s . a by A13, A15, A29, A31, FUNCT_4:12 ;
A38: dom (t | NAT ) = NAT by SCMPDS_6:1;
A39: DataPart (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) = DataPart (Result (t +* (Initialized (stop I)))) by A17, A36, AMI_1:122
.= DataPart ((Result (t +* (Initialized (stop I)))) +* (t | NAT )) by A38, AMI_2:29, FUNCT_4:76, SCMPDS_2:100
.= DataPart (IExec I,t) by SCMPDS_4:def 8 ;
set m3 = (LifeSpan (t +* (Initialized (stop I)))) + 1;
set t6 = Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1);
A40: IC (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) = inspos ((card I) + 1) by A1, A16, A18, A19, A26, A28, A35, SCMPDS_7:36;
A41: Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1) = Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I)))) by AMI_1:51;
then A42: CurInstr (Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)) = (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) . (inspos ((card I) + 1)) by A1, A16, A18, A19, A26, A28, A35, SCMPDS_7:36
.= (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1) . (inspos ((card I) + 1)) by AMI_1:54
.= (t +* (Initialized (stop (while>0 a,i,I)))) . (inspos ((card I) + 1)) by AMI_1:54
.= (while>0 a,i,I) . (inspos ((card I) + 1)) by A32, A34, GRFUNC_1:8
.= goto (- ((card I) + 1)) by Th19 ;
set t7 = Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1);
A43: Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) = Following (Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)) by AMI_1:14
.= Exec (goto (- ((card I) + 1))),(Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)) by A42 ;
then A44: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) = ICplusConst (Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)),(0 - ((card I) + 1)) by SCMPDS_2:66
.= inspos 0 by A40, A41, SCMPDS_7:1 ;
A45: (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . a = (Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)) . a by A43, SCMPDS_2:66
.= s . a by A37, AMI_1:51 ;
InsCode (goto (- ((card I) + 1))) = 0 by SCMPDS_2:21;
then InsCode (goto (- ((card I) + 1))) in {0 ,4,5,6} by ENUMSET1:def 2;
then A46: Dstate (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) = Dstate (Computation (t +* (Initialized (stop (while>0 a,i,I)))),((LifeSpan (t +* (Initialized (stop I)))) + 1)) by A43, Th3
.= Dstate (IExec I,t) by A39, A41, Th2 ;
A47: (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . (DataLoc (s . a),i) = (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) . (DataLoc (s . a),i) by A41, A43, SCMPDS_2:66
.= (IExec I,t) . (DataLoc (s . a),i) by A39, SCMPDS_3:4 ;
A48: now
let x be Int_position ; :: thesis: ( x in X implies (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x >= c + ((Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . (DataLoc (s . a),i)) )
assume A49: x in X ; :: thesis: (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x >= c + ((Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . (DataLoc (s . a),i))
(Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x = (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) . x by A41, A43, SCMPDS_2:66
.= (IExec I,t) . x by A39, SCMPDS_3:4 ;
hence (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x >= c + ((Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . (DataLoc (s . a),i)) by A4, A11, A12, A13, A14, A47, A49; :: thesis: verum
end;
A50: now
let x be Int_position ; :: thesis: ( x in Y implies (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x = s . x )
assume A51: x in Y ; :: thesis: (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x = s . x
thus (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) . x = (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),(LifeSpan (t +* (Initialized (stop I))))) . x by A41, A43, SCMPDS_2:66
.= (IExec I,t) . x by A39, SCMPDS_3:4
.= t . x by A4, A11, A12, A13, A14, A51
.= s . x by A12, A51 ; :: thesis: verum
end;
now
assume A52: f . (Dstate (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1))) > k ; :: thesis: contradiction
f . (Dstate (IExec I,t)) < f . (Dstate t) by A4, A11, A12, A13, A14;
then f . (Dstate (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1))) < k + 1 by A10, A46, XXREAL_0:2;
hence contradiction by A52, INT_1:20; :: thesis: verum
end;
then A53: ( while>0 a,i,I is_closed_on Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) & while>0 a,i,I is_halting_on Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) ) by A9, A45, A48, A50;
A54: (Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) +* (Initialized (stop (while>0 a,i,I))) = Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) by A44, SCMPDS_7:37;
now
let k be Element of NAT ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),b1) in dom (stop (while>0 a,i,I))
per cases ( k < ((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1 or k >= ((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1 ) ;
suppose k < ((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1 ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),b1) in dom (stop (while>0 a,i,I))
then A55: k <= (LifeSpan (t +* (Initialized (stop I)))) + 1 by INT_1:20;
hereby :: thesis: verum
per cases ( k <= LifeSpan (t +* (Initialized (stop I))) or k = (LifeSpan (t +* (Initialized (stop I)))) + 1 ) by A55, NAT_1:8;
suppose A56: k <= LifeSpan (t +* (Initialized (stop I))) ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I))
hereby :: thesis: verum
per cases ( k = 0 or k <> 0 ) ;
suppose k = 0 ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I))
hence IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I)) by A20, A21, AMI_1:13; :: thesis: verum
end;
suppose k <> 0 ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I))
then consider kn being Nat such that
A57: k = kn + 1 by NAT_1:6;
reconsider kn = kn as Element of NAT by ORDINAL1:def 13;
kn < k by A57, XREAL_1:31;
then kn < LifeSpan (t +* (Initialized (stop I))) by A56, XXREAL_0:2;
then A58: (IC (Computation (t +* (Initialized (stop I))),kn)) + 1 = IC (Computation (Computation (t +* (Initialized (stop (while>0 a,i,I)))),1),kn) by A1, A16, A18, A19, A26, A28, A35, SCMPDS_7:34;
A59: IC (Computation (t +* (Initialized (stop I))),kn) in dom (stop I) by A15, SCMPDS_6:def 2;
reconsider lm = IC (Computation (t +* (Initialized (stop I))),kn) as Element of NAT by ORDINAL1:def 13;
lm < card (stop I) by A59, SCMPDS_4:1;
then lm < (card I) + 1 by SCMPDS_5:7;
then A61: lm + 1 <= (card I) + 1 by INT_1:20;
(card I) + 1 < (card I) + 3 by XREAL_1:8;
then lm + 1 < (card I) + 3 by A61, XXREAL_0:2;
then A62: lm + 1 < card (stop (while>0 a,i,I)) by Lm3;
IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) = inspos (lm + 1) by A57, A58, AMI_1:51;
hence IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I)) by A62, SCMPDS_4:1; :: thesis: verum
end;
end;
end;
end;
suppose A63: k = (LifeSpan (t +* (Initialized (stop I)))) + 1 ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I))
inspos ((card I) + 1) in dom (stop (while>0 a,i,I)) by A32, SCMPDS_6:18;
hence IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I)) by A1, A16, A18, A19, A26, A28, A35, A41, A63, SCMPDS_7:36; :: thesis: verum
end;
end;
end;
end;
suppose k >= ((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1 ; :: thesis: IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),b1) in dom (stop (while>0 a,i,I))
then consider nn being Nat such that
A64: k = (((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) + nn by NAT_1:10;
A65: nn in NAT by ORDINAL1:def 13;
then Computation (t +* (Initialized (stop (while>0 a,i,I)))),k = Computation ((Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1)) +* (Initialized (stop (while>0 a,i,I)))),nn by A54, A64, AMI_1:51;
hence IC (Computation (t +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I)) by A53, A65, SCMPDS_6:def 2; :: thesis: verum
end;
end;
end;
hence while>0 a,i,I is_closed_on t by SCMPDS_6:def 2; :: thesis: while>0 a,i,I is_halting_on t
Computation (t +* (Initialized (stop (while>0 a,i,I)))),(((LifeSpan (t +* (Initialized (stop I)))) + 1) + 1) is halting by A53, A54, SCMPDS_6:def 3;
then t +* (Initialized (stop (while>0 a,i,I))) is halting by AMI_1:93;
hence while>0 a,i,I is_halting_on t by SCMPDS_6:def 3; :: thesis: verum
end;
end;
end;
hence S1[k + 1] ; :: thesis: verum
end;
A66: for k being Element of NAT holds S1[k] from NAT_1:sch 1(A5, A8);
set n = f . (Dstate s);
A67: S1[f . (Dstate s)] by A66;
for x being Int_position st x in Y holds
s . x = s . x ;
hence ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) by A3, A67; :: thesis: verum