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
  rng compose(p,X) c= Y implies compose(p^q,X) = compose(q,Y)*compose(p,
  X )
proof
  assume
A1: rng compose(p,X) c= Y;
  defpred P[Function-yielding FinSequence] means compose(p^$1,X) = compose($1,
  Y)*compose(p,X);
A2: for p being Function-yielding FinSequence st P[p] for f being Function
  holds P[p^<*f*>]
  proof
    let q such that
A3: compose(p^q,X) = compose(q,Y)*compose(p,X);
    let f;
    thus compose(p^(q^<*f*>),X) = compose(p^q^<*f*>,X) by FINSEQ_1:32
      .= f*compose(p^q,X) by Th40
      .= f*compose(q,Y)*compose(p,X) by A3,RELAT_1:36
      .= compose(q^<*f*>,Y)*compose(p,X) by Th40;
  end;
  compose(p^{},X) = compose(p,X) by FINSEQ_1:34
    .= (id Y)*compose(p,X) by A1,RELAT_1:53
    .= compose({},Y)*compose(p,X) by Th38;
  then
A4: P[{}];
  for q holds P[q] from FuncSeqInd(A4,A2);
  hence thesis;
end;
