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
  for q being non-empty non empty FinSequence, p being FuncSequence of q
  holds dom compose(p,q.1) = q.1 & rng compose(p,q.1) c= q.len q
proof
  let q be non-empty non empty FinSequence;
  let p be FuncSequence of q;
  per cases;
  suppose
A1: p = {};
A2: len q = len p+1 by Def9;
    compose(p,q.1) = id (q.1) & len p = 0 by A1,Th38;
    hence thesis by A2;
  end;
  suppose
A3: p <> {};
    then
A4: lastrng p c= q.len q by Th65;
    firstdom p = q.1 & rng compose(p,q.1) c= lastrng p by A3,Th58,Th65;
    hence thesis by A4,Th61;
  end;
end;
