let P be Instruction-Sequence of SCMPDS; :: thesis: for s being State of SCMPDS
for I being Program of SCMPDS
for J being halt-free shiftable Program of SCMPDS
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,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let s be State of SCMPDS; :: thesis: for I being Program of SCMPDS
for J being halt-free shiftable Program of SCMPDS
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,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let I be Program of SCMPDS; :: thesis: for J being halt-free shiftable Program of SCMPDS
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,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))

let J be halt-free shiftable Program of SCMPDS; :: 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,(Initialize s)) = (IExec (J,P,(Initialize 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,(Initialize s)) = (IExec (J,P,(Initialize 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,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
set b = DataLoc ((s . a),k1);
set pJ = stop J;
set s1 = Initialize s;
set P1 = P +* (stop J);
set P2 = P +* (stop J);
set IF = if=0 (a,k1,I,J);
set pIF = stop (if=0 (a,k1,I,J));
set s3 = Initialize s;
set P3 = P +* (stop (if=0 (a,k1,I,J)));
set s4 = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize 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);
A3: 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 ;
A4: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2
.= Exec (((a,k1) <>0_goto ((card I) + 2)),(Initialize s)) by A3, Th22 ;
A5: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18;
then A6: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11
.= s . (DataLoc ((s . a),k1)) by A5, FUNCT_4:11 ;
A7: IC (Initialize s) = 0 by 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,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
then A9: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A4, A6, SCMPDS_2:55
.= 0 + ((card I) + 2) by A7, Th23 ;
for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) . a by A4, SCMPDS_2:55;
then A11: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize 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 Th15
.= (card I) + (1 + 1) ;
then A12: Shift ((stop J),((card I) + 2)) c= stop (if=0 (a,k1,I,J)) by Th24;
stop (if=0 (a,k1,I,J)) c= P +* (stop (if=0 (a,k1,I,J))) by FUNCT_4:25;
then Shift ((stop J),((card I) + 2)) c= P +* (stop (if=0 (a,k1,I,J))) by A12, XBOOLE_1:1;
then A13: Shift ((stop J),((card I) + 2)) c= P +* (stop (if=0 (a,k1,I,J))) ;
assume A14: J is_closed_on s,P ; :: thesis: ( not J is_halting_on s,P or IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) )
then A15: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th38, FUNCT_4:25;
UU: stop J c= P +* (stop J) by FUNCT_4:25;
assume A16: J is_halting_on s,P ; :: thesis: IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
then A17: P +* (stop J) halts_on Initialize s by Def3;
A19: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4;
A22: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize 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)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A19
.= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A15, A13, A9, A11, Th45, UU
.= halt SCMPDS by A17, EXTPRO_1:def 15 ;
then A23: P +* (stop (if=0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29;
A24: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) = (a,k1) <>0_goto ((card I) + 2) by A3, Th22;
now
let l be Element of NAT ; :: thesis: ( l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS )
assume A25: l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 ; :: thesis: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS
A26: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),0) = Initialize 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)))),(Initialize s),b1))) <> halt SCMPDS
then CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) by A26;
hence CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) <> halt SCMPDS by A24; :: 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)))),(Initialize s),b1))) = halt SCMPDS
then consider n being Nat such that
A27: l = n + 1 by NAT_1:6;
reconsider n = n as Element of NAT by ORDINAL1:def 12;
A28: n < LifeSpan ((P +* (stop J)),(Initialize s)) by A25, A27, XREAL_1:6;
assume A29: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS ; :: thesis: contradiction
A31: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),n) by EXTPRO_1:4;
CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize 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)))),(Initialize s),1)),n))) by A15, A13, A9, A11, Th45, UU
.= halt SCMPDS by A27, A29, A31 ;
hence contradiction by A17, A28, EXTPRO_1:def 15; :: thesis: verum
end;
end;
end;
then for l being Element of NAT st CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS holds
(LifeSpan ((P +* (stop J)),(Initialize s))) + 1 <= l ;
then A34: LifeSpan ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) = (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 by A22, A23, EXTPRO_1:def 15;
A35: DataPart (Result ((P +* (stop J)),(Initialize s))) = DataPart (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A17, EXTPRO_1:23
.= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A15, A13, A9, A11, Th45, UU
.= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) by EXTPRO_1:4
.= DataPart (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) by A23, A34, EXTPRO_1:23 ;
A36: now
let x be set ; :: thesis: ( x in dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) implies (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 )
A37: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13;
assume A38: x in dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) ; :: thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
per cases ( x is Int_position or x = IC ) by A38, SCMPDS_4:6;
suppose A39: x is Int_position ; :: thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
then x <> IC by SCMPDS_2:43;
then A40: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A37, TARSKI:def 1;
thus (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) . x
.= (Result ((P +* (stop J)),(Initialize s))) . x by A35, A39, SCMPDS_4:8
.= (IExec (J,P,(Initialize s))) . x
.= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A40, FUNCT_4:11 ; :: thesis: verum
end;
suppose A42: x = IC ; :: thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1
A44: IC (Result ((P +* (stop J)),(Initialize s))) = IC (IExec (J,P,(Initialize s)))
.= card J by A14, A16, Th48 ;
A46: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A37, A42, TARSKI:def 1;
thus (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) . x
.= (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) . x by A23, A34, EXTPRO_1:23
.= IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A42, EXTPRO_1:4
.= (IC (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) + ((card I) + 2) by A15, A13, A9, A11, Th45, UU
.= (IC (Result ((P +* (stop J)),(Initialize s)))) + ((card I) + 2) by A17, EXTPRO_1:23
.= IC (Start-At (((card J) + ((card I) + 2)),SCMPDS)) by A44, FUNCOP_1:72
.= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A42, A46, FUNCT_4:13 ; :: thesis: verum
end;
end;
end;
dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def 2
.= dom ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def 2 ;
hence IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A36, FUNCT_1:2; :: thesis: verum