let P be Instruction-Sequence of SCMPDS; :: thesis: for s being 0 -started State of SCMPDS
for I being Program of
for J being halt-free shiftable Program of
for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds
IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let s be 0 -started State of SCMPDS; :: thesis: for I being Program of
for J being halt-free shiftable Program of
for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds
IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let I be Program of ; :: thesis: for J being halt-free shiftable Program of
for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds
IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let J be halt-free shiftable Program of ; :: thesis: for a being Int_position
for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds
IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let a be Int_position; :: thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds
IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let k1 be Integer; :: thesis: ( s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P implies IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
A1: Initialize s = s by MEMSTR_0:44;
set b = DataLoc ((s . a),k1);
set pJ = stop J;
set s1 = s;
set P1 = P +* (stop J);
set IF = if>0 (a,k1,I,J);
set pIF = stop (if>0 (a,k1,I,J));
set s3 = s;
set P3 = P +* (stop (if>0 (a,k1,I,J)));
set s4 = Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1);
set P4 = P +* (stop (if>0 (a,k1,I,J)));
set i = (a,k1) <=0_goto ((card I) + 2);
set G = Goto ((card J) + 1);
set iG = (((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1));
set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS);
A2: if>0 (a,k1,I,J) = (((a,k1) <=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14
.= ((a,k1) <=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ;
A3: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3
.= Following ((P +* (stop (if>0 (a,k1,I,J)))),s) by EXTPRO_1:2
.= Exec (((a,k1) <=0_goto ((card I) + 2)),s) by A2, Th3, A1 ;
A4: IC s = 0 by A1, MEMSTR_0:47;
assume s . (DataLoc ((s . a),k1)) <= 0 ; :: thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
then A5: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) = ICplusConst (s,((card I) + 2)) by A3, SCMPDS_2:56
.= 0 + ((card I) + 2) by A4, Th4 ;
for a being Int_position holds s . a = (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) . a by A3, SCMPDS_2:56;
then A6: DataPart s = DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8;
card ((((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17
.= (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54
.= ((card I) + 1) + 1 by Th1
.= (card I) + (1 + 1) ;
then A7: Shift ((stop J),((card I) + 2)) c= stop (if>0 (a,k1,I,J)) by Th5;
stop (if>0 (a,k1,I,J)) c= P +* (stop (if>0 (a,k1,I,J))) by FUNCT_4:25;
then A8: Shift ((stop J),((card I) + 2)) c= P +* (stop (if>0 (a,k1,I,J))) by A7, XBOOLE_1:1;
assume A9: J is_closed_on s,P ; :: thesis: ( not J is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
then A10: ( Start-At (0,SCMPDS) c= s & J is_closed_on s,P +* (stop J) ) by A1, FUNCT_4:25;
A11: stop J c= P +* (stop J) by FUNCT_4:25;
assume A12: J is_halting_on s,P ; :: thesis: IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
then A13: P +* (stop J) halts_on s by A1;
A14: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s))) by EXTPRO_1:4;
A15: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s))))) by A14
.= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s))))) by A10, A8, A5, A6, Th22, A11
.= halt SCMPDS by A13, EXTPRO_1:def 15 ;
then A16: P +* (stop (if>0 (a,k1,I,J))) halts_on s by EXTPRO_1:29;
A17: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) = (a,k1) <=0_goto ((card I) + 2) by A2, Th3, A1;
now :: thesis: for l being Nat st l < (LifeSpan ((P +* (stop J)),s)) + 1 holds
CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) <> halt SCMPDS
let l be Nat; :: thesis: ( l < (LifeSpan ((P +* (stop J)),s)) + 1 implies CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS )
assume A18: l < (LifeSpan ((P +* (stop J)),s)) + 1 ; :: thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS
A19: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0) = s by EXTPRO_1:2;
per cases ( l = 0 or l <> 0 ) ;
suppose l = 0 ; :: thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS
then CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) by A19;
hence CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) <> halt SCMPDS by A17; :: thesis: verum
end;
suppose l <> 0 ; :: thesis: not CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) = halt SCMPDS
then consider n being Nat such that
A20: l = n + 1 by NAT_1:6;
reconsider n = n as Nat ;
A21: n < LifeSpan ((P +* (stop J)),s) by A18, A20, XREAL_1:6;
assume A22: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS ; :: thesis: contradiction
A23: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(n + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n) by EXTPRO_1:4;
CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),s,n))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n))) by A10, A8, A5, A6, Th22, A11
.= halt SCMPDS by A20, A22, A23 ;
hence contradiction by A13, A21, EXTPRO_1:def 15; :: thesis: verum
end;
end;
end;
then for l being Nat st CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS holds
(LifeSpan ((P +* (stop J)),s)) + 1 <= l ;
then A24: LifeSpan ((P +* (stop (if>0 (a,k1,I,J)))),s) = (LifeSpan ((P +* (stop J)),s)) + 1 by A15, A16, EXTPRO_1:def 15;
A25: DataPart (Result ((P +* (stop J)),s)) = DataPart (Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s)))) by A13, EXTPRO_1:23
.= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s)))) by A10, A8, A5, A6, Th22, A11
.= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1))) by EXTPRO_1:4
.= DataPart (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) by A16, A24, EXTPRO_1:23 ;
A26: now :: thesis: for x being object st x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) holds
(IExec ((if>0 (a,k1,I,J)),P,s)) . x = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x
let x be object ; :: thesis: ( x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) implies (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 )
A27: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13;
assume A28: x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) ; :: thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
per cases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6;
suppose A29: x is Int_position ; :: thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
then x <> IC by SCMPDS_2:43;
then A30: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, TARSKI:def 1;
thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x
.= (Result ((P +* (stop J)),s)) . x by A25, A29, SCMPDS_4:8
.= (IExec (J,P,s)) . x
.= ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; :: thesis: verum
end;
suppose A31: x = IC ; :: thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
A32: IC (Result ((P +* (stop J)),s)) = IC (IExec (J,P,s))
.= card J by A9, A12, Th25, A1 ;
A33: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, A31, TARSKI:def 1;
thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x
.= (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1))) . x by A16, A24, EXTPRO_1:23
.= IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s)))) by A31, EXTPRO_1:4
.= (IC (Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s))))) + ((card I) + 2) by A10, A8, A5, A6, Th22, A11
.= (IC (Result ((P +* (stop J)),s))) + ((card I) + 2) by A13, EXTPRO_1:23
.= IC (Start-At (((card J) + ((card I) + 2)),SCMPDS)) by A32, FUNCOP_1:72
.= ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; :: thesis: verum
end;
end;
end;
dom (IExec ((if>0 (a,k1,I,J)),P,s)) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def 2 ;
hence IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, FUNCT_1:2; :: thesis: verum