let P be Instruction-Sequence of SCMPDS; :: thesis: for s being State of SCMPDS
for I being Program of SCMPDS
for a, c being Int_position
for i being Integer st s . (DataLoc ((s . a),i)) = 0 holds
IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))

let s be State of SCMPDS; :: thesis: for I being Program of SCMPDS
for a, c being Int_position
for i being Integer st s . (DataLoc ((s . a),i)) = 0 holds
IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))

let I be Program of SCMPDS; :: thesis: for a, c being Int_position
for i being Integer st s . (DataLoc ((s . a),i)) = 0 holds
IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))

let a, c be Int_position; :: thesis: for i being Integer st s . (DataLoc ((s . a),i)) = 0 holds
IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))

let i be Integer; :: thesis: ( s . (DataLoc ((s . a),i)) = 0 implies IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS)) )
set b = DataLoc ((s . a),i);
assume A1: s . (DataLoc ((s . a),i)) = 0 ; :: thesis: IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))
set i1 = (a,i) <>0_goto 2;
set i2 = goto ((card I) + 2);
set i3 = goto (- ((card I) + 2));
set WHL = while<>0 (a,i,I);
set pWH = stop (while<>0 (a,i,I));
set iWH = stop (while<>0 (a,i,I));
set s3 = Initialize s;
set P3 = P +* (stop (while<>0 (a,i,I)));
set s4 = Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1);
set s5 = Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2);
set P4 = P +* (stop (while<>0 (a,i,I)));
set P5 = P +* (stop (while<>0 (a,i,I)));
A2: IC (Initialize s) = 0 by MEMSTR_0:47;
A3: stop (while<>0 (a,i,I)) c= P +* (stop (while<>0 (a,i,I))) by FUNCT_4:25;
then A4: stop (while<>0 (a,i,I)) c= P +* (stop (while<>0 (a,i,I))) ;
A5: stop (while<>0 (a,i,I)) c= P +* (stop (while<>0 (a,i,I))) by A3;
A6: not DataLoc ((s . a),i) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
A7: while<>0 (a,i,I) = ((a,i) <>0_goto 2) ';' (((goto ((card I) + 2)) ';' I) ';' (goto (- ((card I) + 2)))) by Lm8;
A8: Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (while<>0 (a,i,I)))),(Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (stop (while<>0 (a,i,I)))),(Initialize s))
.= Exec (((a,i) <>0_goto 2),(Initialize s)) by A7, SCMPDS_6:11 ;
A9: 1 in dom (while<>0 (a,i,I)) by Th10;
then 1 in dom (stop (while<>0 (a,i,I))) by COMPOS_1:62;
then A10: (P +* (stop (while<>0 (a,i,I)))) . 1 = (stop (while<>0 (a,i,I))) . 1 by A4, GRFUNC_1:2
.= (while<>0 (a,i,I)) . 1 by A9, COMPOS_1:63
.= goto ((card I) + 2) by Th11 ;
set SAl = Start-At (((card I) + 3),SCMPDS);
not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
then (Initialize s) . (DataLoc (((Initialize s) . a),i)) = (Initialize s) . (DataLoc ((s . a),i)) by FUNCT_4:11
.= 0 by A1, A6, FUNCT_4:11 ;
then A11: IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1)) = (IC (Initialize s)) + 1 by A8, SCMPDS_2:55
.= 0 + 1 by A2 ;
A12: (P +* (stop (while<>0 (a,i,I)))) /. (IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1))) = (P +* (stop (while<>0 (a,i,I)))) . (IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1))) by PBOOLE:143;
A13: Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (while<>0 (a,i,I)))),(Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1))) by EXTPRO_1:3
.= Exec ((goto ((card I) + 2)),(Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1))) by A11, A10, A12 ;
then A14: IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1)),((card I) + 2)) by SCMPDS_2:54
.= ((card I) + 2) + 1 by A11, SCMPDS_6:12
.= (card I) + (2 + 1) ;
A15: (P +* (stop (while<>0 (a,i,I)))) /. (IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2))) = (P +* (stop (while<>0 (a,i,I)))) . (IC (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2))) by PBOOLE:143;
A16: card (while<>0 (a,i,I)) = (card I) + 3 by Th8;
then (card I) + 3 in dom (stop (while<>0 (a,i,I))) by COMPOS_1:64;
then (P +* (stop (while<>0 (a,i,I)))) . ((card I) + 3) = (stop (while<>0 (a,i,I))) . ((card I) + 3) by A5, GRFUNC_1:2
.= halt SCMPDS by A16, COMPOS_1:64 ;
then A17: CurInstr ((P +* (stop (while<>0 (a,i,I)))),(Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15;
then P +* (stop (while<>0 (a,i,I))) halts_on Initialize s by EXTPRO_1:29;
then A18: Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2) = Result ((P +* (stop (while<>0 (a,i,I)))),(Initialize s)) by A17, EXTPRO_1:def 9;
A19: IExec ((while<>0 (a,i,I)),P,(Initialize s)) = Result ((P +* (stop (while<>0 (a,i,I)))),(Initialize s)) by SCMPDS_4:def 5;
A20: now :: thesis: for x being object st x in dom (IExec ((while<>0 (a,i,I)),P,(Initialize s))) holds
(IExec ((while<>0 (a,i,I)),P,(Initialize s))) . x = (s +* (Start-At (((card I) + 3),SCMPDS))) . x
let x be object ; :: thesis: ( x in dom (IExec ((while<>0 (a,i,I)),P,(Initialize s))) implies (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1 )
A21: dom (Start-At (((card I) + 3),SCMPDS)) = {(IC )} by FUNCOP_1:13;
assume A22: x in dom (IExec ((while<>0 (a,i,I)),P,(Initialize s))) ; :: thesis: (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
per cases ( x is Int_position or x = IC ) by A22, SCMPDS_4:6;
suppose A23: x is Int_position ; :: thesis: (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
then x <> IC by SCMPDS_2:43;
then A24: not x in dom (Start-At (((card I) + 3),SCMPDS)) by A21, TARSKI:def 1;
A25: not x in dom (Start-At (0,SCMPDS)) by A23, SCMPDS_4:18;
thus (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),2)) . x by A18, A19
.= (Comput ((P +* (stop (while<>0 (a,i,I)))),(Initialize s),1)) . x by A13, A23, SCMPDS_2:54
.= (Initialize s) . x by A8, A23, SCMPDS_2:55
.= s . x by A25, FUNCT_4:11
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A24, FUNCT_4:11 ; :: thesis: verum
end;
suppose A26: x = IC ; :: thesis: (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
hence (IExec ((while<>0 (a,i,I)),P,(Initialize s))) . x = (card I) + 3 by A14, A18, A19
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A26, FUNCT_4:113 ;
:: thesis: verum
end;
end;
end;
dom (IExec ((while<>0 (a,i,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom (s +* (Start-At (((card I) + 3),SCMPDS))) by PARTFUN1:def 2 ;
hence IExec ((while<>0 (a,i,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS)) by A20, FUNCT_1:2; :: thesis: verum