reserve x, y, i for object,
  L for up-complete Semilattice;
reserve L for complete LATTICE,
  a, b, c for Element of L,
  J for non empty set,
  K for non-empty ManySortedSet of J;
reserve J, K, D for non empty set,
  j for Element of J,
  k for Element of K;
reserve J for non empty set,
  K for non-empty ManySortedSet of J;

theorem Th30:
  for A, B being set for f being Function of A, B, g being
  Function of B, A st g*f = id A holds (J => g)**(J => f) = id (J --> A)
proof
  let A, B be set;
  let f be Function of A, B;
  let g be Function of B, A;
  set F = (J => g)**(J => f);
  dom F = J by MSUALG_3:2;
  then reconsider F as ManySortedSet of J by PARTFUN1:def 2,RELAT_1:def 18;
  assume
A1: g*f = id A;
A2: for j being object st j in J holds F.j = id ((J --> A).j)
  proof
    let j be object;
    assume
A3: j in J;
    then
A4: (J --> A).j = A by FUNCOP_1:7;
    (J => g).j = g & (J => f).j = f by A3,FUNCOP_1:7;
    hence thesis by A1,A3,A4,MSUALG_3:2;
  end;
  now
    let j be object;
    assume j in J;
    then F.j = id ((J --> A).j) by A2;
    hence F.j is Function of (J --> A).j, (J --> A).j;
  end;
  then reconsider F as ManySortedFunction of (J --> A), (J --> A) by
PBOOLE:def 15;
  for j being set st j in J holds F.j = id ((J --> A).j) by A2;
  hence thesis by MSUALG_3:def 1;
end;
