reserve m,n for Nat,
  I for Program of SCM+FSA,
  s,s1,s2 for State of SCM+FSA,
  a for Int-Location,
  f for FinSeq-Location,
  p,p1,p2 for Instruction-Sequence of SCM+FSA;

theorem Th17:
  for I being keepInt0_1 InitHalting really-closed Program of SCM+FSA,
      J being InitHalting really-closed Program of SCM+FSA holds
 IExec(I ";" J,p,s) = IncIC(IExec(J,p,IExec(I,p,s)),card I)
proof
  set D = (Data-Locations SCM+FSA);
  set A = NAT;
  let I be keepInt0_1 InitHalting really-closed Program of SCM+FSA;
  let J be InitHalting really-closed Program of SCM+FSA;
  set s1 = Initialized s, p1 = p +* I;
A1: I c= p1 by FUNCT_4:25;
  set p2 = p +* (I ";" J);
A2: I ";" J c= p2 by FUNCT_4:25;
  set s3 = Initialized Comput(p1, s1,LifeSpan(p1,s1)), p3 = p1 +* J;
A3: iS c= s3 by FUNCT_4:25;
A4: J c= p3 by FUNCT_4:25;
  set m1 = LifeSpan(p1,s1);
  set m3 = LifeSpan(p3,s3);
A5: iS c= s1 by FUNCT_4:25;
A6: I ";" J c= p2 by FUNCT_4:25;
A7:  iS c= Initialized s by FUNCT_4:25;
  I c= p+*I by FUNCT_4:25;
  then
A8: p1 halts_on s1 by Def1,A7;
A9: iS c= s3 by FUNCT_4:25;
A10: IExec(I,p,s) = Result(p1,s1) & iS c= Result(p1,s1) +* iS
 by FUNCT_4:25,SCMFSA6B:def 1;
A11: J c= p +* J by FUNCT_4:25;
A12: iS c= Initialized IExec(I,p,s) &
   iS c= s3 by FUNCT_4:25;
A13: J c= p +* J & J c= p3 by FUNCT_4:25;
A14: iS c= s3 by FUNCT_4:25;
A15: iS c= s1 by FUNCT_4:25;
A16: I c= p1 by FUNCT_4:25;
     p1 halts_on s1 by A15,Def1,A16;
   then
A17: s3 = Initialized Result(p1,s1) by EXTPRO_1:23;
A18: IC Result(p1 +* J,Initialized Result(p1,s1))
        = IC Result(p +* J,Initialized IExec(I,p,s)) by A10,Th6,A11,A4;
A19: iS c= s1 by FUNCT_4:25;
A20: I c= p2 +* I by FUNCT_4:25;
A21: LifeSpan(p2 +* I,s1) = m1 by A19,Th6,A16,A20;
     Reloc(J,card I) c= I ";" J by SCMFSA6A:38;
     then
A22: Reloc(J,card I) c= p2 by A2,XBOOLE_1:1;
A23: iS c= s1 by FUNCT_4:25;
A24: p2 +* I +* (I ";" J) = p2 +* (I +* (I ";" J)) by FUNCT_4:14
        .= p2 +* (I ";" J) by SCMFSA6A:18
        .= p2
        .= p+*(I +* (I ";" J)) by SCMFSA6A:18
        .= p1+*(I ";" J) by FUNCT_4:14;
  I c= p2+*I by FUNCT_4:25;
  then p2 +* I halts_on s1 by Def1,A23;
  then DataPart Comput(p2 +* I, s1,m1)
    = DataPart Comput(p2 +* I +* (I ";" J), s1,m1) by A19,A21,Th8,A20
    .= DataPart Comput(p1,s1,m1) by A15,A8,Th8,A1,A24;
  then
A25: DataPart(Comput(p2 +* I, s1,m1) +*iS) =
DataPart
  Comput(p1,s1,m1) +* DataPart iS by FUNCT_4:71
    .= DataPart(Comput(p1,s1,m1) +*iS) by FUNCT_4:71;
A26: IC Comput(p2,s1,m1+1) =  card I &
    DataPart Comput(p2,s1,m1+1)
  = DataPart(Comput(p2 +* I, s1,m1) +*iS)
by A5,A21,Th13,A6;
  then
A27: DataPart Comput(p2, Comput(p2,s1,m1+1),m3)
 = DataPart Comput(p3,s3, m3) by A9,A25,Th4,A4,A22;
A28: IC Comput(p2, Comput(p2,s1,m1+1),m3) = IC Comput(p3,s3,m3) + card I
      by A26,A9,A25,Th4,A4,A22;
A29:  iS c= s1 by FUNCT_4:25;
  (I ";" J) c= p+*(I ";" J) by FUNCT_4:25;
  then
A30: p2 halts_on s1 by Def1,A29;
A31: IExec(I ";" J,p,s) = Result(p +* (I ";" J),Initialized s)
 by SCMFSA6B:def 1
    .= Comput(p2,s1,LifeSpan(p2,s1)) by A30,EXTPRO_1:23
    .= Comput(p2,s1,m1+1+m3) by A17,Th16;
A32: p1 halts_on s1 by A15,Def1,A1;
  IExec(I,p,s) = Result(p+*I,Initialized s) by SCMFSA6B:def 1
    .= Comput(p1,s1,m1) by A32,EXTPRO_1:23;
  then
A33: Result(p+*J,IExec(I,p,s) +* iS) = Result(p3,s3) by A12,Th6,A13;

A34: p3 halts_on s3 by Def1,A3,A4;
A35: IExec(J,p,IExec(I,p,s)) = Result(p+*J,Initialized IExec(I,p,s))
           by SCMFSA6B:def 1
    .= Comput(p3,s3,m3) by A33,A34,EXTPRO_1:23;
A36: DataPart IExec(I ";" J,p,s)
     = DataPart IExec(J,p,IExec(I,p,s)) by A35,A27,A31,EXTPRO_1:4;
A37: p3 halts_on s3 by A14,Def1,A4;
A38: p2 halts_on s1 by A5,Def1,A2;
    p1 halts_on s1 by A15,Def1,A1;
    then
A39: s3 = Initialized Result(p1,s1) by EXTPRO_1:23;
A40: IC IExec(I ";" J,p,s)
     = IC Result(p+*(I ";" J),Initialized s) by SCMFSA6B:def 1
    .= IC Comput(p2,s1,LifeSpan(p2,s1)) by A38,EXTPRO_1:23
    .= IC Comput(p2,s1,m1+1+m3) by A17,Th16
    .= IC Comput(p3,s3,m3) + card I by A28,EXTPRO_1:4
    .= IC Result(p3,s3) + card I by A37,EXTPRO_1:23
    .= IC IExec(J,p,IExec(I,p,s)) + card I by A18,A39,SCMFSA6B:def 1;
  hereby
    reconsider l = IC IExec(J,p,IExec(I,p,s)) + card I as Element of NAT;
A42: now
      let x be object;
      assume
A43:  x in dom IExec(I ";" J,p,s);
      per cases by A43,SCMFSA_M:1;
      suppose
A44:    x is Int-Location;
        then x <> IC SCM+FSA by SCMFSA_2:56;
        then
A45:    not x in dom Start-At(l,SCM+FSA) by TARSKI:def 1;
        IExec(I ";" J,p,s).x = IExec(J,p,IExec(I,p,s)).x
          by A36,A44,SCMFSA_M:2;
        hence
        IExec(I ";" J,p,s).x
         = IncIC(IExec(J,p,IExec(I,p,s)),card I).x by A45,FUNCT_4:11;
      end;
      suppose
A46:    x is FinSeq-Location;
        then x <> IC SCM+FSA by SCMFSA_2:57;
        then
A47:    not x in dom Start-At(l,SCM+FSA) by TARSKI:def 1;
        IExec(I ";" J,p,s).x = IExec(J,p,IExec(I,p,s)).x
         by A36,A46,SCMFSA_M:2;
        hence
        IExec(I ";" J,p,s).x = IncIC(IExec(J,p,IExec(I,p,s)),card I).x
         by A47,FUNCT_4:11;
      end;
      suppose
A48:    x = IC SCM+FSA;
        then x in {IC SCM+FSA} by TARSKI:def 1;
        then
A49:    x in dom Start-At(l,SCM+FSA);
        thus IExec(I ";" J,p,s).x = (Start-At(l,SCM+FSA)).IC SCM+FSA
         by A40,A48,FUNCOP_1:72
          .= IncIC(IExec(J,p,IExec(I,p,s)),card I).x by A48,A49,FUNCT_4:13;
      end;
    end;
    dom IExec(I ";" J,p,s) = the carrier of SCM+FSA by PARTFUN1:def 2
      .= dom IncIC(IExec(J,p,IExec(I,p,s)),card I) by PARTFUN1:def 2;
    hence thesis by A42,FUNCT_1:2;
  end;
end;
