let P be the Instructions of SCMPDS -valued ManySortedSet of NAT ; :: 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,s) = s +* (Start-At (((card I) + 2),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,s) = s +* (Start-At (((card I) + 2),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,s) = s +* (Start-At (((card I) + 2),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,s) = s +* (Start-At (((card I) + 2),SCMPDS))

let i be Integer; :: thesis: ( s . (DataLoc ((s . a),i)) <= 0 implies IExec ((while>0 (a,i,I)),P,s) = s +* (Start-At (((card I) + 2),SCMPDS)) )
set d1 = DataLoc ((s . a),i);
set WHL = while>0 (a,i,I);
set pWHL = 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 P4 = P +* (stop (while>0 (a,i,I)));
set i1 = (a,i) <=0_goto ((card I) + 2);
set i2 = goto (- ((card I) + 1));
set SAl = Start-At (((card I) + 2),SCMPDS);
A2: IC (Initialize s) = 0 by COMPOS_1:def 16;
A3: while>0 (a,i,I) = ((a,i) <=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:51;
A4: not DataLoc ((s . a),i) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:59;
not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:59;
then A5: (Initialize s) . (DataLoc (((Initialize s) . a),i)) = (Initialize s) . (DataLoc ((s . a),i)) by FUNCT_4:12
.= s . (DataLoc ((s . a),i)) by A4, FUNCT_4:12 ;
A6: 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:4
.= Following ((P +* (stop (while>0 (a,i,I)))),(Initialize s)) by EXTPRO_1:3
.= Exec (((a,i) <=0_goto ((card I) + 2)),(Initialize s)) by A3, SCMPDS_6:22 ;
A7: stop (while>0 (a,i,I)) c= P +* (stop (while>0 (a,i,I))) by FUNCT_4:26;
A8: IExec ((while>0 (a,i,I)),P,s) = (Result ((P +* (stop (while>0 (a,i,I)))),(Initialize s))) +* (s | NAT) by SCMPDS_4:def 8;
assume s . (DataLoc ((s . a),i)) <= 0 ; :: thesis: IExec ((while>0 (a,i,I)),P,s) = s +* (Start-At (((card I) + 2),SCMPDS))
then A9: IC (Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A6, A5, SCMPDS_2:68
.= 0 + ((card I) + 2) by A2, SCMPDS_6:23 ;
A10: (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:158;
A12: card (while>0 (a,i,I)) = (card I) + 2 by Th17;
then (card I) + 2 in dom (stop (while>0 (a,i,I))) by SCMPDS_6:25;
then (P +* (stop (while>0 (a,i,I)))) . ((card I) + 2) = (stop (while>0 (a,i,I))) . ((card I) + 2) by A7, GRFUNC_1:8
.= halt SCMPDS by A12, SCMPDS_6:25 ;
then A13: CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),1))) = halt SCMPDS by A9, A10;
then A14: P +* (stop (while>0 (a,i,I))) halts_on Initialize s by EXTPRO_1:30;
A15: CurInstr ((P +* (stop (while>0 (a,i,I)))),(Initialize s)) = (a,i) <=0_goto ((card I) + 2) by A3, SCMPDS_6:22;
now
let l be Element of NAT ; :: thesis: ( l < 0 + 1 implies CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),l))) <> halt SCMPDS )
A16: Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:3;
assume l < 0 + 1 ; :: thesis: CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),l))) <> halt SCMPDS
then l = 0 by NAT_1:13;
then CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (while>0 (a,i,I)))),(Initialize s)) by A16;
hence CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),l))) <> halt SCMPDS by A15; :: thesis: verum
end;
then for l being Element of NAT st CurInstr ((P +* (stop (while>0 (a,i,I)))),(Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),l))) = halt SCMPDS holds
1 <= l ;
then LifeSpan ((P +* (stop (while>0 (a,i,I)))),(Initialize s)) = 1 by A13, A14, EXTPRO_1:def 14;
then A17: Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),1) = Result ((P +* (stop (while>0 (a,i,I)))),(Initialize s)) by A14, EXTPRO_1:23;
A18: dom (ProgramPart s) = NAT by COMPOS_1:34;
A19: now
let x be set ; :: thesis: ( x in dom (IExec ((while>0 (a,i,I)),P,s)) implies (IExec ((while>0 (a,i,I)),P,s)) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 )
A20: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:19;
assume A21: x in dom (IExec ((while>0 (a,i,I)),P,s)) ; :: thesis: (IExec ((while>0 (a,i,I)),P,s)) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1
per cases ( x is Int_position or x = IC or x is Element of NAT ) by A21, SCMPDS_4:20;
suppose A22: x is Int_position ; :: thesis: (IExec ((while>0 (a,i,I)),P,s)) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1
then x <> IC by SCMPDS_2:52;
then A23: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A20, TARSKI:def 1;
TT: not x in dom (Start-At (0,SCMPDS)) by A22, SCMPDS_4:59;
not x in dom (s | NAT) by A18, A22, SCMPDS_2:53;
hence (IExec ((while>0 (a,i,I)),P,s)) . x = (Comput ((P +* (stop (while>0 (a,i,I)))),(Initialize s),1)) . x by A17, A8, FUNCT_4:12
.= (Initialize s) . x by A6, A22, SCMPDS_2:68
.= s . x by TT, FUNCT_4:12
.= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A23, FUNCT_4:12 ;
:: thesis: verum
end;
suppose A24: x = IC ; :: thesis: (IExec ((while>0 (a,i,I)),P,s)) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1
not x in dom (s | NAT) by A18, A24, COMPOS_1:3;
hence (IExec ((while>0 (a,i,I)),P,s)) . x = (card I) + 2 by A9, A17, A8, A24, FUNCT_4:12
.= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A24, FUNCT_4:121 ;
:: thesis: verum
end;
suppose x is Element of NAT ; :: thesis: (IExec ((while>0 (a,i,I)),P,s)) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1
hence (IExec ((while>0 (a,i,I)),P,s)) . x = (s +* (Start-At (((card I) + 2),SCMPDS))) . x by SCMPDS_6:27; :: thesis: verum
end;
end;
end;
dom (IExec ((while>0 (a,i,I)),P,s)) = the carrier of SCMPDS by PARTFUN1:def 4
.= dom (s +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def 4 ;
hence IExec ((while>0 (a,i,I)),P,s) = s +* (Start-At (((card I) + 2),SCMPDS)) by A19, FUNCT_1:9; :: thesis: verum