reserve m for Nat;
reserve P for (the InstructionsF of SCM+FSA)-valued ManySortedSet of NAT;

theorem Th5:
  for s being 0-started State of SCM+FSA st s.intloc 0 = 1
   for a being Int-Location
   for k being Integer st  aSeq(a,k) c= P & a<>intloc 0
    holds
  (for i being Nat st i <= len aSeq(a,k)
      holds IC Comput(P,s,i) =  i &
  (for b being Int-Location st b <> a
    holds Comput(P,s,i).b = s.b) &
  (for f being FinSeq-Location holds Comput(P,s,i).f = s.f)) &
      Comput(P,s,len aSeq(a,k)).a = k
proof
  let s be 0-started State of SCM+FSA;
  assume
A1: s.intloc 0 = 1;
  let a be Int-Location;
  let k be Integer;
  assume that
A2:  aSeq(a,k) c= P and
A3: a <> intloc 0;
A4: for c being Nat st c in dom aSeq(a,k)
    holds aSeq(a,k).c = P.(0 + c) by A2,GRFUNC_1:2;
  hereby
    let i be Nat;
    assume
A5: i <= len aSeq(a,k);
    then IC Comput(P,s,i) =  (0 + i) by A1,A3,A4,Th4;
    hence IC Comput(P,s,i) =  i & (for b being Int-Location st b
<> a
holds Comput(P,s,i).b = s.b) & for f being FinSeq-Location holds
Comput(P,s,i).f = s.f by A1,A3,A4,A5,Th4;
  end;
  thus thesis by A1,A3,A4,Th4;
end;
