:: COMMACAT semantic presentation

deffunc H1( CatStr ) -> set = the Objects of a1;

deffunc H2( CatStr ) -> set = the Morphisms of a1;

definition
canceled;
canceled;
canceled;
canceled;
end;

:: deftheorem Def1 COMMACAT:def 1 :
canceled;

:: deftheorem Def2 COMMACAT:def 2 :
canceled;

:: deftheorem Def3 COMMACAT:def 3 :
canceled;

:: deftheorem Def4 COMMACAT:def 4 :
canceled;

theorem Th1: :: COMMACAT:1
canceled;

Lemma1: for b1, b2, b3, b4, b5, b6 being set holds
( [[b1,b2],b3] `11 = b1 & [[b1,b2],b3] `12 = b2 & [b4,[b5,b6]] `21 = b5 & [b4,[b5,b6]] `22 = b6 )
by MCART_1:89;

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
given c6 being Object of c1, c7 being Object of c2, c8 being Morphism of c3 such that E2: c8 in Hom (c4 . c6),(c5 . c7) ;
func commaObjs c4,c5 -> non empty Subset of [:[:the Objects of a1,the Objects of a2:],the Morphisms of a3:] equals :Def5: :: COMMACAT:def 5
{ [[b1,b2],b3] where B is Object of a1, B is Object of a2, B is Morphism of a3 : b3 in Hom (a4 . b1),(a5 . b2) } ;
coherence
{ [[b1,b2],b3] where B is Object of c1, B is Object of c2, B is Morphism of c3 : b3 in Hom (c4 . b1),(c5 . b2) } is non empty Subset of [:[:the Objects of c1,the Objects of c2:],the Morphisms of c3:]
proof end;
end;

:: deftheorem Def5 defines commaObjs COMMACAT:def 5 :
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3 holds
( ex b6 being Object of b1ex b7 being Object of b2ex b8 being Morphism of b3 st b8 in Hom (b4 . b6),(b5 . b7) implies commaObjs b4,b5 = { [[b6,b7],b8] where B is Object of b1, B is Object of b2, B is Morphism of b3 : b8 in Hom (b4 . b6),(b5 . b7) } );

theorem Th2: :: COMMACAT:2
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being Element of commaObjs b4,b5 holds
( ex b7 being Object of b1ex b8 being Object of b2ex b9 being Morphism of b3 st b9 in Hom (b4 . b7),(b5 . b8) implies ( 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 ) ) )
proof end;

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
given c6 being Object of c1, c7 being Object of c2, c8 being Morphism of c3 such that E4: c8 in Hom (c4 . c6),(c5 . c7) ;
func commaMorphs c4,c5 -> non empty Subset of [:[:(commaObjs a4,a5),(commaObjs a4,a5):],[:the Morphisms of a1,the Morphisms of a2:]:] equals :Def6: :: COMMACAT:def 6
{ [[b3,b4],[b1,b2]] where B is Morphism of a1, B is Morphism of a2, B is Element of commaObjs a4,a5, B 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 ) ) } ;
coherence
{ [[b3,b4],[b1,b2]] where B is Morphism of c1, B is Morphism of c2, B is Element of commaObjs c4,c5, B is Element of commaObjs c4,c5 : ( dom b1 = b3 `11 & cod b1 = b4 `11 & dom b2 = b3 `12 & cod b2 = b4 `12 & (b4 `2 ) * (c4 . b1) = (c5 . b2) * (b3 `2 ) ) } is non empty Subset of [:[:(commaObjs c4,c5),(commaObjs c4,c5):],[:the Morphisms of c1,the Morphisms of c2:]:]
proof end;
end;

:: deftheorem Def6 defines commaMorphs COMMACAT:def 6 :
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3 holds
( ex b6 being Object of b1ex b7 being Object of b2ex b8 being Morphism of b3 st b8 in Hom (b4 . b6),(b5 . b7) implies commaMorphs b4,b5 = { [[b8,b9],[b6,b7]] where B is Morphism of b1, B is Morphism of b2, B is Element of commaObjs b4,b5, B 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 ) ) } );

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
let c6 be Element of commaMorphs c4,c5;
redefine func `11 as c6 `11 -> Element of commaObjs a4,a5;
coherence
c6 `11 is Element of commaObjs c4,c5
proof end;
redefine func `12 as c6 `12 -> Element of commaObjs a4,a5;
coherence
c6 `12 is Element of commaObjs c4,c5
proof end;
end;

theorem Th3: :: COMMACAT:3
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being Element of commaMorphs b4,b5 holds
( ex b7 being Object of b1ex b8 being Object of b2ex b9 being Morphism of b3 st b9 in Hom (b4 . b7),(b5 . b8) implies ( 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 ) ) )
proof end;

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
let c6, c7 be Element of commaMorphs c4,c5;
given c8 being Object of c1, c9 being Object of c2, c10 being Morphism of c3 such that E6: c10 in Hom (c4 . c8),(c5 . c9) ;
assume E7: c6 `12 = c7 `11 ;
func c7 * c6 -> Element of commaMorphs a4,a5 equals :Def7: :: COMMACAT:def 7
[[(a6 `11 ),(a7 `12 )],[((a7 `21 ) * (a6 `21 )),((a7 `22 ) * (a6 `22 ))]];
coherence
[[(c6 `11 ),(c7 `12 )],[((c7 `21 ) * (c6 `21 )),((c7 `22 ) * (c6 `22 ))]] is Element of commaMorphs c4,c5
proof end;
end;

:: deftheorem Def7 defines * COMMACAT:def 7 :
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6, b7 being Element of commaMorphs b4,b5 holds
( ex b8 being Object of b1ex b9 being Object of b2ex b10 being Morphism of b3 st b10 in Hom (b4 . b8),(b5 . b9) & b6 `12 = b7 `11 implies b7 * b6 = [[(b6 `11 ),(b7 `12 )],[((b7 `21 ) * (b6 `21 )),((b7 `22 ) * (b6 `22 ))]] );

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
func commaComp c4,c5 -> PartFunc of [:(commaMorphs a4,a5),(commaMorphs a4,a5):], commaMorphs a4,a5 means :Def8: :: COMMACAT:def 8
( dom a6 = { [b1,b2] where B is Element of commaMorphs a4,a5, B is Element of commaMorphs a4,a5 : b1 `11 = b2 `12 } & ( for b1, b2 being Element of commaMorphs a4,a5 holds
( [b1,b2] in dom a6 implies a6 . [b1,b2] = b1 * b2 ) ) );
existence
ex b1 being PartFunc of [:(commaMorphs c4,c5),(commaMorphs c4,c5):], commaMorphs c4,c5 st
( dom b1 = { [b2,b3] where B is Element of commaMorphs c4,c5, B is Element of commaMorphs c4,c5 : b2 `11 = b3 `12 } & ( for b2, b3 being Element of commaMorphs c4,c5 holds
( [b2,b3] in dom b1 implies b1 . [b2,b3] = b2 * b3 ) ) )
proof end;
uniqueness
for b1, b2 being PartFunc of [:(commaMorphs c4,c5),(commaMorphs c4,c5):], commaMorphs c4,c5 holds
( dom b1 = { [b3,b4] where B is Element of commaMorphs c4,c5, B is Element of commaMorphs c4,c5 : b3 `11 = b4 `12 } & ( for b3, b4 being Element of commaMorphs c4,c5 holds
( [b3,b4] in dom b1 implies b1 . [b3,b4] = b3 * b4 ) ) & dom b2 = { [b3,b4] where B is Element of commaMorphs c4,c5, B is Element of commaMorphs c4,c5 : b3 `11 = b4 `12 } & ( for b3, b4 being Element of commaMorphs c4,c5 holds
( [b3,b4] in dom b2 implies b2 . [b3,b4] = b3 * b4 ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def8 defines commaComp COMMACAT:def 8 :
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3
for b6 being PartFunc of [:(commaMorphs b4,b5),(commaMorphs b4,b5):], commaMorphs b4,b5 holds
( b6 = commaComp b4,b5 iff ( dom b6 = { [b7,b8] where B is Element of commaMorphs b4,b5, B is Element of commaMorphs b4,b5 : b7 `11 = b8 `12 } & ( for b7, b8 being Element of commaMorphs b4,b5 holds
( [b7,b8] in dom b6 implies b6 . [b7,b8] = b7 * b8 ) ) ) );

definition
let c1, c2, c3 be Category;
let c4 be Functor of c1,c3;
let c5 be Functor of c2,c3;
given c6 being Object of c1, c7 being Object of c2, c8 being Morphism of c3 such that E8: c8 in Hom (c4 . c6),(c5 . c7) ;
func c4 comma c5 -> strict Category means :: COMMACAT:def 9
( the Objects of a6 = commaObjs a4,a5 & the Morphisms of a6 = commaMorphs a4,a5 & ( for b1 being Element of commaMorphs a4,a5 holds the Dom of a6 . b1 = b1 `11 ) & ( for b1 being Element of commaMorphs a4,a5 holds the Cod of a6 . b1 = b1 `12 ) & ( for b1 being Element of commaObjs a4,a5 holds the Id of a6 . b1 = [[b1,b1],[(id (b1 `11 )),(id (b1 `12 ))]] ) & the Comp of a6 = commaComp a4,a5 );
existence
ex b1 being strict Category st
( the Objects of b1 = commaObjs c4,c5 & the Morphisms of b1 = commaMorphs c4,c5 & ( for b2 being Element of commaMorphs c4,c5 holds the Dom of b1 . b2 = b2 `11 ) & ( for b2 being Element of commaMorphs c4,c5 holds the Cod of b1 . b2 = b2 `12 ) & ( for b2 being Element of commaObjs c4,c5 holds the Id of b1 . b2 = [[b2,b2],[(id (b2 `11 )),(id (b2 `12 ))]] ) & the Comp of b1 = commaComp c4,c5 )
proof end;
uniqueness
for b1, b2 being strict Category holds
( the Objects of b1 = commaObjs c4,c5 & the Morphisms of b1 = commaMorphs c4,c5 & ( for b3 being Element of commaMorphs c4,c5 holds the Dom of b1 . b3 = b3 `11 ) & ( for b3 being Element of commaMorphs c4,c5 holds the Cod of b1 . b3 = b3 `12 ) & ( for b3 being Element of commaObjs c4,c5 holds the Id of b1 . b3 = [[b3,b3],[(id (b3 `11 )),(id (b3 `12 ))]] ) & the Comp of b1 = commaComp c4,c5 & the Objects of b2 = commaObjs c4,c5 & the Morphisms of b2 = commaMorphs c4,c5 & ( for b3 being Element of commaMorphs c4,c5 holds the Dom of b2 . b3 = b3 `11 ) & ( for b3 being Element of commaMorphs c4,c5 holds the Cod of b2 . b3 = b3 `12 ) & ( for b3 being Element of commaObjs c4,c5 holds the Id of b2 . b3 = [[b3,b3],[(id (b3 `11 )),(id (b3 `12 ))]] ) & the Comp of b2 = commaComp c4,c5 implies b1 = b2 )
proof end;
end;

:: deftheorem Def9 defines comma COMMACAT:def 9 :
for b1, b2, b3 being Category
for b4 being Functor of b1,b3
for b5 being Functor of b2,b3 holds
( ex b6 being Object of b1ex b7 being Object of b2ex b8 being Morphism of b3 st b8 in Hom (b4 . b6),(b5 . b7) implies for b6 being strict Category holds
( b6 = b4 comma b5 iff ( the Objects of b6 = commaObjs b4,b5 & the Morphisms of b6 = commaMorphs b4,b5 & ( for b7 being Element of commaMorphs b4,b5 holds the Dom of b6 . b7 = b7 `11 ) & ( for b7 being Element of commaMorphs b4,b5 holds the Cod 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 ) ) );

theorem Th4: :: COMMACAT:4
for b1, b2 being set holds
( the Objects of (1Cat b2,b1) = {b2} & the Morphisms of (1Cat b2,b1) = {b1} ) ;

theorem Th5: :: COMMACAT:5
for b1, b2 being set
for b3, b4 being Object of (1Cat b2,b1) holds Hom b3,b4 = {b1}
proof end;

definition
let c1 be Category;
let c2 be Object of c1;
func 1Cat c2 -> strict Subcategory of a1 equals :: COMMACAT:def 10
1Cat a2,(id a2);
coherence
1Cat c2,(id c2) is strict Subcategory of c1
proof end;
end;

:: deftheorem Def10 defines 1Cat COMMACAT:def 10 :
for b1 being Category
for b2 being Object of b1 holds 1Cat b2 = 1Cat b2,(id b2);

definition
let c1 be Category;
let c2 be Object of c1;
func c2 comma c1 -> strict Category equals :: COMMACAT:def 11
(incl (1Cat a2)) comma (id a1);
coherence
(incl (1Cat c2)) comma (id c1) is strict Category
;
func c1 comma c2 -> strict Category equals :: COMMACAT:def 12
(id a1) comma (incl (1Cat a2));
coherence
(id c1) comma (incl (1Cat c2)) is strict Category
;
end;

:: deftheorem Def11 defines comma COMMACAT:def 11 :
for b1 being Category
for b2 being Object of b1 holds b2 comma b1 = (incl (1Cat b2)) comma (id b1);

:: deftheorem Def12 defines comma COMMACAT:def 12 :
for b1 being Category
for b2 being Object of b1 holds b1 comma b2 = (id b1) comma (incl (1Cat b2));