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 Th23: ::SCMFSA8A:61
  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 IC IExec(I ';' Goto (card J + 1) ';' J,P,s)
   = card I + card J + 1
proof
  let s be 0-started State of SCMPDS,
      I be halt-free Program of SCMPDS, J be Program of
  SCMPDS;
  set
   m= LifeSpan(P +* stop I,Initialize s)+1,
   G=Goto (card J + 1),
   P2 = P +* stop (I ';' G ';' J);
A1: Initialize s = s by MEMSTR_0:44;
  assume
A2: I is_closed_on s,P & I is_halting_on s,P;
  then P2 halts_on s & LifeSpan(P2,s) = m by Lm3,A1;
  then IC Result(P2,s) = IC Comput(P2, s,m) by EXTPRO_1:23
    .= card I + card J + 1 by A2,Lm3,A1;
  hence thesis;
end;
