
theorem Th8:
  for S,T being non empty RelStr, R being non empty SubRelStr of S
for f being Function of S,T, g being Function of T,S st f is one-to-one & g = f
  " holds g|Image (f|R) is Function of Image (f|R), R & g|Image (f|R) = (f|R)"
proof
  let S,T be non empty RelStr, R be non empty SubRelStr of S;
  let f be Function of S,T, g be Function of T,S;
  assume that
A1: f is one-to-one and
A2: g = f";
  set h = g|Image (f|R);
A3: dom f = the carrier of S by FUNCT_2:def 1;
A4: dom h = the carrier of Image (f|R) by FUNCT_2:def 1;
A5: the carrier of R c= the carrier of S by YELLOW_0:def 13;
  rng h c= the carrier of R
  proof
    let y be object;
    assume y in rng h;
    then consider x being object such that
A6: x in dom h and
A7: y = h.x by FUNCT_1:def 3;
    reconsider x as Element of Image (f|R) by A6;
    consider a being Element of R such that
A8: (f|R).a = x by YELLOW_2:10;
A9: f.a = x by A8,Th6;
A10: a in the carrier of R;
    y = g.x by A7,Th6;
    hence thesis by A1,A2,A5,A3,A10,A9,FUNCT_1:32;
  end;
  hence h is Function of Image (f|R), R by A4,RELSET_1:4;
A11: rng (f|R) = the carrier of Image (f|R) by YELLOW_0:def 15;
A12: f|R is one-to-one by A1,Th7;
A13: now
    let x be object;
A14: dom (f|R) = the carrier of R by FUNCT_2:def 1;
    assume
A15: x in the carrier of Image (f|R);
    then consider y being object such that
A16: y in dom (f|R) and
A17: x = (f|R).y by A11,FUNCT_1:def 3;
A18: y = (f|R)".x by A12,A16,A17,FUNCT_1:32;
    x = f.y by A16,A17,Th6;
    then y = g.x by A1,A2,A5,A3,A16,A14,FUNCT_1:32;
    hence h.x = (f|R)".x by A15,A18,Th6;
  end;
  dom ((f|R)") = rng (f|R) by A12,FUNCT_1:33;
  hence thesis by A4,A11,A13,FUNCT_1:2;
end;
