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
for n being Element of NAT st s . (DataLoc ((s . a),i)) >= 0 holds
IExec ((for-up (a,i,n,I)),P,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
for n being Element of NAT st s . (DataLoc ((s . a),i)) >= 0 holds
IExec ((for-up (a,i,n,I)),P,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
for n being Element of NAT st s . (DataLoc ((s . a),i)) >= 0 holds
IExec ((for-up (a,i,n,I)),P,s) = s +* (Start-At (((card I) + 3),SCMPDS))

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

let i be Integer; :: thesis: for n being Element of NAT st s . (DataLoc ((s . a),i)) >= 0 holds
IExec ((for-up (a,i,n,I)),P,s) = s +* (Start-At (((card I) + 3),SCMPDS))

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