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

let n be Element of NAT ; :: thesis: ( s . (DataLoc ((s . a),i)) <= 0 implies IExec ((for-down (a,i,n,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS)) )
set d1 = DataLoc ((s . a),i);
set FOR = for-down (a,i,n,I);
set pFOR = stop (for-down (a,i,n,I));
set s3 = Initialize s;
set P3 = P +* (stop (for-down (a,i,n,I)));
set s4 = Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1);
set P4 = P +* (stop (for-down (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 MEMSTR_0:def 8;
A3: not DataLoc ((s . a),i) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
A4: stop (for-down (a,i,n,I)) c= P +* (stop (for-down (a,i,n,I))) by FUNCT_4:25;
not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
then A5: (Initialize s) . (DataLoc (((Initialize s) . a),i)) = (Initialize s) . (DataLoc ((s . a),i)) by FUNCT_4:11
.= s . (DataLoc ((s . a),i)) by A3, FUNCT_4:11 ;
A6: for-down (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-down (a,i,n,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (stop (for-down (a,i,n,I)))),(Initialize s)) by EXTPRO_1:2
.= Exec (((a,i) <=0_goto ((card I) + 3)),(Initialize s)) by A6, SCMPDS_6:11 ;
assume s . (DataLoc ((s . a),i)) <= 0 ; :: thesis: IExec ((for-down (a,i,n,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS))
then A8: IC (Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 3)) by A7, A5, SCMPDS_2:56
.= 0 + ((card I) + 3) by A2, SCMPDS_6:12 ;
A11: card (for-down (a,i,n,I)) = (card I) + 3 by Th60;
then (card I) + 3 in dom (stop (for-down (a,i,n,I))) by COMPOS_1:64;
then (P +* (stop (for-down (a,i,n,I)))) . ((card I) + 3) = (stop (for-down (a,i,n,I))) . ((card I) + 3) by A4, GRFUNC_1:2
.= halt SCMPDS by A11, COMPOS_1:64 ;
then A12: CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1))) = halt SCMPDS by A8, PBOOLE:143;
then A13: P +* (stop (for-down (a,i,n,I))) halts_on Initialize s by EXTPRO_1:29;
A14: CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Initialize s)) = (a,i) <=0_goto ((card I) + 3) by A6, SCMPDS_6:11;
now
let l be Element of NAT ; :: thesis: ( l < 0 + 1 implies CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),l))) <> halt SCMPDS )
assume l < 0 + 1 ; :: thesis: CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),l))) <> halt SCMPDS
then l = 0 by NAT_1:13;
hence CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),l))) <> halt SCMPDS by A14, EXTPRO_1:2; :: thesis: verum
end;
then for l being Element of NAT st CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),l))) = halt SCMPDS holds
1 <= l ;
then B17: LifeSpan ((P +* (stop (for-down (a,i,n,I)))),(Initialize s)) = 1 by A12, A13, EXTPRO_1:def 15;
A19: now
let x be set ; :: thesis: ( x in dom (IExec ((for-down (a,i,n,I)),P,(Initialize s))) implies (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1 )
A20: dom (Start-At (((card I) + 3),SCMPDS)) = {(IC )} by FUNCOP_1:13;
assume A21: x in dom (IExec ((for-down (a,i,n,I)),P,(Initialize s))) ; :: thesis: (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
per cases ( x is Int_position or x = IC ) by A21, SCMPDS_4:6;
suppose A22: x is Int_position ; :: thesis: (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
then x <> IC by SCMPDS_2:43;
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:18;
thus (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1)) . x by B17, A13, EXTPRO_1:23
.= (Initialize s) . x by A7, A22, SCMPDS_2:56
.= s . x by TT, FUNCT_4:11
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A23, FUNCT_4:11 ; :: thesis: verum
end;
suppose A24: x = IC ; :: thesis: (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 3),SCMPDS))) . b1
thus (IExec ((for-down (a,i,n,I)),P,(Initialize s))) . x = (card I) + 3 by A8, B17, A24, A13, EXTPRO_1:23
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A24, FUNCT_4:113 ; :: thesis: verum
end;
end;
end;
dom (IExec ((for-down (a,i,n,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 ((for-down (a,i,n,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 3),SCMPDS)) by A19, FUNCT_1:2; :: thesis: verum