reserve k,n for Nat,
  x,y,z,y1,y2 for object,X,Y for set,
  f,g for Function;
reserve p,q,r,s,t for XFinSequence;
reserve D for set;

theorem :: CATALAN2:2
  n <= dom p implies (p^q)|n = p|n
proof
  assume n <= dom p;
  then Segm n c= Segm len p by NAT_1:39;
  then ((p^q)|dom p)|n=(p^q)|n by RELAT_1:74;
  hence thesis by Th54;
end;
