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 Th12:
  for I being really-closed Program of SCM+FSA
   st p+*I halts_on Initialized s
   for J being Program of SCM+FSA, k being Nat
    st k <= LifeSpan(p +* I,Initialized s )
   holds  Comput(p +* I, (Initialized s),k)
    =  Comput(p +* (I ";" J), (Initialized s),k)
proof
  let I be really-closed Program of SCM+FSA;
  assume
A1: p+*I halts_on Initialized s;
  set s1 = Initialized s,
      p1 = p +* I;
A2: I c= p1 by FUNCT_4:25;
  let J be Program of SCM+FSA;
  set s2 = Initialized s,
      p2 = p +* (I ";" J);
  defpred X[Nat] means $1 <= LifeSpan(p1,s1)
   implies  Comput(p1, s1,$1) =  Comput(p2,(s2),$1);
A3: for m st X[m] holds X[m+1]
  proof
    dom(I ";" J) = dom I \/ dom Reloc(J, card I) by SCMFSA6A:39;
    then
A4: dom I c= dom(I ";" J) by XBOOLE_1:7;
    set sx = s2,
        px = p2;
A5: I ";" J c= p2 by FUNCT_4:25;
    let m;
    assume
A6: m <= LifeSpan(p1,s1) implies
       Comput(p1,s1,m) =  Comput(p2,(s2),m);
    assume
A7: m+1 <= LifeSpan(p1,s1);
A8: Comput(p1,s1,m+1) = Following(p1,Comput(p1,s1,m)) by EXTPRO_1:3
      .= Exec(CurInstr(p1,Comput(p1,s1,m)),
      Comput(p1,s1,m));
A9: Comput(px,sx,m+1) = Following(px,Comput(px,sx,m)) by EXTPRO_1:3
      .= Exec(CurInstr(px,Comput(px,sx,m)),Comput(px,sx,m));
    IC s1 = 0 by MEMSTR_0:def 11;
    then
A10:  IC s1 in dom I by AFINSQ_1:65;
A11: IC Comput(p1,s1,m) in dom I by AMISTD_1:21,A2,A10;
A12:  p1/.IC Comput(p1,s1,m) = p1.IC Comput(p1,s1,m) by PBOOLE:143;
A13: CurInstr(p1,Comput(p1,s1,m))
    = I.IC(Comput(p1,s1,m)) by A11,A12,A2,GRFUNC_1:2;
A14:  px/.IC Comput(px,sx,m) = px.IC Comput(px,sx,m) by PBOOLE:143;
    m < LifeSpan(p1,s1) by A7,NAT_1:13;
    then I.IC(Comput(p1,s1,m)) <> halt SCM+FSA by A1,A13,EXTPRO_1:def 15;
    then
    CurInstr(p1,Comput(p1,s1,m))
     = (I ";" J).IC(Comput(p1,s1,m)) by A11,A13,SCMFSA6A:15
    .= CurInstr(px,Comput(px,sx,m)) by A14,A7,A11,A4,A5,A6,GRFUNC_1:2,NAT_1:13;
    hence thesis by A6,A7,A8,A9,NAT_1:13;
  end;
A15: X[0];
  thus for k being Nat holds X[k] from NAT_1:sch 2(A15, A3 );
end;
