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),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),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),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),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 iWHL = Initialized (stop (while>0 a,i,I));
set s3 = s +* (Initialized (stop (while>0 a,i,I)));
set s4 = Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1;
set i1 = a,i <=0_goto ((card I) + 2);
set i2 = goto (- ((card I) + 1));
set SAl = Start-At ((card I) + 2),SCMPDS ;
A1: IC (s +* (Initialized (stop (while>0 a,i,I)))) = 0 by SCMPDS_6:21;
A2: while>0 a,i,I = (a,i <=0_goto ((card I) + 2)) ';' (I ';' (goto (- ((card I) + 1)))) by SCMPDS_4:51;
A3: not DataLoc (s . a),i in dom (Initialized (stop (while>0 a,i,I))) by SCMPDS_4:31;
not a in dom (Initialized (stop (while>0 a,i,I))) by SCMPDS_4:31;
then A4: (s +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc ((s +* (Initialized (stop (while>0 a,i,I)))) . a),i) = (s +* (Initialized (stop (while>0 a,i,I)))) . (DataLoc (s . a),i) by FUNCT_4:12
.= s . (DataLoc (s . a),i) by A3, FUNCT_4:12 ;
A5: Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),(0 + 1) = Following (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),0 ) by AMI_1:14
.= Following (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))) by AMI_1:13
.= Exec (a,i <=0_goto ((card I) + 2)),(s +* (Initialized (stop (while>0 a,i,I)))) by A2, SCMPDS_6:22 ;
Initialized (stop (while>0 a,i,I)) c= s +* (Initialized (stop (while>0 a,i,I))) by FUNCT_4:26;
then A6: stop (while>0 a,i,I) c= Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1 by AMI_1:81, SCMPDS_4:57;
A7: IExec (while>0 a,i,I),s = (Result (s +* (Initialized (stop (while>0 a,i,I))))) +* (s | NAT ) by SCMPDS_4:def 8;
assume s . (DataLoc (s . a),i) <= 0 ; :: thesis: IExec (while>0 a,i,I),s = s +* (Start-At ((card I) + 2),SCMPDS )
then A8: IC (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1) = ICplusConst (s +* (Initialized (stop (while>0 a,i,I)))),((card I) + 2) by A5, A4, SCMPDS_2:68
.= 0 + ((card I) + 2) by A1, SCMPDS_6:23 ;
Y: (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1)) /. (IC (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1)) = (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1) . (IC (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1)) by AMI_1:150;
A9: 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 (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1) . ((card I) + 2) = (stop (while>0 a,i,I)) . ((card I) + 2) by A6, GRFUNC_1:8
.= halt SCMPDS by A9, SCMPDS_6:25 ;
then A10: CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1) = halt SCMPDS by A8, Y;
then A11: ProgramPart (s +* (Initialized (stop (while>0 a,i,I)))) halts_on s +* (Initialized (stop (while>0 a,i,I))) by AMI_1:146;
A12: CurInstr (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))) = a,i <=0_goto ((card I) + 2) by A2, SCMPDS_6:22;
now
let l be Element of NAT ; :: thesis: ( l < 0 + 1 implies CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l) <> halt SCMPDS )
u: Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),0 = s +* (Initialized (stop (while>0 a,i,I))) by AMI_1:13;
assume l < 0 + 1 ; :: thesis: CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l) <> halt SCMPDS
then l = 0 by NAT_1:13;
then CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l) = CurInstr (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))) by u;
hence CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l) <> halt SCMPDS by A12, SCMPDS_6:30; :: thesis: verum
end;
then for l being Element of NAT st CurInstr (ProgramPart (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l)),(Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),l) = halt SCMPDS holds
1 <= l ;
then LifeSpan (s +* (Initialized (stop (while>0 a,i,I)))) = 1 by A10, A11, AMI_1:def 46;
then A13: Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1 = Result (s +* (Initialized (stop (while>0 a,i,I)))) by A11, AMI_1:122;
A14: dom (s | NAT ) = NAT by SCMPDS_6:1;
A15: now
let x be set ; :: thesis: ( x in dom (IExec (while>0 a,i,I),s) implies (IExec (while>0 a,i,I),s) . b1 = (s +* (Start-At ((card I) + 2),SCMPDS )) . b1 )
A16: dom (Start-At ((card I) + 2),SCMPDS ) = {(IC SCMPDS )} by FUNCOP_1:19;
assume A17: x in dom (IExec (while>0 a,i,I),s) ; :: thesis: (IExec (while>0 a,i,I),s) . b1 = (s +* (Start-At ((card I) + 2),SCMPDS )) . b1
per cases ( x is Int_position or x = IC SCMPDS or x is Element of NAT ) by A17, SCMPDS_4:20;
suppose A18: x is Int_position ; :: thesis: (IExec (while>0 a,i,I),s) . b1 = (s +* (Start-At ((card I) + 2),SCMPDS )) . b1
then x <> IC SCMPDS by SCMPDS_2:52;
then A19: not x in dom (Start-At ((card I) + 2),SCMPDS ) by A16, TARSKI:def 1;
not x in dom (s | NAT ) by A14, A18, SCMPDS_2:53;
hence (IExec (while>0 a,i,I),s) . x = (Comput (ProgramPart (s +* (Initialized (stop (while>0 a,i,I))))),(s +* (Initialized (stop (while>0 a,i,I)))),1) . x by A13, A7, FUNCT_4:12
.= (s +* (Initialized (stop (while>0 a,i,I)))) . x by A5, A18, SCMPDS_2:68
.= s . x by A18, SCMPDS_5:19
.= (s +* (Start-At ((card I) + 2),SCMPDS )) . x by A19, FUNCT_4:12 ;
:: thesis: verum
end;
suppose A20: x = IC SCMPDS ; :: thesis: (IExec (while>0 a,i,I),s) . b1 = (s +* (Start-At ((card I) + 2),SCMPDS )) . b1
not x in dom (s | NAT ) by A14, A20, AMI_1:48;
hence (IExec (while>0 a,i,I),s) . x = (card I) + 2 by A8, A13, A7, A20, FUNCT_4:12
.= (s +* (Start-At ((card I) + 2),SCMPDS )) . x by A20, SCMPDS_7:12 ;
:: thesis: verum
end;
suppose x is Element of NAT ; :: thesis: (IExec (while>0 a,i,I),s) . b1 = (s +* (Start-At ((card I) + 2),SCMPDS )) . b1
hence (IExec (while>0 a,i,I),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),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),s = s +* (Start-At ((card I) + 2),SCMPDS ) by A15, FUNCT_1:9; :: thesis: verum