:: YELLOW18 semantic presentation

scheme :: YELLOW18:sch 1
s1{ F1() -> non empty set , F2( set , set ) -> set , F3( set , set , set , set , set ) -> set } :
ex b1 being non empty transitive strict AltCatStr st
( the carrier of b1 = F1() & ( for b2, b3 being object of b1 holds <^b2,b3^> = F2(b2,b3) ) & ( for b2, b3, b4 being object of b1 st <^b2,b3^> <> {} & <^b3,b4^> <> {} holds
for b5 being Morphism of b2,b3
for b6 being Morphism of b3,b4 holds b6 * b5 = F3(b2,b3,b4,b5,b6) ) )
provided
E1: for b1, b2, b3 being Element of F1()
for b4, b5 being set st b4 in F2(b1,b2) & b5 in F2(b2,b3) holds
F3(b1,b2,b3,b4,b5) in F2(b1,b3)
proof end;

scheme :: YELLOW18:sch 2
s2{ F1() -> non empty transitive AltCatStr , F2( set , set , set , set , set ) -> set } :
F1() is associative
provided
E1: for b1, b2, b3 being object of F1() st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 holds b5 * b4 = F2(b1,b2,b3,b4,b5) and
E2: for b1, b2, b3, b4 being object of F1()
for b5, b6, b7 being set st b5 in <^b1,b2^> & b6 in <^b2,b3^> & b7 in <^b3,b4^> holds
F2(b1,b3,b4,F2(b1,b2,b3,b5,b6),b7) = F2(b1,b2,b4,b5,F2(b2,b3,b4,b6,b7))
proof end;

scheme :: YELLOW18:sch 3
s3{ F1() -> non empty transitive AltCatStr , F2( set , set , set , set , set ) -> set } :
F1() is with_units
provided
E1: for b1, b2, b3 being object of F1() st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 holds b5 * b4 = F2(b1,b2,b3,b4,b5) and
E2: for b1 being object of F1() ex b2 being set st
( b2 in <^b1,b1^> & ( for b3 being object of F1()
for b4 being set st b4 in <^b1,b3^> holds
F2(b1,b1,b3,b2,b4) = b4 ) ) and
E3: for b1 being object of F1() ex b2 being set st
( b2 in <^b1,b1^> & ( for b3 being object of F1()
for b4 being set st b4 in <^b3,b1^> holds
F2(b3,b1,b1,b4,b2) = b4 ) )
proof end;

scheme :: YELLOW18:sch 4
s4{ F1() -> non empty set , F2( set , set ) -> set , F3( set , set , set , set , set ) -> set } :
ex b1 being strict category st
( the carrier of b1 = F1() & ( for b2, b3 being object of b1 holds <^b2,b3^> = F2(b2,b3) ) & ( for b2, b3, b4 being object of b1 st <^b2,b3^> <> {} & <^b3,b4^> <> {} holds
for b5 being Morphism of b2,b3
for b6 being Morphism of b3,b4 holds b6 * b5 = F3(b2,b3,b4,b5,b6) ) )
provided
E1: for b1, b2, b3 being Element of F1()
for b4, b5 being set st b4 in F2(b1,b2) & b5 in F2(b2,b3) holds
F3(b1,b2,b3,b4,b5) in F2(b1,b3) and
E2: for b1, b2, b3, b4 being Element of F1()
for b5, b6, b7 being set st b5 in F2(b1,b2) & b6 in F2(b2,b3) & b7 in F2(b3,b4) holds
F3(b1,b3,b4,F3(b1,b2,b3,b5,b6),b7) = F3(b1,b2,b4,b5,F3(b2,b3,b4,b6,b7)) and
E3: for b1 being Element of F1() ex b2 being set st
( b2 in F2(b1,b1) & ( for b3 being Element of F1()
for b4 being set st b4 in F2(b1,b3) holds
F3(b1,b1,b3,b2,b4) = b4 ) ) and
E4: for b1 being Element of F1() ex b2 being set st
( b2 in F2(b1,b1) & ( for b3 being Element of F1()
for b4 being set st b4 in F2(b3,b1) holds
F3(b3,b1,b1,b4,b2) = b4 ) )
proof end;

scheme :: YELLOW18:sch 5
s5{ F1() -> non empty set , F2( set , set ) -> set , F3( set , set , set , set , set ) -> set } :
for b1, b2 being non empty transitive AltCatStr st the carrier of b1 = F1() & ( for b3, b4 being object of b1 holds <^b3,b4^> = F2(b3,b4) ) & ( for b3, b4, b5 being object of b1 st <^b3,b4^> <> {} & <^b4,b5^> <> {} holds
for b6 being Morphism of b3,b4
for b7 being Morphism of b4,b5 holds b7 * b6 = F3(b3,b4,b5,b6,b7) ) & the carrier of b2 = F1() & ( for b3, b4 being object of b2 holds <^b3,b4^> = F2(b3,b4) ) & ( for b3, b4, b5 being object of b2 st <^b3,b4^> <> {} & <^b4,b5^> <> {} holds
for b6 being Morphism of b3,b4
for b7 being Morphism of b4,b5 holds b7 * b6 = F3(b3,b4,b5,b6,b7) ) holds
AltCatStr(# the carrier of b1,the Arrows of b1,the Comp of b1 #) = AltCatStr(# the carrier of b2,the Arrows of b2,the Comp of b2 #)
proof end;

scheme :: YELLOW18:sch 6
s6{ F1() -> non empty set , P1[ set , set , set ], F2( set , set ) -> set , F3( set , set , set , set , set ) -> set } :
ex b1 being strict category st
( the carrier of b1 = F1() & ( for b2, b3 being object of b1
for b4 being set holds
( b4 in <^b2,b3^> iff ( b4 in F2(b2,b3) & P1[b2,b3,b4] ) ) ) & ( for b2, b3, b4 being object of b1 st <^b2,b3^> <> {} & <^b3,b4^> <> {} holds
for b5 being Morphism of b2,b3
for b6 being Morphism of b3,b4 holds b6 * b5 = F3(b2,b3,b4,b5,b6) ) )
provided
E1: for b1, b2, b3 being Element of F1()
for b4, b5 being set st b4 in F2(b1,b2) & P1[b1,b2,b4] & b5 in F2(b2,b3) & P1[b2,b3,b5] holds
( F3(b1,b2,b3,b4,b5) in F2(b1,b3) & P1[b1,b3,F3(b1,b2,b3,b4,b5)] ) and
E2: for b1, b2, b3, b4 being Element of F1()
for b5, b6, b7 being set st b5 in F2(b1,b2) & P1[b1,b2,b5] & b6 in F2(b2,b3) & P1[b2,b3,b6] & b7 in F2(b3,b4) & P1[b3,b4,b7] holds
F3(b1,b3,b4,F3(b1,b2,b3,b5,b6),b7) = F3(b1,b2,b4,b5,F3(b2,b3,b4,b6,b7)) and
E3: for b1 being Element of F1() ex b2 being set st
( b2 in F2(b1,b1) & P1[b1,b1,b2] & ( for b3 being Element of F1()
for b4 being set st b4 in F2(b1,b3) & P1[b1,b3,b4] holds
F3(b1,b1,b3,b2,b4) = b4 ) ) and
E4: for b1 being Element of F1() ex b2 being set st
( b2 in F2(b1,b1) & P1[b1,b1,b2] & ( for b3 being Element of F1()
for b4 being set st b4 in F2(b3,b1) & P1[b3,b1,b4] holds
F3(b3,b1,b1,b4,b2) = b4 ) )
proof end;

registration
let c1 be Function-yielding Function;
let c2, c3, c4 be set ;
cluster a1 . a2,a3,a4 -> Relation-like Function-like ;
coherence
( c1 . c2,c3,c4 is Relation-like & c1 . c2,c3,c4 is Function-like )
proof end;
end;

scheme :: YELLOW18:sch 7
s7{ F1() -> category, P1[ set ], P2[ set , set , set ] } :
ex b1 being non empty strict subcategory of F1() st
( ( for b2 being object of F1() holds
( b2 is object of b1 iff P1[b2] ) ) & ( for b2, b3 being object of F1()
for b4, b5 being object of b1 st b4 = b2 & b5 = b3 & <^b2,b3^> <> {} holds
for b6 being Morphism of b2,b3 holds
( b6 in <^b4,b5^> iff P2[b2,b3,b6] ) ) )
provided
E1: ex b1 being object of F1() st P1[b1] and
E2: for b1, b2, b3 being object of F1() st P1[b1] & P1[b2] & P1[b3] & <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 st P2[b1,b2,b4] & P2[b2,b3,b5] holds
P2[b1,b3,b5 * b4] and
E3: for b1 being object of F1() st P1[b1] holds
P2[b1,b1, idm b1]
proof end;

scheme :: YELLOW18:sch 8
s8{ F1() -> category, F2() -> category, F3( set ) -> set , F4( set , set , set ) -> set } :
ex b1 being strict covariant Functor of F1(),F2() st
( ( for b2 being object of F1() holds b1 . b2 = F3(b2) ) & ( for b2, b3 being object of F1() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F4(b2,b3,b4) ) )
provided
E1: for b1 being object of F1() holds F3(b1) is object of F2() and
E2: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F4(b1,b2,b3) in the Arrows of F2() . F3(b1),F3(b2) and
E3: for b1, b2, b3 being object of F1() st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3
for b6, b7, b8 being object of F2() st b6 = F3(b1) & b7 = F3(b2) & b8 = F3(b3) holds
for b9 being Morphism of b6,b7
for b10 being Morphism of b7,b8 st b9 = F4(b1,b2,b4) & b10 = F4(b2,b3,b5) holds
F4(b1,b3,(b5 * b4)) = b10 * b9 and
E4: for b1 being object of F1()
for b2 being object of F2() st b2 = F3(b1) holds
F4(b1,b1,(idm b1)) = idm b2
proof end;

theorem Th1: :: YELLOW18:1
for b1, b2 being category
for b3, b4 being covariant Functor of b1,b2 st ( for b5 being object of b1 holds b3 . b5 = b4 . b5 ) & ( for b5, b6 being object of b1 st <^b5,b6^> <> {} holds
for b7 being Morphism of b5,b6 holds b3 . b7 = b4 . b7 ) holds
FunctorStr(# the ObjectMap of b3,the MorphMap of b3 #) = FunctorStr(# the ObjectMap of b4,the MorphMap of b4 #)
proof end;

scheme :: YELLOW18:sch 9
s9{ F1() -> category, F2() -> category, F3( set ) -> set , F4( set , set , set ) -> set } :
ex b1 being strict contravariant Functor of F1(),F2() st
( ( for b2 being object of F1() holds b1 . b2 = F3(b2) ) & ( for b2, b3 being object of F1() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F4(b2,b3,b4) ) )
provided
E2: for b1 being object of F1() holds F3(b1) is object of F2() and
E3: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F4(b1,b2,b3) in the Arrows of F2() . F3(b2),F3(b1) and
E4: for b1, b2, b3 being object of F1() st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3
for b6, b7, b8 being object of F2() st b6 = F3(b1) & b7 = F3(b2) & b8 = F3(b3) holds
for b9 being Morphism of b7,b6
for b10 being Morphism of b8,b7 st b9 = F4(b1,b2,b4) & b10 = F4(b2,b3,b5) holds
F4(b1,b3,(b5 * b4)) = b9 * b10 and
E5: for b1 being object of F1()
for b2 being object of F2() st b2 = F3(b1) holds
F4(b1,b1,(idm b1)) = idm b2
proof end;

theorem Th2: :: YELLOW18:2
for b1, b2 being category
for b3, b4 being contravariant Functor of b1,b2 st ( for b5 being object of b1 holds b3 . b5 = b4 . b5 ) & ( for b5, b6 being object of b1 st <^b5,b6^> <> {} holds
for b7 being Morphism of b5,b6 holds b3 . b7 = b4 . b7 ) holds
FunctorStr(# the ObjectMap of b3,the MorphMap of b3 #) = FunctorStr(# the ObjectMap of b4,the MorphMap of b4 #)
proof end;

definition
let c1, c2, c3 be non empty set ;
let c4 be Function of [:c1,c2:],c3;
redefine attr one-to-one as a4 is one-to-one means :: YELLOW18:def 1
for b1, b2 being Element of a1
for b3, b4 being Element of a2 st a4 . b1,b3 = a4 . b2,b4 holds
( b1 = b2 & b3 = b4 );
compatibility
( c4 is one-to-one iff for b1, b2 being Element of c1
for b3, b4 being Element of c2 st c4 . b1,b3 = c4 . b2,b4 holds
( b1 = b2 & b3 = b4 ) )
proof end;
end;

:: deftheorem Def1 defines one-to-one YELLOW18:def 1 :
for b1, b2, b3 being non empty set
for b4 being Function of [:b1,b2:],b3 holds
( b4 is one-to-one iff for b5, b6 being Element of b1
for b7, b8 being Element of b2 st b4 . b5,b7 = b4 . b6,b8 holds
( b5 = b6 & b7 = b8 ) );

scheme :: YELLOW18:sch 10
s10{ F1() -> category, F2() -> category, F3() -> covariant Functor of F1(),F2(), F4( set ) -> set , F5( set , set , set ) -> set } :
F3() is bijective
provided
E3: for b1 being object of F1() holds F3() . b1 = F4(b1) and
E4: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F3() . b3 = F5(b1,b2,b3) and
E5: for b1, b2 being object of F1() st F4(b1) = F4(b2) holds
b1 = b2 and
E6: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3, b4 being Morphism of b1,b2 st F5(b1,b2,b3) = F5(b1,b2,b4) holds
b3 = b4 and
E7: for b1, b2 being object of F2() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 ex b4, b5 being object of F1()ex b6 being Morphism of b4,b5 st
( b1 = F4(b4) & b2 = F4(b5) & <^b4,b5^> <> {} & b3 = F5(b4,b5,b6) )
proof end;

scheme :: YELLOW18:sch 11
s11{ F1() -> category, F2() -> category, F3( set ) -> set , F4( set , set , set ) -> set } :
F1(),F2() are_isomorphic
provided
E3: ex b1 being covariant Functor of F1(),F2() st
( ( for b2 being object of F1() holds b1 . b2 = F3(b2) ) & ( for b2, b3 being object of F1() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F4(b2,b3,b4) ) ) and
E4: for b1, b2 being object of F1() st F3(b1) = F3(b2) holds
b1 = b2 and
E5: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3, b4 being Morphism of b1,b2 st F4(b1,b2,b3) = F4(b1,b2,b4) holds
b3 = b4 and
E6: for b1, b2 being object of F2() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 ex b4, b5 being object of F1()ex b6 being Morphism of b4,b5 st
( b1 = F3(b4) & b2 = F3(b5) & <^b4,b5^> <> {} & b3 = F4(b4,b5,b6) )
proof end;

scheme :: YELLOW18:sch 12
s12{ F1() -> category, F2() -> category, F3() -> contravariant Functor of F1(),F2(), F4( set ) -> set , F5( set , set , set ) -> set } :
F3() is bijective
provided
E3: for b1 being object of F1() holds F3() . b1 = F4(b1) and
E4: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F3() . b3 = F5(b1,b2,b3) and
E5: for b1, b2 being object of F1() st F4(b1) = F4(b2) holds
b1 = b2 and
E6: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3, b4 being Morphism of b1,b2 st F5(b1,b2,b3) = F5(b1,b2,b4) holds
b3 = b4 and
E7: for b1, b2 being object of F2() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 ex b4, b5 being object of F1()ex b6 being Morphism of b4,b5 st
( b2 = F4(b4) & b1 = F4(b5) & <^b4,b5^> <> {} & b3 = F5(b4,b5,b6) )
proof end;

scheme :: YELLOW18:sch 13
s13{ F1() -> category, F2() -> category, F3( set ) -> set , F4( set , set , set ) -> set } :
F1(),F2() are_anti-isomorphic
provided
E3: ex b1 being contravariant Functor of F1(),F2() st
( ( for b2 being object of F1() holds b1 . b2 = F3(b2) ) & ( for b2, b3 being object of F1() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F4(b2,b3,b4) ) ) and
E4: for b1, b2 being object of F1() st F3(b1) = F3(b2) holds
b1 = b2 and
E5: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3, b4 being Morphism of b1,b2 st F4(b1,b2,b3) = F4(b1,b2,b4) holds
b3 = b4 and
E6: for b1, b2 being object of F2() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 ex b4, b5 being object of F1()ex b6 being Morphism of b4,b5 st
( b2 = F3(b4) & b1 = F3(b5) & <^b4,b5^> <> {} & b3 = F4(b4,b5,b6) )
proof end;

definition
let c1, c2 be category;
pred c1,c2 are_equivalent means :: YELLOW18:def 2
ex b1 being covariant Functor of a1,a2ex b2 being covariant Functor of a2,a1 st
( b2 * b1, id a1 are_naturally_equivalent & b1 * b2, id a2 are_naturally_equivalent );
reflexivity
for b1 being category ex b2, b3 being covariant Functor of b1,b1 st
( b3 * b2, id b1 are_naturally_equivalent & b2 * b3, id b1 are_naturally_equivalent )
proof end;
symmetry
for b1, b2 being category st ex b3 being covariant Functor of b1,b2ex b4 being covariant Functor of b2,b1 st
( b4 * b3, id b1 are_naturally_equivalent & b3 * b4, id b2 are_naturally_equivalent ) holds
ex b3 being covariant Functor of b2,b1ex b4 being covariant Functor of b1,b2 st
( b4 * b3, id b2 are_naturally_equivalent & b3 * b4, id b1 are_naturally_equivalent )
;
end;

:: deftheorem Def2 defines are_equivalent YELLOW18:def 2 :
for b1, b2 being category holds
( b1,b2 are_equivalent iff ex b3 being covariant Functor of b1,b2ex b4 being covariant Functor of b2,b1 st
( b4 * b3, id b1 are_naturally_equivalent & b3 * b4, id b2 are_naturally_equivalent ) );

theorem Th3: :: YELLOW18:3
for b1, b2, b3 being non empty reflexive AltGraph
for b4, b5 being feasible FunctorStr of b1,b2
for b6, b7 being FunctorStr of b2,b3 st FunctorStr(# the ObjectMap of b4,the MorphMap of b4 #) = FunctorStr(# the ObjectMap of b5,the MorphMap of b5 #) & FunctorStr(# the ObjectMap of b6,the MorphMap of b6 #) = FunctorStr(# the ObjectMap of b7,the MorphMap of b7 #) holds
b6 * b4 = b7 * b5
proof end;

theorem Th4: :: YELLOW18:4
for b1, b2, b3 being category st b1,b2 are_equivalent & b2,b3 are_equivalent holds
b1,b3 are_equivalent
proof end;

theorem Th5: :: YELLOW18:5
for b1, b2 being category st b1,b2 are_isomorphic holds
b1,b2 are_equivalent
proof end;

scheme :: YELLOW18:sch 14
s14{ F1() -> category, F2() -> category, F3() -> covariant Functor of F1(),F2(), F4() -> covariant Functor of F1(),F2(), F5( set ) -> set } :
ex b1 being natural_transformation of F3(),F4() st
( F3() is_naturally_transformable_to F4() & ( for b2 being object of F1() holds b1 ! b2 = F5(b2) ) )
provided
E6: for b1 being object of F1() holds F5(b1) in <^(F3() . b1),(F4() . b1)^> and
E7: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2
for b4 being Morphism of (F3() . b1),(F4() . b1) st b4 = F5(b1) holds
for b5 being Morphism of (F3() . b2),(F4() . b2) st b5 = F5(b2) holds
b5 * (F3() . b3) = (F4() . b3) * b4
proof end;

scheme :: YELLOW18:sch 15
s15{ F1() -> category, F2() -> category, F3() -> covariant Functor of F1(),F2(), F4() -> covariant Functor of F1(),F2(), F5( set ) -> set } :
ex b1 being natural_equivalence of F3(),F4() st
( F3(),F4() are_naturally_equivalent & ( for b2 being object of F1() holds b1 ! b2 = F5(b2) ) )
provided
E6: for b1 being object of F1() holds
( F5(b1) in <^(F3() . b1),(F4() . b1)^> & <^(F4() . b1),(F3() . b1)^> <> {} & ( for b2 being Morphism of (F3() . b1),(F4() . b1) st b2 = F5(b1) holds
b2 is iso ) ) and
E7: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2
for b4 being Morphism of (F3() . b1),(F4() . b1) st b4 = F5(b1) holds
for b5 being Morphism of (F3() . b2),(F4() . b2) st b5 = F5(b2) holds
b5 * (F3() . b3) = (F4() . b3) * b4
proof end;

definition
let c1, c2 be non empty AltCatStr ;
pred c1,c2 are_opposite means :Def3: :: YELLOW18:def 3
( the carrier of a2 = the carrier of a1 & the Arrows of a2 = ~ the Arrows of a1 & ( for b1, b2, b3 being object of a1
for b4, b5, b6 being object of a2 st b4 = b1 & b5 = b2 & b6 = b3 holds
the Comp of a2 . b4,b5,b6 = ~ (the Comp of a1 . b3,b2,b1) ) );
symmetry
for b1, b2 being non empty AltCatStr st the carrier of b2 = the carrier of b1 & the Arrows of b2 = ~ the Arrows of b1 & ( for b3, b4, b5 being object of b1
for b6, b7, b8 being object of b2 st b6 = b3 & b7 = b4 & b8 = b5 holds
the Comp of b2 . b6,b7,b8 = ~ (the Comp of b1 . b5,b4,b3) ) holds
( the carrier of b1 = the carrier of b2 & the Arrows of b1 = ~ the Arrows of b2 & ( for b3, b4, b5 being object of b2
for b6, b7, b8 being object of b1 st b6 = b3 & b7 = b4 & b8 = b5 holds
the Comp of b1 . b6,b7,b8 = ~ (the Comp of b2 . b5,b4,b3) ) )
proof end;
end;

:: deftheorem Def3 defines are_opposite YELLOW18:def 3 :
for b1, b2 being non empty AltCatStr holds
( b1,b2 are_opposite iff ( the carrier of b2 = the carrier of b1 & the Arrows of b2 = ~ the Arrows of b1 & ( for b3, b4, b5 being object of b1
for b6, b7, b8 being object of b2 st b6 = b3 & b7 = b4 & b8 = b5 holds
the Comp of b2 . b6,b7,b8 = ~ (the Comp of b1 . b5,b4,b3) ) ) );

theorem Th6: :: YELLOW18:6
for b1, b2 being non empty AltCatStr st b1,b2 are_opposite holds
for b3 being object of b1 holds b3 is object of b2
proof end;

theorem Th7: :: YELLOW18:7
for b1, b2 being non empty AltCatStr st b1,b2 are_opposite holds
for b3, b4 being object of b1
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
<^b3,b4^> = <^b6,b5^>
proof end;

theorem Th8: :: YELLOW18:8
for b1, b2 being non empty AltCatStr st b1,b2 are_opposite holds
for b3, b4 being object of b1
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
for b7 being Morphism of b3,b4 holds b7 is Morphism of b6,b5 by Th7;

theorem Th9: :: YELLOW18:9
for b1, b2 being non empty transitive AltCatStr holds
( b1,b2 are_opposite iff ( the carrier of b2 = the carrier of b1 & ( for b3, b4, b5 being object of b1
for b6, b7, b8 being object of b2 st b6 = b3 & b7 = b4 & b8 = b5 holds
( <^b3,b4^> = <^b7,b6^> & ( <^b3,b4^> <> {} & <^b4,b5^> <> {} implies for b9 being Morphism of b3,b4
for b10 being Morphism of b4,b5
for b11 being Morphism of b7,b6
for b12 being Morphism of b8,b7 st b11 = b9 & b12 = b10 holds
b11 * b12 = b10 * b9 ) ) ) ) )
proof end;

theorem Th10: :: YELLOW18:10
for b1, b2 being category st b1,b2 are_opposite holds
for b3 being object of b1
for b4 being object of b2 st b3 = b4 holds
idm b3 = idm b4
proof end;

theorem Th11: :: YELLOW18:11
for b1 being non empty transitive AltCatStr ex b2 being non empty transitive strict AltCatStr st b1,b2 are_opposite
proof end;

theorem Th12: :: YELLOW18:12
for b1, b2 being non empty transitive AltCatStr st b1,b2 are_opposite & b1 is associative holds
b2 is associative
proof end;

theorem Th13: :: YELLOW18:13
for b1, b2 being non empty transitive AltCatStr st b1,b2 are_opposite & b1 is with_units holds
b2 is with_units
proof end;

theorem Th14: :: YELLOW18:14
for b1, b2, b3 being non empty AltCatStr st b1,b2 are_opposite holds
( b1,b3 are_opposite iff AltCatStr(# the carrier of b2,the Arrows of b2,the Comp of b2 #) = AltCatStr(# the carrier of b3,the Arrows of b3,the Comp of b3 #) )
proof end;

definition
let c1 be non empty transitive AltCatStr ;
func c1 opp -> non empty transitive strict AltCatStr means :Def4: :: YELLOW18:def 4
a1,a2 are_opposite ;
uniqueness
for b1, b2 being non empty transitive strict AltCatStr st c1,b1 are_opposite & c1,b2 are_opposite holds
b1 = b2
by Th14;
existence
ex b1 being non empty transitive strict AltCatStr st c1,b1 are_opposite
by Th11;
end;

:: deftheorem Def4 defines opp YELLOW18:def 4 :
for b1 being non empty transitive AltCatStr
for b2 being non empty transitive strict AltCatStr holds
( b2 = b1 opp iff b1,b2 are_opposite );

registration
let c1 be non empty transitive associative AltCatStr ;
cluster a1 opp -> non empty transitive strict associative ;
coherence
c1 opp is associative
proof end;
end;

registration
let c1 be non empty transitive with_units AltCatStr ;
cluster a1 opp -> non empty transitive strict with_units ;
coherence
c1 opp is with_units
proof end;
end;

definition
let c1, c2 be category;
assume E16: c1,c2 are_opposite ;
deffunc H1( set ) -> set = a1;
deffunc H2( set , set , set ) -> set = a3;
E17: for b1 being object of c1 holds H1(b1) is object of c2 by E16, Def3;
E18: now
let c3, c4 be object of c1;
assume E19: <^c3,c4^> <> {} ;
let c5 be Morphism of c3,c4;
reconsider c6 = c3, c7 = c4 as object of c2 by E16, Def3;
<^c3,c4^> = <^c7,c6^> by E16, Th9
.= the Arrows of c2 . c4,c3 ;
hence H2(c3,c4,c5) in the Arrows of c2 . H1(c4),H1(c3) by E19;
end;
E19: for b1, b2, b3 being object of c1 st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3
for b6, b7, b8 being object of c2 st b6 = H1(b1) & b7 = H1(b2) & b8 = H1(b3) holds
for b9 being Morphism of b7,b6
for b10 being Morphism of b8,b7 st b9 = H2(b1,b2,b4) & b10 = H2(b2,b3,b5) holds
H2(b1,b3,b5 * b4) = b9 * b10 by E16, Th9;
E20: for b1 being object of c1
for b2 being object of c2 st b2 = H1(b1) holds
H2(b1,b1, idm b1) = idm b2 by E16, Th10;
func dualizing-func c1,c2 -> strict contravariant Functor of a1,a2 means :Def5: :: YELLOW18:def 5
( ( for b1 being object of a1 holds a3 . b1 = b1 ) & ( for b1, b2 being object of a1 st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds a3 . b3 = b3 ) );
existence
ex b1 being strict contravariant Functor of c1,c2 st
( ( for b2 being object of c1 holds b1 . b2 = b2 ) & ( for b2, b3 being object of c1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = b4 ) )
proof end;
uniqueness
for b1, b2 being strict contravariant Functor of c1,c2 st ( for b3 being object of c1 holds b1 . b3 = b3 ) & ( for b3, b4 being object of c1 st <^b3,b4^> <> {} holds
for b5 being Morphism of b3,b4 holds b1 . b5 = b5 ) & ( for b3 being object of c1 holds b2 . b3 = b3 ) & ( for b3, b4 being object of c1 st <^b3,b4^> <> {} holds
for b5 being Morphism of b3,b4 holds b2 . b5 = b5 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines dualizing-func YELLOW18:def 5 :
for b1, b2 being category st b1,b2 are_opposite holds
for b3 being strict contravariant Functor of b1,b2 holds
( b3 = dualizing-func b1,b2 iff ( ( for b4 being object of b1 holds b3 . b4 = b4 ) & ( for b4, b5 being object of b1 st <^b4,b5^> <> {} holds
for b6 being Morphism of b4,b5 holds b3 . b6 = b6 ) ) );

theorem Th15: :: YELLOW18:15
for b1, b2 being category st b1,b2 are_opposite holds
(dualizing-func b1,b2) * (dualizing-func b2,b1) = id b2
proof end;

theorem Th16: :: YELLOW18:16
for b1, b2 being category st b1,b2 are_opposite holds
dualizing-func b1,b2 is bijective
proof end;

registration
let c1 be category;
cluster dualizing-func a1,(a1 opp ) -> strict contravariant bijective ;
coherence
dualizing-func c1,(c1 opp ) is bijective
proof end;
cluster dualizing-func (a1 opp ),a1 -> strict contravariant bijective ;
coherence
dualizing-func (c1 opp ),c1 is bijective
proof end;
end;

theorem Th17: :: YELLOW18:17
for b1, b2 being category st b1,b2 are_opposite holds
b1,b2 are_anti-isomorphic
proof end;

theorem Th18: :: YELLOW18:18
for b1, b2, b3 being category st b1,b2 are_opposite holds
( b1,b3 are_isomorphic iff b2,b3 are_anti-isomorphic )
proof end;

theorem Th19: :: YELLOW18:19
for b1, b2, b3, b4 being category st b1,b2 are_opposite & b3,b4 are_opposite & b1,b3 are_isomorphic holds
b2,b4 are_isomorphic
proof end;

theorem Th20: :: YELLOW18:20
for b1, b2, b3, b4 being category st b1,b2 are_opposite & b3,b4 are_opposite & b1,b3 are_anti-isomorphic holds
b2,b4 are_anti-isomorphic
proof end;

E20: now
let c1, c2 be category;
assume E21: c1,c2 are_opposite ;
let c3, c4 be object of c1;
assume E22: ( <^c3,c4^> <> {} & <^c4,c3^> <> {} ) ;
let c5, c6 be object of c2;
assume E23: ( c5 = c3 & c6 = c4 ) ;
let c7 be Morphism of c3,c4;
let c8 be Morphism of c6,c5;
assume E24: c8 = c7 ;
thus ( c7 is retraction implies c8 is coretraction )
proof
given c9 being Morphism of c4,c3 such that E25: c9 is_right_inverse_of c7 ; :: according to ALTCAT_3:def 2
reconsider c10 = c9 as Morphism of c5,c6 by E21, E23, Th7;
take c10 ; :: according to ALTCAT_3:def 3
c7 * c9 = idm c4 by E25, ALTCAT_3:def 1
.= idm c6 by E21, E23, Th10 ;
hence c10 * c8 = idm c6 by E21, E22, E23, E24, Th9; :: according to ALTCAT_3:def 1
end;
thus ( c7 is coretraction implies c8 is retraction )
proof
given c9 being Morphism of c4,c3 such that E25: c9 is_left_inverse_of c7 ; :: according to ALTCAT_3:def 3
reconsider c10 = c9 as Morphism of c5,c6 by E21, E23, Th7;
take c10 ; :: according to ALTCAT_3:def 2
c9 * c7 = idm c3 by E25, ALTCAT_3:def 1
.= idm c5 by E21, E23, Th10 ;
hence c8 * c10 = idm c5 by E21, E22, E23, E24, Th9; :: according to ALTCAT_3:def 1
end;
end;

theorem Th21: :: YELLOW18:21
for b1, b2 being category st b1,b2 are_opposite holds
for b3, b4 being object of b1 st <^b3,b4^> <> {} & <^b4,b3^> <> {} holds
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
for b7 being Morphism of b3,b4
for b8 being Morphism of b6,b5 st b8 = b7 holds
( b7 is retraction iff b8 is coretraction )
proof end;

theorem Th22: :: YELLOW18:22
for b1, b2 being category st b1,b2 are_opposite holds
for b3, b4 being object of b1 st <^b3,b4^> <> {} & <^b4,b3^> <> {} holds
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
for b7 being Morphism of b3,b4
for b8 being Morphism of b6,b5 st b8 = b7 holds
( b7 is coretraction iff b8 is retraction )
proof end;

theorem Th23: :: YELLOW18:23
for b1, b2 being category st b1,b2 are_opposite holds
for b3, b4 being object of b1 st <^b3,b4^> <> {} & <^b4,b3^> <> {} holds
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
for b7 being Morphism of b3,b4
for b8 being Morphism of b6,b5 st b8 = b7 & b7 is retraction & b7 is coretraction holds
b8 " = b7 "
proof end;

theorem Th24: :: YELLOW18:24
for b1, b2 being category st b1,b2 are_opposite holds
for b3, b4 being object of b1 st <^b3,b4^> <> {} & <^b4,b3^> <> {} holds
for b5, b6 being object of b2 st b5 = b3 & b6 = b4 holds
for b7 being Morphism of b3,b4
for b8 being Morphism of b6,b5 st b8 = b7 holds
( b7 is iso iff b8 is iso )
proof end;

theorem Th25: :: YELLOW18:25
for b1, b2, b3, b4 being category st b1,b2 are_opposite & b3,b4 are_opposite holds
for b5, b6 being covariant Functor of b2,b3 st b5,b6 are_naturally_equivalent holds
((dualizing-func b3,b4) * b6) * (dualizing-func b1,b2),((dualizing-func b3,b4) * b5) * (dualizing-func b1,b2) are_naturally_equivalent
proof end;

theorem Th26: :: YELLOW18:26
for b1, b2, b3, b4 being category st b1,b2 are_opposite & b3,b4 are_opposite & b1,b3 are_equivalent holds
b2,b4 are_equivalent
proof end;

definition
let c1, c2 be category;
pred c1,c2 are_dual means :Def6: :: YELLOW18:def 6
a1,a2 opp are_equivalent ;
symmetry
for b1, b2 being category st b1,b2 opp are_equivalent holds
b2,b1 opp are_equivalent
proof end;
end;

:: deftheorem Def6 defines are_dual YELLOW18:def 6 :
for b1, b2 being category holds
( b1,b2 are_dual iff b1,b2 opp are_equivalent );

theorem Th27: :: YELLOW18:27
for b1, b2 being category st b1,b2 are_anti-isomorphic holds
b1,b2 are_dual
proof end;

theorem Th28: :: YELLOW18:28
for b1, b2, b3 being category st b1,b2 are_opposite holds
( b1,b3 are_equivalent iff b2,b3 are_dual )
proof end;

theorem Th29: :: YELLOW18:29
for b1, b2, b3 being category st b1,b2 are_dual & b2,b3 are_equivalent holds
b1,b3 are_dual
proof end;

theorem Th30: :: YELLOW18:30
for b1, b2, b3 being category st b1,b2 are_dual & b2,b3 are_dual holds
b1,b3 are_equivalent
proof end;

theorem Th31: :: YELLOW18:31
for b1, b2, b3 being set holds
( b3 in Funcs b1,b2 iff ( b3 is Function & proj1 b3 = b1 & proj2 b3 c= b2 ) )
proof end;

definition
let c1 be 1-sorted ;
mode ManySortedSet of a1 is ManySortedSet of the carrier of a1;
end;

definition
let c1 be category;
attr a1 is para-functional means :: YELLOW18:def 7
ex b1 being ManySortedSet of a1 st
for b2, b3 being object of a1 holds <^b2,b3^> c= Funcs (b1 . b2),(b1 . b3);
end;

:: deftheorem Def7 defines para-functional YELLOW18:def 7 :
for b1 being category holds
( b1 is para-functional iff ex b2 being ManySortedSet of b1 st
for b3, b4 being object of b1 holds <^b3,b4^> c= Funcs (b2 . b3),(b2 . b4) );

registration
cluster quasi-functional -> para-functional AltCatStr ;
coherence
for b1 being category st b1 is quasi-functional holds
b1 is para-functional
proof end;
end;

definition
let c1 be category;
let c2 be set ;
func c1 -carrier_of c2 -> set means :Def8: :: YELLOW18:def 8
ex b1 being object of a1 st
( b1 = a2 & a3 = proj1 (idm b1) ) if a2 is object of a1
otherwise a3 = {} ;
consistency
for b1 being set holds verum
;
existence
( ( c2 is object of c1 implies ex b1 being set ex b2 being object of c1 st
( b2 = c2 & b1 = proj1 (idm b2) ) ) & ( c2 is not object of c1 implies ex b1 being set st b1 = {} ) )
proof end;
uniqueness
for b1, b2 being set holds
( ( c2 is object of c1 & ex b3 being object of c1 st
( b3 = c2 & b1 = proj1 (idm b3) ) & ex b3 being object of c1 st
( b3 = c2 & b2 = proj1 (idm b3) ) implies b1 = b2 ) & ( c2 is not object of c1 & b1 = {} & b2 = {} implies b1 = b2 ) )
;
end;

:: deftheorem Def8 defines -carrier_of YELLOW18:def 8 :
for b1 being category
for b2 being set
for b3 being set holds
( ( b2 is object of b1 implies ( b3 = b1 -carrier_of b2 iff ex b4 being object of b1 st
( b4 = b2 & b3 = proj1 (idm b4) ) ) ) & ( b2 is not object of b1 implies ( b3 = b1 -carrier_of b2 iff b3 = {} ) ) );

notation
let c1 be category;
let c2 be object of c1;
synonym the_carrier_of c2 for c1 -carrier_of c2;
end;

definition
let c1 be category;
let c2 be object of c1;
redefine func c1 -carrier_of c2 -> set equals :: YELLOW18:def 9
proj1 (idm a2);
compatibility
for b1 being set holds
( b1 = c1 -carrier_of c2 iff b1 = proj1 (idm c2) )
by Def8;
end;

:: deftheorem Def9 defines -carrier_of YELLOW18:def 9 :
for b1 being category
for b2 being object of b1 holds b1 -carrier_of b2 = proj1 (idm b2);

theorem Th32: :: YELLOW18:32
for b1 being non empty set
for b2 being object of (EnsCat b1) holds idm b2 = id b2
proof end;

theorem Th33: :: YELLOW18:33
for b1 being non empty set
for b2 being object of (EnsCat b1) holds the_carrier_of b2 = b2
proof end;

definition
let c1 be category;
attr a1 is set-id-inheriting means :Def10: :: YELLOW18:def 10
for b1 being object of a1 holds idm b1 = id (the_carrier_of b1);
end;

:: deftheorem Def10 defines set-id-inheriting YELLOW18:def 10 :
for b1 being category holds
( b1 is set-id-inheriting iff for b2 being object of b1 holds idm b2 = id (the_carrier_of b2) );

registration
let c1 be non empty set ;
cluster EnsCat a1 -> para-functional set-id-inheriting ;
coherence
EnsCat c1 is set-id-inheriting
proof end;
end;

definition
let c1 be category;
attr a1 is concrete means :Def11: :: YELLOW18:def 11
( a1 is para-functional & a1 is semi-functional & a1 is set-id-inheriting );
end;

:: deftheorem Def11 defines concrete YELLOW18:def 11 :
for b1 being category holds
( b1 is concrete iff ( b1 is para-functional & b1 is semi-functional & b1 is set-id-inheriting ) );

registration
cluster concrete -> semi-functional para-functional set-id-inheriting AltCatStr ;
coherence
for b1 being category st b1 is concrete holds
( b1 is para-functional & b1 is semi-functional & b1 is set-id-inheriting )
by Def11;
cluster semi-functional para-functional set-id-inheriting -> concrete AltCatStr ;
coherence
for b1 being category st b1 is para-functional & b1 is semi-functional & b1 is set-id-inheriting holds
b1 is concrete
by Def11;
end;

registration
cluster strict quasi-functional semi-functional para-functional set-id-inheriting concrete AltCatStr ;
existence
ex b1 being category st
( b1 is concrete & b1 is quasi-functional & b1 is strict )
proof end;
end;

theorem Th34: :: YELLOW18:34
for b1 being category holds
( b1 is para-functional iff for b2, b3 being object of b1 holds <^b2,b3^> c= Funcs (the_carrier_of b2),(the_carrier_of b3) )
proof end;

theorem Th35: :: YELLOW18:35
for b1 being para-functional category
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b4 is Function of the_carrier_of b2, the_carrier_of b3
proof end;

registration
let c1 be para-functional category;
let c2, c3 be object of c1;
cluster -> Relation-like Function-like Element of <^a2,a3^>;
coherence
for b1 being Morphism of c2,c3 holds
( b1 is Function-like & b1 is Relation-like )
proof end;
end;

theorem Th36: :: YELLOW18:36
for b1 being para-functional category
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds
( dom b4 = the_carrier_of b2 & rng b4 c= the_carrier_of b3 )
proof end;

theorem Th37: :: YELLOW18:37
for b1 being semi-functional para-functional category
for b2 being object of b1 holds the_carrier_of b2 = dom (idm b2) by FUNCT_5:21;

theorem Th38: :: YELLOW18:38
for b1 being semi-functional para-functional category
for b2, b3, b4 being object of b1 st <^b2,b3^> <> {} & <^b3,b4^> <> {} holds
for b5 being Morphism of b2,b3
for b6 being Morphism of b3,b4 holds b6 * b5 = b6 * b5
proof end;

theorem Th39: :: YELLOW18:39
for b1 being semi-functional para-functional category
for b2 being object of b1 st id (the_carrier_of b2) in <^b2,b2^> holds
idm b2 = id (the_carrier_of b2)
proof end;

scheme :: YELLOW18:sch 16
s16{ F1() -> non empty set , F2( set , set ) -> set , F3( set ) -> set } :
ex b1 being strict concrete category st
( the carrier of b1 = F1() & ( for b2 being object of b1 holds the_carrier_of b2 = F3(b2) ) & ( for b2, b3 being object of b1 holds <^b2,b3^> = F2(b2,b3) ) )
provided
E37: for b1, b2, b3 being Element of F1()
for b4, b5 being Function st b4 in F2(b1,b2) & b5 in F2(b2,b3) holds
b5 * b4 in F2(b1,b3) and
E38: for b1, b2 being Element of F1() holds F2(b1,b2) c= Funcs F3(b1),F3(b2) and
E39: for b1 being Element of F1() holds id F3(b1) in F2(b1,b1)
proof end;

scheme :: YELLOW18:sch 17
s17{ F1() -> non empty set , P1[ set , set , set ], F2( set ) -> set } :
ex b1 being strict concrete category st
( the carrier of b1 = F1() & ( for b2 being object of b1 holds the_carrier_of b2 = F2(b2) ) & ( for b2, b3 being Element of F1()
for b4 being Function holds
( b4 in the Arrows of b1 . b2,b3 iff ( b4 in Funcs F2(b2),F2(b3) & P1[b2,b3,b4] ) ) ) )
provided
E37: for b1, b2, b3 being Element of F1()
for b4, b5 being Function st P1[b1,b2,b4] & P1[b2,b3,b5] holds
P1[b1,b3,b5 * b4] and
E38: for b1 being Element of F1() holds P1[b1,b1, id F2(b1)]
proof end;

scheme :: YELLOW18:sch 18
s18{ F1() -> non empty set , F2( set ) -> set , P1[ set , set ], P2[ set , set , set ] } :
ex b1 being strict concrete category st
( the carrier of b1 = F1() & ( for b2 being object of b1
for b3 being set holds
( b3 in the_carrier_of b2 iff ( b3 in F2(b2) & P1[b2,b3] ) ) ) & ( for b2, b3 being Element of F1()
for b4 being Function holds
( b4 in the Arrows of b1 . b2,b3 iff ( b4 in Funcs (b1 -carrier_of b2),(b1 -carrier_of b3) & P2[b2,b3,b4] ) ) ) )
provided
E37: for b1, b2, b3 being Element of F1()
for b4, b5 being Function st P2[b1,b2,b4] & P2[b2,b3,b5] holds
P2[b1,b3,b5 * b4] and
E38: for b1 being Element of F1()
for b2 being set st ( for b3 being set holds
( b3 in b2 iff ( b3 in F2(b1) & P1[b1,b3] ) ) ) holds
P2[b1,b1, id b2]
proof end;

scheme :: YELLOW18:sch 19
s19{ F1() -> non empty set , F2( set , set ) -> set } :
for b1, b2 being semi-functional para-functional category st the carrier of b1 = F1() & ( for b3, b4 being object of b1 holds <^b3,b4^> = F2(b3,b4) ) & the carrier of b2 = F1() & ( for b3, b4 being object of b2 holds <^b3,b4^> = F2(b3,b4) ) holds
AltCatStr(# the carrier of b1,the Arrows of b1,the Comp of b1 #) = AltCatStr(# the carrier of b2,the Arrows of b2,the Comp of b2 #)
proof end;

scheme :: YELLOW18:sch 20
s20{ F1() -> non empty set , P1[ set , set , set ], F2( set ) -> set } :
for b1, b2 being semi-functional para-functional category st the carrier of b1 = F1() & ( for b3, b4 being Element of F1()
for b5 being Function holds
( b5 in the Arrows of b1 . b3,b4 iff ( b5 in Funcs F2(b3),F2(b4) & P1[b3,b4,b5] ) ) ) & the carrier of b2 = F1() & ( for b3, b4 being Element of F1()
for b5 being Function holds
( b5 in the Arrows of b2 . b3,b4 iff ( b5 in Funcs F2(b3),F2(b4) & P1[b3,b4,b5] ) ) ) holds
AltCatStr(# the carrier of b1,the Arrows of b1,the Comp of b1 #) = AltCatStr(# the carrier of b2,the Arrows of b2,the Comp of b2 #)
proof end;

scheme :: YELLOW18:sch 21
s21{ F1() -> non empty set , F2( set ) -> set , P1[ set , set ], P2[ set , set , set ] } :
for b1, b2 being semi-functional para-functional category st the carrier of b1 = F1() & ( for b3 being object of b1
for b4 being set holds
( b4 in the_carrier_of b3 iff ( b4 in F2(b3) & P1[b3,b4] ) ) ) & ( for b3, b4 being Element of F1()
for b5 being Function holds
( b5 in the Arrows of b1 . b3,b4 iff ( b5 in Funcs (b1 -carrier_of b3),(b1 -carrier_of b4) & P2[b3,b4,b5] ) ) ) & the carrier of b2 = F1() & ( for b3 being object of b2
for b4 being set holds
( b4 in the_carrier_of b3 iff ( b4 in F2(b3) & P1[b3,b4] ) ) ) & ( for b3, b4 being Element of F1()
for b5 being Function holds
( b5 in the Arrows of b2 . b3,b4 iff ( b5 in Funcs (b2 -carrier_of b3),(b2 -carrier_of b4) & P2[b3,b4,b5] ) ) ) holds
AltCatStr(# the carrier of b1,the Arrows of b1,the Comp of b1 #) = AltCatStr(# the carrier of b2,the Arrows of b2,the Comp of b2 #)
proof end;

theorem Th40: :: YELLOW18:40
for b1 being concrete category
for b2, b3 being object of b1 st <^b2,b3^> <> {} & <^b3,b2^> <> {} holds
for b4 being Morphism of b2,b3 st b4 is retraction holds
rng b4 = the_carrier_of b3
proof end;

theorem Th41: :: YELLOW18:41
for b1 being concrete category
for b2, b3 being object of b1 st <^b2,b3^> <> {} & <^b3,b2^> <> {} holds
for b4 being Morphism of b2,b3 st b4 is coretraction holds
b4 is one-to-one
proof end;

theorem Th42: :: YELLOW18:42
for b1 being concrete category
for b2, b3 being object of b1 st <^b2,b3^> <> {} & <^b3,b2^> <> {} holds
for b4 being Morphism of b2,b3 st b4 is iso holds
( b4 is one-to-one & rng b4 = the_carrier_of b3 )
proof end;

theorem Th43: :: YELLOW18:43
for b1 being semi-functional para-functional category
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 st b4 is one-to-one & b4 " in <^b3,b2^> holds
b4 is iso
proof end;

theorem Th44: :: YELLOW18:44
for b1 being concrete category
for b2, b3 being object of b1 st <^b2,b3^> <> {} & <^b3,b2^> <> {} holds
for b4 being Morphism of b2,b3 st b4 is iso holds
b4 " = b4 "
proof end;

scheme :: YELLOW18:sch 22
s22{ F1() -> semi-functional para-functional category, F2() -> semi-functional para-functional category, F3( set ) -> set , F4( set ) -> set , F5( set , set , set ) -> Function, F6( set , set , set ) -> Function, F7( set ) -> Function, F8( set ) -> Function } :
F1(),F2() are_equivalent
provided
E41: ex b1 being covariant Functor of F1(),F2() st
( ( for b2 being object of F1() holds b1 . b2 = F3(b2) ) & ( for b2, b3 being object of F1() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F5(b2,b3,b4) ) ) and
E42: ex b1 being covariant Functor of F2(),F1() st
( ( for b2 being object of F2() holds b1 . b2 = F4(b2) ) & ( for b2, b3 being object of F2() st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds b1 . b4 = F6(b2,b3,b4) ) ) and
E43: for b1, b2 being object of F1() st b1 = F4(F3(b2)) holds
( F7(b2) in <^b1,b2^> & F7(b2) " in <^b2,b1^> & F7(b2) is one-to-one ) and
E44: for b1, b2 being object of F2() st b2 = F3(F4(b1)) holds
( F8(b1) in <^b1,b2^> & F8(b1) " in <^b2,b1^> & F8(b1) is one-to-one ) and
E45: for b1, b2 being object of F1() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F7(b2) * F6(F3(b1),F3(b2),F5(b1,b2,b3)) = b3 * F7(b1) and
E46: for b1, b2 being object of F2() st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds F5(F4(b1),F4(b2),F6(b1,b2,b3)) * F8(b1) = F8(b2) * b3
proof end;

definition
let c1 be category;
defpred S1[ set , set ] means a1 = a2 `22 ;
defpred S2[ set , set , Function] means ex b1, b2 being object of c1ex b3 being Morphism of b1,b2 st
( b1 = a1 & b2 = a2 & <^b1,b2^> <> {} & ( for b4 being object of c1 st <^b4,b1^> <> {} holds
for b5 being Morphism of b4,b1 holds a3 . [b5,[b4,b1]] = [(b3 * b5),[b4,b2]] ) );
deffunc H1( set ) -> set = Union (disjoin the Arrows of c1);
E41: for b1, b2, b3 being Element of c1
for b4, b5 being Function st S2[b1,b2,b4] & S2[b2,b3,b5] holds
S2[b1,b3,b5 * b4]
proof end;
E42: for b1 being Element of c1
for b2 being set st ( for b3 being set holds
( b3 in b2 iff ( b3 in H1(b1) & S1[b1,b3] ) ) ) holds
S2[b1,b1, id b2]
proof end;
func Concretized c1 -> strict concrete category means :Def12: :: YELLOW18:def 12
( the carrier of a2 = the carrier of a1 & ( for b1 being object of a2
for b2 being set holds
( b2 in the_carrier_of b1 iff ( b2 in Union (disjoin the Arrows of a1) & b1 = b2 `22 ) ) ) & ( for b1, b2 being Element of a1
for b3 being Function holds
( b3 in the Arrows of a2 . b1,b2 iff ( b3 in Funcs (a2 -carrier_of b1),(a2 -carrier_of b2) & ex b4, b5 being object of a1ex b6 being Morphism of b4,b5 st
( b4 = b1 & b5 = b2 & <^b4,b5^> <> {} & ( for b7 being object of a1 st <^b7,b4^> <> {} holds
for b8 being Morphism of b7,b4 holds b3 . [b8,[b7,b4]] = [(b6 * b8),[b7,b5]] ) ) ) ) ) );
uniqueness
for b1, b2 being strict concrete category st the carrier of b1 = the carrier of c1 & ( for b3 being object of b1
for b4 being set holds
( b4 in the_carrier_of b3 iff ( b4 in Union (disjoin the Arrows of c1) & b3 = b4 `22 ) ) ) & ( for b3, b4 being Element of c1
for b5 being Function holds
( b5 in the Arrows of b1 . b3,b4 iff ( b5 in Funcs (b1 -carrier_of b3),(b1 -carrier_of b4) & ex b6, b7 being object of c1ex b8 being Morphism of b6,b7 st
( b6 = b3 & b7 = b4 & <^b6,b7^> <> {} & ( for b9 being object of c1 st <^b9,b6^> <> {} holds
for b10 being Morphism of b9,b6 holds b5 . [b10,[b9,b6]] = [(b8 * b10),[b9,b7]] ) ) ) ) ) & the carrier of b2 = the carrier of c1 & ( for b3 being object of b2
for b4 being set holds
( b4 in the_carrier_of b3 iff ( b4 in Union (disjoin the Arrows of c1) & b3 = b4 `22 ) ) ) & ( for b3, b4 being Element of c1
for b5 being Function holds
( b5 in the Arrows of b2 . b3,b4 iff ( b5 in Funcs (b2 -carrier_of b3),(b2 -carrier_of b4) & ex b6, b7 being object of c1ex b8 being Morphism of b6,b7 st
( b6 = b3 & b7 = b4 & <^b6,b7^> <> {} & ( for b9 being object of c1 st <^b9,b6^> <> {} holds
for b10 being Morphism of b9,b6 holds b5 . [b10,[b9,b6]] = [(b8 * b10),[b9,b7]] ) ) ) ) ) holds
b1 = b2
proof end;
existence
ex b1 being strict concrete category st
( the carrier of b1 = the carrier of c1 & ( for b2 being object of b1
for b3 being set holds
( b3 in the_carrier_of b2 iff ( b3 in Union (disjoin the Arrows of c1) & b2 = b3 `22 ) ) ) & ( for b2, b3 being Element of c1
for b4 being Function holds
( b4 in the Arrows of b1 . b2,b3 iff ( b4 in Funcs (b1 -carrier_of b2),(b1 -carrier_of b3) & ex b5, b6 being object of c1ex b7 being Morphism of b5,b6 st
( b5 = b2 & b6 = b3 & <^b5,b6^> <> {} & ( for b8 being object of c1 st <^b8,b5^> <> {} holds
for b9 being Morphism of b8,b5 holds b4 . [b9,[b8,b5]] = [(b7 * b9),[b8,b6]] ) ) ) ) ) )
proof end;
end;

:: deftheorem Def12 defines Concretized YELLOW18:def 12 :
for b1 being category
for b2 being strict concrete category holds
( b2 = Concretized b1 iff ( the carrier of b2 = the carrier of b1 & ( for b3 being object of b2
for b4 being set holds
( b4 in the_carrier_of b3 iff ( b4 in Union (disjoin the Arrows of b1) & b3 = b4 `22 ) ) ) & ( for b3, b4 being Element of b1
for b5 being Function holds
( b5 in the Arrows of b2 . b3,b4 iff ( b5 in Funcs (b2 -carrier_of b3),(b2 -carrier_of b4) & ex b6, b7 being object of b1ex b8 being Morphism of b6,b7 st
( b6 = b3 & b7 = b4 & <^b6,b7^> <> {} & ( for b9 being object of b1 st <^b9,b6^> <> {} holds
for b10 being Morphism of b9,b6 holds b5 . [b10,[b9,b6]] = [(b8 * b10),[b9,b7]] ) ) ) ) ) ) );

theorem Th45: :: YELLOW18:45
for b1 being category
for b2 being object of b1
for b3 being set holds
( b3 in (Concretized b1) -carrier_of b2 iff ex b4 being object of b1ex b5 being Morphism of b4,b2 st
( <^b4,b2^> <> {} & b3 = [b5,[b4,b2]] ) )
proof end;

registration
let c1 be category;
let c2 be object of c1;
cluster (Concretized a1) -carrier_of a2 -> non empty ;
coherence
not (Concretized c1) -carrier_of c2 is empty
proof end;
end;

theorem Th46: :: YELLOW18:46
for b1 being category
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 ex b5 being Function of (Concretized b1) -carrier_of b2,(Concretized b1) -carrier_of b3 st
( b5 in the Arrows of (Concretized b1) . b2,b3 & ( for b6 being object of b1
for b7 being Morphism of b6,b2 st <^b6,b2^> <> {} holds
b5 . [b7,[b6,b2]] = [(b4 * b7),[b6,b3]] ) )
proof end;

theorem Th47: :: YELLOW18:47
for b1 being category
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4, b5 being Function st b4 in the Arrows of (Concretized b1) . b2,b3 & b5 in the Arrows of (Concretized b1) . b2,b3 & b4 . [(idm b2),[b2,b2]] = b5 . [(idm b2),[b2,b2]] holds
b4 = b5
proof end;

scheme :: YELLOW18:sch 23
s23{ F1() -> set , F2() -> ManySortedSet of F1(), F3() -> ManySortedSet of F1(), P1[ set , set , set ] } :
ex b1 being ManySortedFunction of F2(),F3() st
for b2, b3 being set st b2 in F1() & b3 in F2() . b2 holds
( (b1 . b2) . b3 in F3() . b2 & P1[b2,b3,(b1 . b2) . b3] )
provided
E45: for b1, b2 being set st b1 in F1() & b2 in F2() . b1 holds
ex b3 being set st
( b3 in F3() . b1 & P1[b1,b2,b3] )
proof end;

definition
let c1 be category;
set c2 = Concretized c1;
func Concretization c1 -> strict covariant Functor of a1, Concretized a1 means :Def13: :: YELLOW18:def 13
( ( for b1 being object of a1 holds a2 . b1 = b1 ) & ( for b1, b2 being object of a1 st <^b1,b2^> <> {} holds
for b3 being Morphism of b1,b2 holds (a2 . b3) . [(idm b1),[b1,b1]] = [b3,[b1,b2]] ) );
uniqueness
for b1, b2 being strict covariant Functor of c1, Concretized c1 st ( for b3 being object of c1 holds b1 . b3 = b3 ) & ( for b3, b4 being object of c1 st <^b3,b4^> <> {} holds
for b5 being Morphism of b3,b4 holds (b1 . b5) . [(idm b3),[b3,b3]] = [b5,[b3,b4]] ) & ( for b3 being object of c1 holds b2 . b3 = b3 ) & ( for b3, b4 being object of c1 st <^b3,b4^> <> {} holds
for b5 being Morphism of b3,b4 holds (b2 . b5) . [(idm b3),[b3,b3]] = [b5,[b3,b4]] ) holds
b1 = b2
proof end;
existence
ex b1 being strict covariant Functor of c1, Concretized c1 st
( ( for b2 being object of c1 holds b1 . b2 = b2 ) & ( for b2, b3 being object of c1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds (b1 . b4) . [(idm b2),[b2,b2]] = [b4,[b2,b3]] ) )
proof end;
end;

:: deftheorem Def13 defines Concretization YELLOW18:def 13 :
for b1 being category
for b2 being strict covariant Functor of b1, Concretized b1 holds
( b2 = Concretization b1 iff ( ( for b3 being object of b1 holds b2 . b3 = b3 ) & ( for b3, b4 being object of b1 st <^b3,b4^> <> {} holds
for b5 being Morphism of b3,b4 holds (b2 . b5) . [(idm b3),[b3,b3]] = [b5,[b3,b4]] ) ) );

registration
let c1 be category;
cluster Concretization a1 -> strict covariant bijective ;
coherence
Concretization c1 is bijective
proof end;
end;

theorem Th48: :: YELLOW18:48
for b1 being category holds b1, Concretized b1 are_isomorphic
proof end;