let P be Instruction-Sequence of SCMPDS; :: thesis: for s being State of SCMPDS
for I being Program of
for a, c being Int_position
for i being Integer
for n being 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
for a, c being Int_position
for i being Integer
for n being 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 ; :: thesis: for a, c being Int_position
for i being Integer
for n being 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 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 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 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);
A1: IC (Initialize s) = 0 by MEMSTR_0:def 11;
A2: not DataLoc ((s . a),i) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
A3: 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 A4: (Initialize s) . (DataLoc (((Initialize s) . a),i)) = (Initialize s) . (DataLoc ((s . a),i)) by FUNCT_4:11
.= s . (DataLoc ((s . a),i)) by A2, FUNCT_4:11 ;
A5: for-down (a,i,n,I) = ((a,i) <=0_goto ((card I) + 3)) ';' ((I ';' (AddTo (a,i,(- n)))) ';' (goto (- ((card I) + 2)))) by Th2;
A6: 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
.= Exec (((a,i) <=0_goto ((card I) + 3)),(Initialize s)) by A5, 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 A7: IC (Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 3)) by A6, A4, SCMPDS_2:56
.= 0 + ((card I) + 3) by A1, SCMPDS_6:12 ;
A8: card (for-down (a,i,n,I)) = (card I) + 3 by Th39;
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 A3, GRFUNC_1:2
.= halt SCMPDS by A8, COMPOS_1:64 ;
then A9: CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),1))) = halt SCMPDS by A7, PBOOLE:143;
then A10: P +* (stop (for-down (a,i,n,I))) halts_on Initialize s by EXTPRO_1:29;
A11: CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Initialize s)) = (a,i) <=0_goto ((card I) + 3) by A5, SCMPDS_6:11;
now :: thesis: for l being Nat st l < 0 + 1 holds
CurInstr ((P +* (stop (for-down (a,i,n,I)))),(Comput ((P +* (stop (for-down (a,i,n,I)))),(Initialize s),l))) <> halt SCMPDS
let l be 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 A11; :: thesis: verum
end;
then for l being 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 A12: LifeSpan ((P +* (stop (for-down (a,i,n,I)))),(Initialize s)) = 1 by A9, A10, EXTPRO_1:def 15;
A13: now :: thesis: for x being object st x in dom (IExec ((for-down (a,i,n,I)),P,(Initialize s))) holds
(IExec ((for-down (a,i,n,I)),P,(Initialize s))) . x = (s +* (Start-At (((card I) + 3),SCMPDS))) . x
let x be object ; :: 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 )
A14: dom (Start-At (((card I) + 3),SCMPDS)) = {(IC )} by FUNCOP_1:13;
assume A15: 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 A15, SCMPDS_4:6;
suppose A16: 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 A17: not x in dom (Start-At (((card I) + 3),SCMPDS)) by A14, TARSKI:def 1;
A18: not x in dom (Start-At (0,SCMPDS)) by A16, 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 A12, A10, EXTPRO_1:23
.= (Initialize s) . x by A6, A16, SCMPDS_2:56
.= s . x by A18, FUNCT_4:11
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A17, FUNCT_4:11 ; :: thesis: verum
end;
suppose A19: 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 A7, A12, A19, A10, EXTPRO_1:23
.= (s +* (Start-At (((card I) + 3),SCMPDS))) . x by A19, 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 A13, FUNCT_1:2; :: thesis: verum