
theorem
  for f,g being Function st f is idempotent & rng g c= rng f & rng g c=
  dom f holds f*g = g
proof
  let f,g be Function;
  assume f is idempotent;
  then
A1: f*f = f by QUANTAL1:def 9;
  assume
A2: rng g c= rng f;
A3: now
    let x be object;
    assume
A4: x in dom g;
    then g.x in rng g by FUNCT_1:def 3;
    then
A5: ex a being object st a in dom f & g.x = f.a by A2,FUNCT_1:def 3;
    (f*g).x = f.(g.x) by A4,FUNCT_1:13;
    hence (f*g).x = g.x by A1,A5,FUNCT_1:13;
  end;
  assume rng g c= dom f;
  then dom (f*g) = dom g by RELAT_1:27;
  hence thesis by A3,FUNCT_1:2;
end;
