reserve S,S9 for non void Signature,
  f,g for Function;

theorem Th33:
  g is one-to-one & (the carrier' of S) /\ rng g c= dom g implies
  f,g form_a_replacement_in S
proof
  assume that
A1: g is one-to-one and
A2: (the carrier' of S) /\ rng g c= dom g;
  let o1,o2 be OperSymbol of S;
  assume
A3: ((id the carrier' of S)+*g).o1 = ((id the carrier' of S)+*g).o2;
A4: (id the carrier' of S).o1 = o1;
A5: (id the carrier' of S).o2 = o2;
  per cases;
  suppose
A6: o1 in dom g;
    then
A7: g.o1 in rng g by FUNCT_1:def 3;
A8: ((id the carrier' of S)+*g).o1 = g.o1 by A6,FUNCT_4:13;
    then not o2 in dom g implies g.o1 = o2 by A3,A5,FUNCT_4:11;
    then
A9: not o2 in dom g implies o2 in (the carrier' of S) /\ rng g by A7,
XBOOLE_0:def 4;
    then ((id the carrier' of S)+*g).o2 = g.o2 by A2,FUNCT_4:13;
    hence thesis by A1,A2,A3,A6,A8,A9;
  end;
  suppose
A10: not o1 in dom g;
    then
A11: not o1 in (the carrier' of S) /\ rng g by A2;
A12: ((id the carrier' of S)+*g).o1 = o1 by A4,A10,FUNCT_4:11;
    then o2 in dom g implies o1 = g.o2 & g.o2 in rng g by A3,FUNCT_1:def 3
,FUNCT_4:13;
    hence thesis by A3,A5,A12,A11,FUNCT_4:11,XBOOLE_0:def 4;
  end;
end;
