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;
reserve m,n,k for Nat, R for Relation;

theorem
  for n being Nat for f being Function of X,X holds iter(f,n) is
  Function of X,X
proof
  let n be Nat;
  let f be Function of X,X;
A1: X = {} implies X = {};
  then
A2: dom f = X by FUNCT_2:def 1;
A3: rng f c= X;
  then dom iter(f,n) = X & rng iter(f,n) c= X by A2,Th73;
  then reconsider R = iter(f,n) as Relation of X,X by RELSET_1:4;
  dom R = X by A2,A3,Th73;
  hence thesis by A1,FUNCT_2:def 1;
end;
