reserve a,x,y for object, A,B for set,
  l,m,n for Nat;
reserve X,Y for set, x for object,
  p,q for Function-yielding FinSequence,
  f,g,h for Function;

theorem
  apply(<*f*>^p,x) = <*x*>^apply(p,f.x)
proof
  defpred P[Function-yielding FinSequence] means apply(<*f*>^$1,x) = <*x*>^
  apply($1,f.x);
A1: len {} = 0;
A2: for p being Function-yielding FinSequence st P[p] for f being Function
  holds P[p^<*f*>]
  proof
    let p such that
A3: apply(<*f*>^p,x) = <*x*>^apply(p,f.x);
    let g be Function;
    set p9 = <*f*>^p;
A4: len apply(p,f.x) = len p+1 by Def4;
    len <*f*> = 1 by FINSEQ_1:40;
    then
A5: len p9 = len p+1 by FINSEQ_1:22;
    then len p9 >= 1 by NAT_1:11;
    then len <*x*> = 1 & len p9 in dom apply(p,f.x) by A4,A5,FINSEQ_1:40
,FINSEQ_3:25;
    then
A6: apply(p9,x).(1+len p9) = apply(p,f.x).(len p+1) by A3,A5,FINSEQ_1:def 7;
    apply(p9^<*g*>,x) = apply(p9,x)^<*g.(apply(p9,x).(len p9+1))*> by Th41;
    hence apply(<*f*>^(p^<*g*>),x) = <*x*>^apply(p,f.x)^<*g.(apply(p,f.x).(len
    p+1))*> by A3,A6,FINSEQ_1:32
      .= <*x*>^(apply(p,f.x)^<*g.(apply(p,f.x).(len p+1))*>) by FINSEQ_1:32
      .= <*x*>^apply(p^<*g*>,f.x) by Th41;
  end;
  <*f*>^{} = <*f*> & {}^<*f*> = <*f*> by FINSEQ_1:34;
  then apply(<*f*>^{},x) = apply({},x)^<*f.(apply({},x).(0+1))*> by A1,Th41
    .= <*x*>^<*f.(apply({},x).1)*> by Th39
    .= <*x*>^<*f.(<*x*>.1)*> by Th39
    .= <*x*>^<*f.x*>
    .= <*x*>^apply({},f.x) by Th39;
  then
A7: P[{}];
  for p holds P[p] from FuncSeqInd(A7,A2);
  hence thesis;
end;
