reserve P,Q,X,Y,Z for set, p,x,x9,x1,x2,y,z for object;

theorem
  for f being Function of X,Y st (Y = {} implies X = {}) & rng f c= Z
  holds f is Function of X,Z
proof
  let f be Function of X,Y;
  assume Y <> {} or X = {};
  then
A1: dom f = X by Def1;
  assume
A2: rng f c= Z;
  now
    assume Z = {};
    then rng f = {} by A2;
    hence X = {} by A1,RELAT_1:42;
  end;
  hence thesis by A1,A2,Def1,RELSET_1:4;
end;
