reserve p,P,P1,P2 for Instruction-Sequence of SCM+FSA;
reserve s, S for State of SCM+FSA,
  I, J for Program of SCM+FSA,
  Ig for good Program of SCM+FSA,
  i for good sequential Instruction of SCM+FSA,
  j for sequential Instruction of SCM+FSA,
  a, b for Int-Location,
  f for FinSeq-Location;

theorem Th4:
 for Ig being good really-closed Program of SCM+FSA
 for J being really-closed Program of SCM+FSA holds
  Ig is_halting_on Initialized s,p & J is_halting_on IExec(Ig,p,s),p
 implies LifeSpan(p +* (Ig ";" J),Initialized s)
 = LifeSpan(p +* Ig,Initialized s) + 1 +
   LifeSpan(p +* Ig +* J,Initialized Result(p +* Ig,Initialized s))
proof
 let Ig be good really-closed Program of SCM+FSA;
 let J be really-closed Program of SCM+FSA;
  set I = Ig;
  assume that
A1: I is_halting_on Initialized s,p and
A2: J is_halting_on IExec(I,p,s),p;
  set Is = Initialized s;
A3: (Initialized s).intloc 0 = 1 by SCMFSA_M:9;
  set s1 = Initialized s, p1 = p +* I;
  set m1 = LifeSpan(p1,s1);
  set s3 = Initialized Comput(p1,s1,m1), p3 = p1 +* J;
  s1 = Initialized Is;
  then
A4: s1 = Initialize Is by A3,SCMFSA_M:18;
  then
A5: p1 halts_on s1 by A1;
  then
A6: s3 = Initialized Result(p1,s1) by EXTPRO_1:23;
  set s2 = Initialized s,
      p2 = p +* (I ";" J);
A7: I ";" J c= p2 by FUNCT_4:25;
A8: DataPart Is = DataPart s2;
A9: s2.intloc 0 = 1 by A3;
  set JAt = Start-At(0,SCM+FSA);
  Comput(p1,s1,m1).intloc 0 = 1 by A3,A4,SCMFSA8C:68;
  then
A10: Initialized Comput(p1,s1,m1) = Initialize Comput(p1,s1,m1) by SCMFSA_M:18;
  then JAt c= s3 by FUNCT_4:25;
  then
A11: s3 = Initialize s3 by FUNCT_4:98;
  DataPart IExec(I,p,s) = DataPart(Result(p+*I,Initialized s))
          by SCMFSA6B:def 1
    .= DataPart Result(p+*I,Initialized s)
    .= DataPart Comput(p1,s1,LifeSpan(p1,s1)) by A5,EXTPRO_1:23;
  then DataPart IExec(I,p,s) = DataPart s3 by A10,MEMSTR_0:79;
  then
A12: J is_halting_on s3,p3 by A2,SCMFSA8B:5;
 Initialize s2 = s2 by MEMSTR_0:44;
  then  Result(p2+*I,s2) =  Result(p1,s1)
     by A1,A8,SCMFSA8C:72;
  then  Initialized Result(p2+*I,s2) =  s3 by A6;
  then
A13: DataPart Initialized Result(p2+*I,s2) = DataPart s3;
A14: DataPart IExec(I,p,s) = DataPart IExec(I,p,Is) by SCMFSA8C:3
    .= DataPart IExec(I,p2,s2) by A1,A3,A8,SCMFSA8C:20;
A15: Initialize((intloc 0).-->1) c= Initialized s by FUNCT_4:25;
A16: J is_halting_on IExec(I,p2,s2),p2 by A2,A14,SCMFSA8B:5;
  I is_halting_on s2,p2 by A1,A8,SCMFSA8B:5;
  then
A17: LifeSpan(p2,s2) = LifeSpan(p2+*I,s2) + 1
        + LifeSpan(p2+*I+*J,Initialized Result(p2+*I,s2))
        by A9,A16,A15,Lm1,A7;
  Start-At(0,SCM+FSA) c= Initialized Result(p2+*I,s2)
       by FUNCT_4:25,MEMSTR_0:50;
  then
A18: Initialized Result(p2+*I,s2)
   = Initialize Initialized Result(p2 +* I,s2) by FUNCT_4:98;
A19:  LifeSpan(p2+*I,s2) = m1 by A1,A4,A8,SCMFSA8C:72;
  LifeSpan(p2+*I+*J,Initialized Result(p2+*I,s2)) = LifeSpan(p3,s3)
  by A12,A11,A18,A13,SCMFSA8C:72;
  hence thesis by A6,A17,A19;
end;
