reserve X,X1,X2,Y,Y1,Y2 for set, p,x,x1,x2,y,y1,y2,z,z1,z2 for object;
reserve f,g,g1,g2,h for Function,
  R,S for Relation;

theorem
  dom f = X & dom g = X & rng g c= X & f is one-to-one & f*g = f implies
  g = id X
proof
  assume that
A1: dom f = X and
A2: dom g = X and
A3: rng g c= X & f is one-to-one and
A4: f*g = f;
  x in X implies g.x = x
  proof
    assume
A5: x in X;
    then g.x in rng g & f.x = f.(g.x) by A2,A4,Def3,Th13;
    hence thesis by A1,A3,A5;
  end;
  hence thesis by A2,Th17;
end;
