Article COMMACAT, MML version 4.99.1005

:: COMMACAT:funcnot 1 => COMMACAT:func 1
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  assume ex b1 being Element of the Vertices of a1 st
       ex b2 being Element of the Vertices of a2 st
          ex b3 being Element of the Edges of a3 st
             b3 in Hom(a4 . b1,a5 . b2);
  func commaObjs(A4,A5) -> non empty Element of bool [:[:the Vertices of a1,the Vertices of a2:],the Edges of a3:] equals
    {[[b1,b2],b3] where b1 is Element of the Vertices of a1, b2 is Element of the Vertices of a2, b3 is Element of the Edges of a3: b3 in Hom(a4 . b1,a5 . b2)};
end;

:: COMMACAT:def 5
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
      st ex b6 being Element of the Vertices of b1 st
           ex b7 being Element of the Vertices of b2 st
              ex b8 being Element of the Edges of b3 st
                 b8 in Hom(b4 . b6,b5 . b7)
   holds commaObjs(b4,b5) = {[[b6,b7],b8] where b6 is Element of the Vertices of b1, b7 is Element of the Vertices of b2, b8 is Element of the Edges of b3: b8 in Hom(b4 . b6,b5 . b7)};

:: COMMACAT:th 2
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being Element of commaObjs(b4,b5)
      st ex b7 being Element of the Vertices of b1 st
           ex b8 being Element of the Vertices of b2 st
              ex b9 being Element of the Edges of b3 st
                 b9 in Hom(b4 . b7,b5 . b8)
   holds b6 = [[b6 `11,b6 `12],b6 `2] &
    b6 `2 in Hom(b4 . (b6 `11),b5 . (b6 `12)) &
    dom (b6 `2) = b4 . (b6 `11) &
    cod (b6 `2) = b5 . (b6 `12);

:: COMMACAT:funcnot 2 => COMMACAT:func 2
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  assume ex b1 being Element of the Vertices of a1 st
       ex b2 being Element of the Vertices of a2 st
          ex b3 being Element of the Edges of a3 st
             b3 in Hom(a4 . b1,a5 . b2);
  func commaMorphs(A4,A5) -> non empty Element of bool [:[:commaObjs(a4,a5),commaObjs(a4,a5):],[:the Edges of a1,the Edges of a2:]:] equals
    {[[b3,b4],[b1,b2]] where b1 is Element of the Edges of a1, b2 is Element of the Edges of a2, b3 is Element of commaObjs(a4,a5), b4 is Element of commaObjs(a4,a5): dom b1 = b3 `11 &
     cod b1 = b4 `11 &
     dom b2 = b3 `12 &
     cod b2 = b4 `12 &
     b4 `2 * (a4 . b1) = (a5 . b2) * (b3 `2)};
end;

:: COMMACAT:def 6
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
      st ex b6 being Element of the Vertices of b1 st
           ex b7 being Element of the Vertices of b2 st
              ex b8 being Element of the Edges of b3 st
                 b8 in Hom(b4 . b6,b5 . b7)
   holds commaMorphs(b4,b5) = {[[b8,b9],[b6,b7]] where b6 is Element of the Edges of b1, b7 is Element of the Edges of b2, b8 is Element of commaObjs(b4,b5), b9 is Element of commaObjs(b4,b5): dom b6 = b8 `11 &
    cod b6 = b9 `11 &
    dom b7 = b8 `12 &
    cod b7 = b9 `12 &
    b9 `2 * (b4 . b6) = (b5 . b7) * (b8 `2)};

:: COMMACAT:funcnot 3 => COMMACAT:func 3
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  let a6 be Element of commaMorphs(a4,a5);
  redefine func a6 `11 -> Element of commaObjs(a4,a5);
end;

:: COMMACAT:funcnot 4 => COMMACAT:func 4
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  let a6 be Element of commaMorphs(a4,a5);
  redefine func a6 `12 -> Element of commaObjs(a4,a5);
end;

:: COMMACAT:th 3
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being Element of commaMorphs(b4,b5)
      st ex b7 being Element of the Vertices of b1 st
           ex b8 being Element of the Vertices of b2 st
              ex b9 being Element of the Edges of b3 st
                 b9 in Hom(b4 . b7,b5 . b8)
   holds b6 = [[b6 `11,b6 `12],[b6 `21,b6 `22]] &
    dom (b6 `21) = b6 `11 `11 &
    cod (b6 `21) = b6 `12 `11 &
    dom (b6 `22) = b6 `11 `12 &
    cod (b6 `22) = b6 `12 `12 &
    b6 `12 `2 * (b4 . (b6 `21)) = (b5 . (b6 `22)) * (b6 `11 `2);

:: COMMACAT:funcnot 5 => COMMACAT:func 5
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  let a6, a7 be Element of commaMorphs(a4,a5);
  assume (ex b1 being Element of the Vertices of a1 st
        ex b2 being Element of the Vertices of a2 st
           ex b3 being Element of the Edges of a3 st
              b3 in Hom(a4 . b1,a5 . b2)) &
     a6 `12 = a7 `11;
  func A7 * A6 -> Element of commaMorphs(a4,a5) equals
    [[a6 `11,a7 `12],[a7 `21 * (a6 `21),a7 `22 * (a6 `22)]];
end;

:: COMMACAT:def 7
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6, b7 being Element of commaMorphs(b4,b5)
      st (ex b8 being Element of the Vertices of b1 st
            ex b9 being Element of the Vertices of b2 st
               ex b10 being Element of the Edges of b3 st
                  b10 in Hom(b4 . b8,b5 . b9)) &
         b6 `12 = b7 `11
   holds b7 * b6 = [[b6 `11,b7 `12],[b7 `21 * (b6 `21),b7 `22 * (b6 `22)]];

:: COMMACAT:funcnot 6 => COMMACAT:func 6
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  func commaComp(A4,A5) -> Function-like Relation of [:commaMorphs(a4,a5),commaMorphs(a4,a5):],commaMorphs(a4,a5) means
    proj1 it = {[b1,b2] where b1 is Element of commaMorphs(a4,a5), b2 is Element of commaMorphs(a4,a5): b1 `11 = b2 `12} &
     (for b1, b2 being Element of commaMorphs(a4,a5)
           st [b1,b2] in proj1 it
        holds it . [b1,b2] = b1 * b2);
end;

:: COMMACAT:def 8
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being Function-like Relation of [:commaMorphs(b4,b5),commaMorphs(b4,b5):],commaMorphs(b4,b5) holds
      b6 = commaComp(b4,b5)
   iff
      proj1 b6 = {[b7,b8] where b7 is Element of commaMorphs(b4,b5), b8 is Element of commaMorphs(b4,b5): b7 `11 = b8 `12} &
       (for b7, b8 being Element of commaMorphs(b4,b5)
             st [b7,b8] in proj1 b6
          holds b6 . [b7,b8] = b7 * b8);

:: COMMACAT:funcnot 7 => COMMACAT:func 7
definition
  let a1, a2, a3 be non void Category-like CatStr;
  let a4 be Functor of a1,a3;
  let a5 be Functor of a2,a3;
  assume ex b1 being Element of the Vertices of a1 st
       ex b2 being Element of the Vertices of a2 st
          ex b3 being Element of the Edges of a3 st
             b3 in Hom(a4 . b1,a5 . b2);
  func A4 comma A5 -> strict non void Category-like CatStr means
    the Vertices of it = commaObjs(a4,a5) &
     the Edges of it = commaMorphs(a4,a5) &
     (for b1 being Element of commaMorphs(a4,a5) holds
        (the Source of it) . b1 = b1 `11) &
     (for b1 being Element of commaMorphs(a4,a5) holds
        (the Target of it) . b1 = b1 `12) &
     (for b1 being Element of commaObjs(a4,a5) holds
        (the Id of it) . b1 = [[b1,b1],[id (b1 `11),id (b1 `12)]]) &
     the Comp of it = commaComp(a4,a5);
end;

:: COMMACAT:def 9
theorem
for b1, b2, b3 being non void Category-like CatStr
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
   st ex b6 being Element of the Vertices of b1 st
        ex b7 being Element of the Vertices of b2 st
           ex b8 being Element of the Edges of b3 st
              b8 in Hom(b4 . b6,b5 . b7)
for b6 being strict non void Category-like CatStr holds
      b6 = b4 comma b5
   iff
      the Vertices of b6 = commaObjs(b4,b5) &
       the Edges of b6 = commaMorphs(b4,b5) &
       (for b7 being Element of commaMorphs(b4,b5) holds
          (the Source of b6) . b7 = b7 `11) &
       (for b7 being Element of commaMorphs(b4,b5) holds
          (the Target of b6) . b7 = b7 `12) &
       (for b7 being Element of commaObjs(b4,b5) holds
          (the Id of b6) . b7 = [[b7,b7],[id (b7 `11),id (b7 `12)]]) &
       the Comp of b6 = commaComp(b4,b5);

:: COMMACAT:th 4
theorem
for b1, b2 being set holds
the Vertices of 1Cat(b2,b1) = {b2} & the Edges of 1Cat(b2,b1) = {b1};

:: COMMACAT:th 5
theorem
for b1, b2 being set
for b3, b4 being Element of the Vertices of 1Cat(b2,b1) holds
Hom(b3,b4) = {b1};

:: COMMACAT:funcnot 8 => COMMACAT:func 8
definition
  let a1 be non void Category-like CatStr;
  let a2 be Element of the Vertices of a1;
  func 1Cat A2 -> strict Subcategory of a1 equals
    1Cat(a2,id a2);
end;

:: COMMACAT:def 10
theorem
for b1 being non void Category-like CatStr
for b2 being Element of the Vertices of b1 holds
   1Cat b2 = 1Cat(b2,id b2);

:: COMMACAT:funcnot 9 => COMMACAT:func 9
definition
  let a1 be non void Category-like CatStr;
  let a2 be Element of the Vertices of a1;
  func A2 comma A1 -> strict non void Category-like CatStr equals
    (incl 1Cat a2) comma id a1;
end;

:: COMMACAT:def 11
theorem
for b1 being non void Category-like CatStr
for b2 being Element of the Vertices of b1 holds
   b2 comma b1 = (incl 1Cat b2) comma id b1;

:: COMMACAT:funcnot 10 => COMMACAT:func 10
definition
  let a1 be non void Category-like CatStr;
  let a2 be Element of the Vertices of a1;
  func A1 comma A2 -> strict non void Category-like CatStr equals
    (id a1) comma incl 1Cat a2;
end;

:: COMMACAT:def 12
theorem
for b1 being non void Category-like CatStr
for b2 being Element of the Vertices of b1 holds
   b1 comma b2 = (id b1) comma incl 1Cat b2;