reserve UA for Universal_Algebra,
  f, g for Function of UA, UA;
reserve I for set,
  A, B, C for ManySortedSet of I;

theorem Th17:
  for A, B be non-empty ManySortedSet of I for F be
ManySortedFunction of A, B for G be ManySortedFunction of B, A st F is "1-1" &
  F is "onto" & G ** F = id A holds G = F""
proof
  let A, B be non-empty ManySortedSet of I;
  let F be ManySortedFunction of A, B;
  let G be ManySortedFunction of B, A;
  assume that
A1: F is "1-1" and
A2: F is "onto" and
A3: G ** F = id A;
  now
    let i be object;
    assume
A4: i in I;
    then reconsider f = F.i as Function of A.i, B.i by PBOOLE:def 15;
A5: f is one-to-one by A1,A4,MSUALG_3:1;
    reconsider g = G.i as Function of B.i, A.i by A4,PBOOLE:def 15;
    (G ** F).i = id (A.i) by A3,A4,MSUALG_3:def 1;
    then
A6: g*f = id (A.i) by A4,MSUALG_3:2;
    (F"").i = f" & rng f = B.i by A1,A2,A4,MSUALG_3:def 4;
    hence G.i = (F"").i by A4,A6,A5,FUNCT_2:30;
  end;
  hence thesis by PBOOLE:3;
end;
