
theorem Th1:
  for f,g being Function st g is one-to-one &
  f|(rng g) is one-to-one & rng g c= dom f holds f*g is one-to-one
proof
  let f,g be Function such that
A1: g is one-to-one and
A2: f|(rng g) is one-to-one and
A3: rng g c= dom f;
  set h = f*g;
A4: dom h c= dom g
  by FUNCT_1:11;
  dom g c= dom h
  proof
    let x be object such that
A5: x in dom g;
    g.x in rng g by A5,FUNCT_1:3;
    hence thesis by A3,A5,FUNCT_1:11;
  end;
  then
A6: dom h = dom g by A4;
  for x1,x2 being object st x1 in dom h & x2 in dom h & h.x1 = h.x2
holds x1 = x2
  proof
    let x1,x2 be object such that
A7: x1 in dom h and
A8: x2 in dom h and
A9: h.x1 = h.x2;
A10: h.x1 = f.(g.x1) & h.x2 = f.(g.x2) by A7,A8,FUNCT_1:12;
    dom (f|(rng g)) = rng g by A3,RELAT_1:62;
    then
A11: g.x1 in dom (f|(rng g)) by A4,A7,FUNCT_1:3;
    g.x2 in rng g by A4,A8,FUNCT_1:3;
    then
A12: g.x2 in dom (f|(rng g)) by A3,RELAT_1:62;
    f.(g.x1) = (f|(rng g)).(g.x1) & f.(g.x2) = (f|(rng g)).(g.x2) by A6,A7,A8,
FUNCT_1:3,49;
    then g.x1 = g.x2 by A2,A9,A10,A11,A12;
    hence thesis by A1,A4,A7,A8;
  end;
  hence thesis;
end;
