reserve m,n for Nat,
  a for Int_position,
  i,j for Instruction of SCMPDS,
  s,s1,s2 for State of SCMPDS,
  k1 for Integer,
  loc for Nat,
  I,J,K for Program of SCMPDS;
reserve P,P1,P2 for Instruction-Sequence of SCMPDS;

theorem Th24: ::SCMFSA8A:62
  for s being 0-started State of SCMPDS,I being halt-free Program of
SCMPDS, J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P
 holds
  IExec(I ';' Goto (card J + 1) ';' J,P,s)
   = IExec(I,P,s) +* Start-At((card I + card J + 1),SCMPDS)
proof
  let s be 0-started State of SCMPDS,
      I be halt-free Program of SCMPDS, J be Program of
  SCMPDS;
  set P1 = P +* stop I,
      m= LifeSpan(P1,s)+1, G=Goto (card J + 1),
  P2 = P +* stop (I ';' G ';' J),
  l=  (card I + card J + 1);
  assume that
A1: I is_closed_on s,P and
A2: I is_halting_on s,P;
  Initialize s = s by MEMSTR_0:44;
  then
A3: P1 halts_on s by A2;
  P2 halts_on s & LifeSpan(P2,s) = m
   by A1,A2,Lm3;
  then
A4: Result(P2,s) = Comput(P2, s,m) by EXTPRO_1:23;
  then DataPart Result(P2,s) = DataPart Comput(P1,s,LifeSpan(P1,s))
by A1,A2,Lm3;
  then
A5: DataPart Result(P2,s) = DataPart Result(P1,s) by A3,EXTPRO_1:23
    .= DataPart(Result(P1,s) +* Start-At(l,SCMPDS)) by MEMSTR_0:79;
  IC Result(P2,s) = l by A1,A2,A4,Lm3
    .= IC(Result(P1,s) +* Start-At(l,SCMPDS)) by FUNCT_4:113;
  then
A6:  Result(P2,s) = (Result(P1,s) +* Start-At(l,SCMPDS)) by A5,MEMSTR_0:78;
  thus IExec(I ';' G ';' J,P,s) = Result(P2,s)
    .= Result(P1,s) +* (Start-At(l,SCMPDS)) by A6
    .= IExec(I,P,s) +* Start-At(l,SCMPDS);
end;
