reserve a,b,p,x,x9,x1,x19,x2,y,y9,y1,y19,y2,z,z9,z1,z2 for object,
   X,X9,Y,Y9,Z,Z9 for set;
reserve A,D,D9 for non empty set;
reserve f,g,h for Function;

theorem Th49:
  for f being Function of [:X,Y:],Z holds ~f is Function of [:Y,X:],Z
proof
  let f be Function of [:X,Y:],Z;
  per cases;
  suppose
A1: Z = {};
    then reconsider f as empty set;
    ~f = {};
    hence thesis by A1,FUNCT_2:130;
  end;
  suppose
A1: Z <> {};
  reconsider R = ~f as Relation of [:Y,X:],Z;
  R is quasi_total
  proof
    per cases;
    case Z <> {};
      dom f = [:X,Y:] by A1,FUNCT_2:def 1;
      hence thesis by Th46;
    end;
    case Z = {};
      hence thesis;
    end;
  end;
  hence thesis;
end;
end;
