reserve C for CatStr;
reserve f,g for Morphism of C;
reserve C for non void non empty CatStr,
  f,g for Morphism of C,
  a,b,c,d for Object of C;
reserve o,m for set;
reserve B,C,D for Category;
reserve a,b,c,d for Object of C;
reserve f,f1,f2,g,g1,g2 for Morphism of C;
reserve f,f1,f2 for Morphism of a,b;
reserve f9 for Morphism of b,a;
reserve g for Morphism of b,c;
reserve h,h1,h2 for Morphism of c,d;

theorem Th21:
  Hom(a,b)<>{} & Hom(b,c)<>{} & Hom(c,d)<>{} implies (h*g)*f=h*(g* f)
proof
  assume that
A1: Hom(a,b)<>{} and
A2: Hom(b,c)<>{} and
A3: Hom(c,d)<>{};
A4: Hom(a,c)<>{} by A1,A2,Th19;
  h in Hom(c,d) by A3,Def3;
  then
A5: dom(h) = c by Th1;
  g in Hom(b,c) by A2,Def3;
  then
A6: cod(g) = c & dom(g) = b by Th1;
  reconsider hh = h as Morphism of C;
  reconsider gg = g as Morphism of C;
  reconsider ff = f as Morphism of C;
  f in Hom(a,b) by A1,Def3;
  then
A7: cod(f) = b by Th1;
  Hom(b,d) <> {} by A2,A3,Th19;
  hence (h*g)*f = (h*g)(*)ff by A1,Def11
    .= (hh(*)gg)(*)ff by A2,A3,Def11
    .= hh(*)(gg(*)ff) by A5,A6,A7,Def6
    .= hh(*)(g*f) by A1,A2,Def11
    .= h*(g*f) by A3,A4,Def11;
end;
