let s be State of ; :: thesis: for I being Program of
for a being Int_position
for i being Integer st s . (DataLoc (s . a),i) <= 0 holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let I be Program of ; :: thesis: for a being Int_position
for i being Integer st s . (DataLoc (s . a),i) <= 0 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 being Integer st s . (DataLoc (s . a),i) <= 0 holds
( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )

let i be Integer; :: thesis: ( s . (DataLoc (s . a),i) <= 0 implies ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s ) )
set d1 = DataLoc (s . a),i;
assume A1: s . (DataLoc (s . a),i) <= 0 ; :: thesis: ( while>0 a,i,I is_closed_on s & while>0 a,i,I is_halting_on s )
set i1 = a,i <=0_goto ((card I) + 2);
set i2 = goto (- ((card I) + 1));
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 s3 = s +* (Initialized (stop (while>0 a,i,I)));
set s4 = Computation (s +* (Initialized (stop (while>0 a,i,I)))),1;
A2: IC (s +* (Initialized (stop (while>0 a,i,I)))) = inspos 0 by SCMPDS_6:21;
A3: not DataLoc (s . a),i in dom (Initialized (stop (while>0 a,i,I))) by SCMPDS_4:31;
not a in dom (Initialized (stop (while>0 a,i,I))) by SCMPDS_4:31;
then A4: (s +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc ((s +* (Initialized (stop (while>0 a,i,I)))) . a),i) = (s +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc (s . a),i) by FUNCT_4:12
.= s . (DataLoc (s . a),i) by A3, FUNCT_4:12 ;
A5: while>0 a,i,I = (a,i <=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:51;
Computation (s +* (Initialized (stop (while>0 a,i,I)))),(0 + 1) = Following (Computation (s +* (Initialized (stop (while>0 a,i,I)))),0 ) by AMI_1:14
.= Following (s +* (Initialized (stop (while>0 a,i,I)))) by AMI_1:13
.= Exec (a,i <=0_goto ((card I) + 2)),(s +* (Initialized (stop (while>0 a,i,I)))) by A5, SCMPDS_6:22 ;
then A6: IC (Computation (s +* (Initialized (stop (while>0 a,i,I)))),1) = ICplusConst (s +* (Initialized (stop (while>0 a,i,I)))),((card I) + 2) by A1, A4, SCMPDS_2:68
.= inspos (0 + ((card I) + 2)) by A2, SCMPDS_6:23 ;
A7: card (while>0 a,i,I) = (card I) + 2 by Th17;
then A8: inspos ((card I) + 2) in dom (stop (while>0 a,i,I)) by SCMPDS_6:25;
Initialized (stop (while>0 a,i,I)) c= s +* (Initialized (stop (while>0 a,i,I))) by FUNCT_4:26;
then stop (while>0 a,i,I) c= Computation (s +* (Initialized (stop (while>0 a,i,I)))),1 by AMI_1:81, SCMPDS_4:57;
then (Computation (s +* (Initialized (stop (while>0 a,i,I)))),1) . (inspos ((card I) + 2)) = (stop (while>0 a,i,I)) . (inspos ((card I) + 2)) by A8, GRFUNC_1:8
.= halt SCMPDS by A7, SCMPDS_6:25 ;
then A9: CurInstr (Computation (s +* (Initialized (stop (while>0 a,i,I)))),1) = halt SCMPDS by A6;
now
let k be Element of NAT ; :: thesis: IC (Computation (s +* (Initialized (stop (while>0 a,i,I)))),b1) in dom (stop (while>0 a,i,I))
per cases ( 0 < k or k = 0 ) ;
suppose 0 < k ; :: thesis: IC (Computation (s +* (Initialized (stop (while>0 a,i,I)))),b1) in dom (stop (while>0 a,i,I))
then 1 + 0 <= k by INT_1:20;
hence IC (Computation (s +* (Initialized (stop (while>0 a,i,I)))),k) in dom (stop (while>0 a,i,I)) by A8, A6, A9, AMI_1:52; :: thesis: verum
end;
end;
end;
hence while>0 a,i,I is_closed_on s by SCMPDS_6:def 2; :: thesis: while>0 a,i,I is_halting_on s
ProgramPart (s +* (Initialized (stop (while>0 a,i,I)))) halts_on s +* (Initialized (stop (while>0 a,i,I))) by A9, AMI_1:146;
hence while>0 a,i,I is_halting_on s by SCMPDS_6:def 3; :: thesis: verum