reserve X,Y for set;
reserve Z for non empty set;

theorem
  for A, B being transitive with_units reflexive non empty AltCatStr
for F being feasible FunctorStr over A,B st F is bijective for G being feasible
  FunctorStr over B,A st the FunctorStr of G=F" holds F * G = id B
proof
  let A,B be transitive with_units reflexive non empty AltCatStr;
  set I1 = [:the carrier of A,the carrier of A:];
  set I2 = [:the carrier of B,the carrier of B:];
  let F be feasible FunctorStr over A,B such that
A1: F is bijective;
  consider k being ManySortedFunction of (the Arrows of A), (the Arrows of B)*
  the ObjectMap of F such that
A2: k = the MorphMap of F and
A3: the MorphMap of F" = k""*(the ObjectMap of F)" by A1,FUNCTOR0:def 38;
  F is injective by A1;
  then F is one-to-one;
  then
A4: (the ObjectMap of F) is one-to-one;
  set OM = the ObjectMap of F;
  F is surjective by A1;
  then F is onto;
  then (the ObjectMap of F) is onto;
  then
A5: rng OM = I2 by FUNCT_2:def 3;
  F is injective by A1;
  then
A6: F is faithful;
  then
A7: (the MorphMap of F) is "1-1";
  F is surjective by A1;
  then F is full onto;
  then consider
  f being ManySortedFunction of (the Arrows of A), (the Arrows of B)*
  the ObjectMap of F such that
A8: f = the MorphMap of F and
A9: f is "onto";
  let G be feasible FunctorStr over B,A such that
A10: the FunctorStr of G=F";
A11: (the ObjectMap of G) = (the ObjectMap of F)" by A1,A10,FUNCTOR0:def 38;
  the FunctorStr of G is bijective by A1,A10,FUNCTOR0:35;
  then the FunctorStr of G is surjective;
  then the FunctorStr of G is full onto;
  then
A12: the ObjectMap of G is onto;
  set OMG = the ObjectMap of G;
A13: dom OM = I1 by FUNCT_2:def 1;
  reconsider OM as bifunction of the carrier of A, the carrier of B;
A14: I2 = dom((f * OMG) ** (k"" * OMG)) by PARTFUN1:def 2;
A15: for i be object st i in I2 holds ((f * OMG) ** (k""* OMG)).i = (id (the
  Arrows of B)).i
  proof
    let i be object such that
A16: i in I2;
A17: dom(OMG) = I2 by FUNCT_2:def 1;
    then
A18: (f * OMG).i = k.(OMG.i) by A2,A8,A16,FUNCT_1:13;
    rng(OMG) = I1 by A12,FUNCT_2:def 3;
    then
A19: OMG.i in I1 by A16,A17,FUNCT_1:def 3;
    then
A20: rng (f.(OMG.i)) = ((the Arrows of B)*the ObjectMap of F).(OMG.i) by A9
      .= (the Arrows of B).((the ObjectMap of F).(OMG.i)) by A13,A19,FUNCT_1:13
;
A21: (the ObjectMap of F).(OMG.i) = (OM*OM").i by A11,A16,A17,FUNCT_1:13
      .= (id I2).i by A4,A5,FUNCT_1:39
      .= i by A16,FUNCT_1:18;
    f is "1-1" & dom(f) = I1 by A6,A8,PARTFUN1:def 2;
    then
A22: (f.(OMG.i)) is one-to-one by A19;
    (k"" * OMG).i = k"".(OMG.i) by A16,A17,FUNCT_1:13
      .= (k.(OMG.i))" by A7,A2,A8,A9,A19,MSUALG_3:def 4;
    then ( (f * OMG) ** (k"" * OMG) ).i = f.(OMG.i) * (f.(OMG.i))" by A2,A8,A14
,A16,A18,PBOOLE:def 19
      .= id ((the Arrows of B).i) by A22,A20,A21,FUNCT_1:39
      .= (id (the Arrows of B)).i by A16,MSUALG_3:def 1;
    hence thesis;
  end;
  the MorphMap of F*G = (f * OMG) ** (k""* OMG) by A10,A3,A8,A11,
FUNCTOR0:def 36;
  then
A23: the MorphMap of F*G = id (the Arrows of B) by A15;
  the ObjectMap of F*G = (the ObjectMap of F)*the ObjectMap of G by
FUNCTOR0:def 36;
  then
  the ObjectMap of F*G = (the ObjectMap of F)*(the ObjectMap of F)" by A1,A10,
FUNCTOR0:def 38;
  then the ObjectMap of F*G = id [:the carrier of B,the carrier of B:] by A4,A5
,FUNCT_1:39;
  hence thesis by A23,FUNCTOR0:def 29;
end;
