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

theorem Th32:
  for f being Function of X,Y st (Y = {} implies X = {}) & Z c= X
  holds f|Z is Function of Z,Y
proof
  let f be Function of X,Y such that
A1: Y = {} implies X = {} and
A2: Z c= X;
  dom f = X by A1,Def1;
  then
A3: Z = dom(f|Z) by A2,RELAT_1:62;
  rng(f|Z) c= Y;
  then reconsider R = f|Z as Relation of Z,Y by A3,RELSET_1:4;
  R is quasi_total
  proof
    per cases;
    case Y <> {};
      dom f = X by A1,Def1;
      hence thesis by A2,RELAT_1:62;
    end;
    case Y = {};
      hence thesis;
    end;
  end;
  hence thesis;
end;
