theorem Th81:
  for f,g be Function st rng f c= rng g ex h be Function st dom h
  = dom f & rng h c= dom g & f = g*h
proof
  let f,g be Function such that
A1: rng f c= rng g;
  defpred P[object,object] means f.$1=g.$2;
A2: for x being object st x in dom f
ex y being object st y in dom g & P[x,y] by A1,FUNCT_1:114;
  consider h be Function of dom f,dom g such that
A3: for x being object st x in dom f holds P[x,h.x] from FUNCT_2:sch 1(A2);
  per cases;
  suppose
    dom g={};
    then rng g={} by RELAT_1:42;
    then
A4: f=g*{} by A1;
    rng {} c= dom g;
    hence thesis by A4;
  end;
  suppose
A5: dom g<>{};
A6: rng h c= dom g by RELAT_1:def 19;
A7: dom h=dom f by A5,FUNCT_2:def 1;
    then
A8: dom (g*h)=dom f by A6,RELAT_1:27;
    now
      let x being object such that
A9:   x in dom f;
      thus f.x = g.(h.x) by A3,A9
        .= (g*h).x by A8,A9,FUNCT_1:12;
    end;
    hence thesis by A7,A6,A8,FUNCT_1:2;
  end;
end;
