reserve C for Category,
  C1,C2 for Subcategory of C;

theorem Th17:
  for X being categorial non empty set, Y being non empty set st
  (for A,B,C being Element of X
  for F being Functor of A,B, G being Functor of B,C st
  F in Y & G in Y holds G*F in Y) & (for A being Element of X holds id A in Y)
  ex C being strict Categorial Category st the carrier of C = X &
  for A,B being Element of X, F being Functor of A,B holds
  [[A,B],F] is Morphism of C iff F in Y
proof
  let X be categorial non empty set, Y be non empty set such that
A1: for A,B,C being Element of X
  for F being Functor of A,B, G being Functor of B,C st
  F in Y & G in Y holds G*F in Y and
A2: for A being Element of X holds id A in Y;
  set B = {b where b is Element of Y: b is Function};
  set a = the Element of X;
  id a in Y by A2;
  then id a in B;
  then reconsider B as non empty set;
  B is functional
  proof
    let x be object;
    assume x in B;
    then ex b being Element of Y st x = b & b is Function;
    hence thesis;
  end;
  then reconsider B as non empty functional set;
  reconsider A = X as non empty categorial set;
  defpred P[Element of A, Element of A, set] means $3 is Functor of $1, $2;
  deffunc F(Function,Function) = $1 * $2;
A3: for a,b,c being Element of A, f,g being Element of B st
  P[a,b,f] & P[b,c,g] holds F(g,f) in B & P[a,c,F(g,f)]
  proof
    let a,b,c be Element of A, f,g be Element of B;
    assume that
A4: P[a,b,f] and
A5: P[b,c,g];
    reconsider f as Functor of a,b by A4;
    reconsider g as Functor of b,c by A5;
A6: f in B;
A7: g in B;
A8: ex b being Element of Y st f = b & b is Function by A6;
    ex b being Element of Y st g = b & b is Function by A7;
    then g*f in Y by A1,A8;
    hence thesis;
  end;
A9: for a being Element of A ex f being Element of B st P[a,a,f] &
  for b being Element of A, g being Element of B holds
  (P[a,b,g] implies F(g,f) = g) & (P[b,a,g] implies F(f,g) = g)
  proof
    let a be Element of A;
    reconsider f = id a as Element of Y by A2;
    f in B;
    then reconsider f as Element of B;
    take f;
    thus P[a,a,f];
    let b be Element of A, g be Element of B;
    thus P[a,b,g] implies g*f = g by FUNCT_2:17;
    assume P[b,a,g];
    then reconsider G = g as Functor of b,a;
    (id a)*G = G by FUNCT_2:17;
    hence thesis;
  end;
A10: for a,b,c,d being Element of A, f,g,h being Element of B st
  P[a,b,f] & P[b,c,g] & P[c,d,h] holds F(h, F(g,f)) = F(F(h,g), f)
  by RELAT_1:36;
  consider C being strict with_triple-like_morphisms Category such that
A11: the carrier of C = A &
  (for a,b being Element of A, f being Element of B st
  P[a,b,f] holds [[a,b],f] is Morphism of C) & (for m being Morphism of C
  ex a,b being Element of A, f being Element of B st
  m = [[a,b],f] & P[a,b,f]) &
  for m1,m2 being (Morphism of C), a1,a2,a3 being Element of A,
  f1,f2 being Element of B st m1 = [[a1,a2],f1] & m2 = [[a2,a3],f2]
  holds m2(*)m1 = [[a1,a3], F(f2,f1)] from CatEx(A3,A9,A10);
  C is Categorial
  proof
    thus the carrier of C is categorial by A11;
    hereby
      let a be Object of C, D be Category;
      assume
A12:  a = D;
      then id D in Y by A2,A11;
      then id D in B;
      then reconsider f = id D as Element of B;
      reconsider x = a as Element of A by A11;
      reconsider F = [[x,x], f] as Morphism of C by A11,A12;
      consider b,c being Element of A, g being Element of B such that
A13:  id a = [[b,c],g] and
A14:  P[b,c,g] by A11;
A15:  dom id a = (id a)`11 by Th2;
A16:  (id a)`11 = b by A13,MCART_1:85;
      cod F = F`12 by Th2
        .= x by MCART_1:85;
      then F = (id a)(*)F by CAT_1:21
        .= [[x,c], g*id the carrier' of D] by A11,A13,A15,A16
        .= [[x,c], g] by A12,A14,A15,A16,FUNCT_2:17;
      hence id a = [[D,D], id D] by A12,A13,A15,MCART_1:85;
    end;
    hereby
      let m be Morphism of C;
      consider a,b being Element of A, f being Element of B such that
A17:  m = [[a,b],f] and
A18:  P[a,b,f] by A11;
A19:  dom m = m`11 by Th2;
A20:  cod m = m`12 by Th2;
A21:  dom m = a by A17,A19,MCART_1:85;
      cod m = b by A17,A20,MCART_1:85;
      hence for A,B being Category st A = dom m & B = cod m
      ex F being Functor of A,B st m = [[A,B], F] by A17,A18,A21;
    end;
    let m1,m2 be Morphism of C;
    consider a1,b1 being Element of A, f1 being Element of B such that
A22: m1 = [[a1,b1],f1] and P[a1,b1,f1] by A11;
    consider a2,b2 being Element of A, f2 being Element of B such that
A23: m2 = [[a2,b2],f2] and P[a2,b2,f2] by A11;
    let A,B,C be Category;
    let F be Functor of A,B;
    let G be Functor of B,C;
    assume that
A24: m1 = [[A,B],F] and
A25: m2 = [[B,C],G];
A26: [A,B] = [a1,b1] by A22,A24,XTUPLE_0:1;
A27: [B,C] = [a2,b2] by A23,A25,XTUPLE_0:1;
A28: f1 = F by A22,A24,XTUPLE_0:1;
A29: f2 = G by A23,A25,XTUPLE_0:1;
A30: A = a1 by A26,XTUPLE_0:1;
A31: B = b1 by A26,XTUPLE_0:1;
    C = b2 by A27,XTUPLE_0:1;
    hence thesis by A11,A22,A25,A28,A29,A30,A31;
  end;
  then reconsider C as Categorial strict Category;
  take C;
  thus the carrier of C = X by A11;
  let A9,B9 be Element of X, F be Functor of A9,B9;
  hereby
    assume [[A9,B9],F] is Morphism of C;
    then reconsider m = [[A9,B9],F] as Morphism of C;
    consider a,b being Element of A, f being Element of B such that
A32: m = [[a,b],f] and P[a,b,f] by A11;
    m`2 = f by A32;
    then F in B;
    then ex b being Element of Y st F = b & b is Function;
    hence F in Y;
  end;
  assume F in Y;
  then F in B;
  hence thesis by A11;
end;
