:: FUNCTOR0 semantic presentation

scheme :: FUNCTOR0:sch 1
s1{ F1() -> non empty set , F2() -> Function, F3() -> Element of F1(), F4() -> Element of F1(), F5( set , set ) -> set , P1[ set , set ] } :
F2() . F3(),F4() = F5(F3(),F4())
provided
E1: F2() = { [[b1,b2],F5(b1,b2)] where B is Element of F1(), B is Element of F1() : P1[b1,b2] } and
E2: P1[F3(),F4()]
proof end;

theorem Th1: :: FUNCTOR0:1
for b1 being set holds {} is Function of b1, {}
proof end;

theorem Th2: :: FUNCTOR0:2
canceled;

theorem Th3: :: FUNCTOR0:3
for b1 being set
for b2 being ManySortedSet of b1 holds b2 * (id b1) = b2
proof end;

registration
let c1 be empty Function;
cluster ~ a1 -> empty ;
coherence
~ c1 is empty
proof end;
let c2 be Function;
cluster [:a1,a2:] -> empty ;
coherence
[:c1,c2:] is empty
proof end;
cluster [:a2,a1:] -> empty ;
coherence
[:c2,c1:] is empty
proof end;
end;

theorem Th4: :: FUNCTOR0:4
for b1 being set
for b2 being Function holds b2 .: (id b1) = (~ b2) .: (id b1)
proof end;

theorem Th5: :: FUNCTOR0:5
for b1, b2 being set
for b3 being Function of b1,b2 holds
( b3 is onto iff [:b3,b3:] is onto )
proof end;

registration
let c1 be Function-yielding Function;
cluster ~ a1 -> Function-yielding ;
coherence
~ c1 is Function-yielding
;
end;

theorem Th6: :: FUNCTOR0:6
for b1, b2, b3 being set holds ~ ([:b1,b2:] --> b3) = [:b2,b1:] --> b3
proof end;

theorem Th7: :: FUNCTOR0:7
for b1, b2 being Function st b1 is one-to-one & b2 is one-to-one holds
[:b1,b2:] " = [:(b1 " ),(b2 " ):]
proof end;

theorem Th8: :: FUNCTOR0:8
for b1 being Function st [:b1,b1:] is one-to-one holds
b1 is one-to-one
proof end;

theorem Th9: :: FUNCTOR0:9
for b1 being Function st b1 is one-to-one holds
~ b1 is one-to-one
proof end;

theorem Th10: :: FUNCTOR0:10
for b1, b2 being Function st ~ [:b1,b2:] is one-to-one holds
[:b2,b1:] is one-to-one
proof end;

theorem Th11: :: FUNCTOR0:11
for b1, b2 being Function st b1 is one-to-one & b2 is one-to-one holds
(~ [:b1,b2:]) " = ~ ([:b2,b1:] " )
proof end;

theorem Th12: :: FUNCTOR0:12
for b1, b2 being set
for b3 being Function of b1,b2 st b3 is onto holds
id b2 c= [:b3,b3:] .: (id b1)
proof end;

theorem Th13: :: FUNCTOR0:13
for b1, b2 being Function-yielding Function
for b3 being Function holds (b2 ** b1) * b3 = (b2 * b3) ** (b1 * b3)
proof end;

definition
let c1, c2, c3 be set ;
let c4 be Function of [:c1,c2:],c3;
redefine func ~ as ~ c4 -> Function of [:a2,a1:],a3;
coherence
~ c4 is Function of [:c2,c1:],c3
proof end;
end;

theorem Th14: :: FUNCTOR0:14
for b1, b2, b3 being set
for b4 being Function of [:b1,b2:],b3 st ~ b4 is onto holds
b4 is onto
proof end;

theorem Th15: :: FUNCTOR0:15
for b1 being set
for b2 being non empty set
for b3 being Function of b1,b2 holds [:b3,b3:] .: (id b1) c= id b2
proof end;

definition
let c1, c2 be set ;
mode bifunction of a1,a2 is Function of [:a1,a1:],[:a2,a2:];
end;

definition
let c1, c2 be set ;
let c3 be bifunction of c1,c2;
canceled;
attr a3 is Covariant means :Def2: :: FUNCTOR0:def 2
ex b1 being Function of a1,a2 st a3 = [:b1,b1:];
attr a3 is Contravariant means :Def3: :: FUNCTOR0:def 3
ex b1 being Function of a1,a2 st a3 = ~ [:b1,b1:];
end;

:: deftheorem Def1 FUNCTOR0:def 1 :
canceled;

:: deftheorem Def2 defines Covariant FUNCTOR0:def 2 :
for b1, b2 being set
for b3 being bifunction of b1,b2 holds
( b3 is Covariant iff ex b4 being Function of b1,b2 st b3 = [:b4,b4:] );

:: deftheorem Def3 defines Contravariant FUNCTOR0:def 3 :
for b1, b2 being set
for b3 being bifunction of b1,b2 holds
( b3 is Contravariant iff ex b4 being Function of b1,b2 st b3 = ~ [:b4,b4:] );

theorem Th16: :: FUNCTOR0:16
for b1 being set
for b2 being non empty set
for b3 being Element of b2
for b4 being bifunction of b1,b2 st b4 = [:b1,b1:] --> [b3,b3] holds
( b4 is Covariant & b4 is Contravariant )
proof end;

registration
let c1, c2 be set ;
cluster Covariant Contravariant Relation of [:a1,a1:],[:a2,a2:];
existence
ex b1 being bifunction of c1,c2 st
( b1 is Covariant & b1 is Contravariant )
proof end;
end;

theorem Th17: :: FUNCTOR0:17
for b1, b2 being non empty set
for b3 being Covariant Contravariant bifunction of b1,b2 ex b4 being Element of b2 st b3 = [:b1,b1:] --> [b4,b4]
proof end;

definition
let c1, c2 be set ;
let c3 be Function of c1,c2;
let c4 be ManySortedSet of c1;
let c5 be ManySortedSet of c2;
mode MSUnTrans of c3,c4,c5 -> ManySortedSet of a1 means :Def4: :: FUNCTOR0:def 4
ex b1 being non empty set ex b2 being ManySortedSet of b1ex b3 being Function of a1,b1 st
( a3 = b3 & a5 = b2 & a6 is ManySortedFunction of a4,b2 * b3 ) if a2 <> {}
otherwise a6 = [0] a1;
existence
( ( c2 <> {} implies ex b1 being ManySortedSet of c1ex b2 being non empty set ex b3 being ManySortedSet of b2ex b4 being Function of c1,b2 st
( c3 = b4 & c5 = b3 & b1 is ManySortedFunction of c4,b3 * b4 ) ) & ( not c2 <> {} implies ex b1 being ManySortedSet of c1 st b1 = [0] c1 ) )
proof end;
consistency
for b1 being ManySortedSet of c1 holds verum
;
end;

:: deftheorem Def4 defines MSUnTrans FUNCTOR0:def 4 :
for b1, b2 being set
for b3 being Function of b1,b2
for b4 being ManySortedSet of b1
for b5 being ManySortedSet of b2
for b6 being ManySortedSet of b1 holds
( ( b2 <> {} implies ( b6 is MSUnTrans of b3,b4,b5 iff ex b7 being non empty set ex b8 being ManySortedSet of b7ex b9 being Function of b1,b7 st
( b3 = b9 & b5 = b8 & b6 is ManySortedFunction of b4,b8 * b9 ) ) ) & ( not b2 <> {} implies ( b6 is MSUnTrans of b3,b4,b5 iff b6 = [0] b1 ) ) );

definition
let c1 be set ;
let c2 be non empty set ;
let c3 be Function of c1,c2;
let c4 be ManySortedSet of c1;
let c5 be ManySortedSet of c2;
redefine mode MSUnTrans of c3,c4,c5 -> ManySortedSet of a1 means :Def5: :: FUNCTOR0:def 5
a6 is ManySortedFunction of a4,a5 * a3;
compatibility
for b1 being ManySortedSet of c1 holds
( b1 is MSUnTrans of c3,c4,c5 iff b1 is ManySortedFunction of c4,c5 * c3 )
proof end;
end;

:: deftheorem Def5 defines MSUnTrans FUNCTOR0:def 5 :
for b1 being set
for b2 being non empty set
for b3 being Function of b1,b2
for b4 being ManySortedSet of b1
for b5 being ManySortedSet of b2
for b6 being ManySortedSet of b1 holds
( b6 is MSUnTrans of b3,b4,b5 iff b6 is ManySortedFunction of b4,b5 * b3 );

registration
let c1, c2 be set ;
let c3 be Function of c1,c2;
let c4 be ManySortedSet of c1;
let c5 be ManySortedSet of c2;
cluster -> Function-yielding MSUnTrans of a3,a4,a5;
coherence
for b1 being MSUnTrans of c3,c4,c5 holds b1 is Function-yielding
proof end;
end;

theorem Th18: :: FUNCTOR0:18
for b1 being set
for b2, b3 being non empty set
for b4 being Function of b1,b2
for b5 being Function of b2,b3
for b6 being ManySortedSet of b2
for b7 being ManySortedSet of b3
for b8 being MSUnTrans of b5,b6,b7 holds b8 * b4 is MSUnTrans of b5 * b4,b6 * b4,b7
proof end;

definition
let c1 be set ;
let c2 be non empty set ;
let c3 be Function of c1,c2;
let c4 be ManySortedSet of [:c1,c1:];
let c5 be ManySortedSet of [:c2,c2:];
let c6 be MSUnTrans of [:c3,c3:],c4,c5;
redefine func ~ as ~ c6 -> MSUnTrans of [:a3,a3:], ~ a4, ~ a5;
coherence
~ c6 is MSUnTrans of [:c3,c3:], ~ c4, ~ c5
proof end;
end;

theorem Th19: :: FUNCTOR0:19
for b1, b2 being non empty set
for b3 being ManySortedSet of b1
for b4 being ManySortedSet of b2
for b5 being Element of b2 st b4 . b5 <> {} holds
for b6 being Element of b4 . b5
for b7 being Function of b1,b2 st b7 = b1 --> b5 holds
{ [b8,((b3 . b8) --> b6)] where B is Element of b1 : verum } is MSUnTrans of b7,b3,b4
proof end;

theorem Th20: :: FUNCTOR0:20
for b1 being set
for b2, b3 being non empty set
for b4 being Function of b1,b2
for b5 being Function of b2,b3
for b6 being ManySortedSet of b1
for b7 being ManySortedSet of b2
for b8 being ManySortedSet of b3
for b9 being MSUnTrans of b4,b6,b7
for b10 being MSUnTrans of b5 * b4,b7 * b4,b8 st ( for b11 being set st b11 in b1 & (b7 * b4) . b11 = {} & not b6 . b11 = {} holds
(b8 * (b5 * b4)) . b11 = {} ) holds
b10 ** b9 is MSUnTrans of b5 * b4,b6,b8
proof end;

definition
let c1, c2 be 1-sorted ;
attr a3 is strict;
struct BimapStr of c1,c2 -> ;
aggr BimapStr(# ObjectMap #) -> BimapStr of a1,a2;
sel ObjectMap c3 -> bifunction of the carrier of a1,the carrier of a2;
end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be BimapStr of c1,c2;
let c4 be object of c1;
func c3 . c4 -> object of a2 equals :: FUNCTOR0:def 6
(the ObjectMap of a3 . a4,a4) `1 ;
coherence
(the ObjectMap of c3 . c4,c4) `1 is object of c2
by MCART_1:10;
end;

:: deftheorem Def6 defines . FUNCTOR0:def 6 :
for b1, b2 being non empty AltGraph
for b3 being BimapStr of b1,b2
for b4 being object of b1 holds b3 . b4 = (the ObjectMap of b3 . b4,b4) `1 ;

definition
let c1, c2 be 1-sorted ;
let c3 be BimapStr of c1,c2;
attr a3 is one-to-one means :Def7: :: FUNCTOR0:def 7
the ObjectMap of a3 is one-to-one;
attr a3 is onto means :Def8: :: FUNCTOR0:def 8
the ObjectMap of a3 is onto;
attr a3 is reflexive means :Def9: :: FUNCTOR0:def 9
the ObjectMap of a3 .: (id the carrier of a1) c= id the carrier of a2;
attr a3 is coreflexive means :Def10: :: FUNCTOR0:def 10
id the carrier of a2 c= the ObjectMap of a3 .: (id the carrier of a1);
end;

:: deftheorem Def7 defines one-to-one FUNCTOR0:def 7 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is one-to-one iff the ObjectMap of b3 is one-to-one );

:: deftheorem Def8 defines onto FUNCTOR0:def 8 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is onto iff the ObjectMap of b3 is onto );

:: deftheorem Def9 defines reflexive FUNCTOR0:def 9 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is reflexive iff the ObjectMap of b3 .: (id the carrier of b1) c= id the carrier of b2 );

:: deftheorem Def10 defines coreflexive FUNCTOR0:def 10 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is coreflexive iff id the carrier of b2 c= the ObjectMap of b3 .: (id the carrier of b1) );

definition
let c1, c2 be non empty AltGraph ;
let c3 be BimapStr of c1,c2;
redefine attr a3 is reflexive means :Def11: :: FUNCTOR0:def 11
for b1 being object of a1 holds the ObjectMap of a3 . b1,b1 = [(a3 . b1),(a3 . b1)];
compatibility
( c3 is reflexive iff for b1 being object of c1 holds the ObjectMap of c3 . b1,b1 = [(c3 . b1),(c3 . b1)] )
proof end;
end;

:: deftheorem Def11 defines reflexive FUNCTOR0:def 11 :
for b1, b2 being non empty AltGraph
for b3 being BimapStr of b1,b2 holds
( b3 is reflexive iff for b4 being object of b1 holds the ObjectMap of b3 . b4,b4 = [(b3 . b4),(b3 . b4)] );

theorem Th21: :: FUNCTOR0:21
for b1, b2 being non empty reflexive AltGraph
for b3 being BimapStr of b1,b2 st b3 is coreflexive holds
for b4 being object of b2 ex b5 being object of b1 st b3 . b5 = b4
proof end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be BimapStr of c1,c2;
attr a3 is feasible means :Def12: :: FUNCTOR0:def 12
for b1, b2 being object of a1 st <^b1,b2^> <> {} holds
the Arrows of a2 . (the ObjectMap of a3 . b1,b2) <> {} ;
end;

:: deftheorem Def12 defines feasible FUNCTOR0:def 12 :
for b1, b2 being non empty AltGraph
for b3 being BimapStr of b1,b2 holds
( b3 is feasible iff for b4, b5 being object of b1 st <^b4,b5^> <> {} holds
the Arrows of b2 . (the ObjectMap of b3 . b4,b5) <> {} );

definition
let c1, c2 be AltGraph ;
attr a3 is strict;
struct FunctorStr of c1,c2 -> BimapStr of a1,a2;
aggr FunctorStr(# ObjectMap, MorphMap #) -> FunctorStr of a1,a2;
sel MorphMap c3 -> MSUnTrans of the ObjectMap of a3,the Arrows of a1,the Arrows of a2;
end;

definition
let c1, c2 be 1-sorted ;
let c3 be BimapStr of c1,c2;
attr a3 is Covariant means :Def13: :: FUNCTOR0:def 13
the ObjectMap of a3 is Covariant;
attr a3 is Contravariant means :Def14: :: FUNCTOR0:def 14
the ObjectMap of a3 is Contravariant;
end;

:: deftheorem Def13 defines Covariant FUNCTOR0:def 13 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is Covariant iff the ObjectMap of b3 is Covariant );

:: deftheorem Def14 defines Contravariant FUNCTOR0:def 14 :
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 holds
( b3 is Contravariant iff the ObjectMap of b3 is Contravariant );

registration
let c1, c2 be AltGraph ;
cluster Covariant FunctorStr of a1,a2;
existence
ex b1 being FunctorStr of c1,c2 st b1 is Covariant
proof end;
cluster Contravariant FunctorStr of a1,a2;
existence
ex b1 being FunctorStr of c1,c2 st b1 is Contravariant
proof end;
end;

definition
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
let c4, c5 be object of c1;
func Morph-Map c3,c4,c5 -> set equals :: FUNCTOR0:def 15
the MorphMap of a3 . a4,a5;
correctness
coherence
the MorphMap of c3 . c4,c5 is set
;
;
end;

:: deftheorem Def15 defines Morph-Map FUNCTOR0:def 15 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2
for b4, b5 being object of b1 holds Morph-Map b3,b4,b5 = the MorphMap of b3 . b4,b5;

registration
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
let c4, c5 be object of c1;
cluster Morph-Map a3,a4,a5 -> Relation-like Function-like ;
coherence
( Morph-Map c3,c4,c5 is Relation-like & Morph-Map c3,c4,c5 is Function-like )
proof end;
end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Covariant FunctorStr of c1,c2;
let c4, c5 be object of c1;
redefine func Morph-Map as Morph-Map c3,c4,c5 -> Function of <^a4,a5^>,<^(a3 . a4),(a3 . a5)^>;
coherence
Morph-Map c3,c4,c5 is Function of <^c4,c5^>,<^(c3 . c4),(c3 . c5)^>
proof end;
end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Covariant FunctorStr of c1,c2;
let c4, c5 be object of c1;
assume E32: ( <^c4,c5^> <> {} & <^(c3 . c4),(c3 . c5)^> <> {} ) ;
let c6 be Morphism of c4,c5;
func c3 . c6 -> Morphism of (a3 . a4),(a3 . a5) equals :Def16: :: FUNCTOR0:def 16
(Morph-Map a3,a4,a5) . a6;
coherence
(Morph-Map c3,c4,c5) . c6 is Morphism of (c3 . c4),(c3 . c5)
proof end;
end;

:: deftheorem Def16 defines . FUNCTOR0:def 16 :
for b1, b2 being non empty AltGraph
for b3 being Covariant FunctorStr of b1,b2
for b4, b5 being object of b1 st <^b4,b5^> <> {} & <^(b3 . b4),(b3 . b5)^> <> {} holds
for b6 being Morphism of b4,b5 holds b3 . b6 = (Morph-Map b3,b4,b5) . b6;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Contravariant FunctorStr of c1,c2;
let c4, c5 be object of c1;
redefine func Morph-Map as Morph-Map c3,c4,c5 -> Function of <^a4,a5^>,<^(a3 . a5),(a3 . a4)^>;
coherence
Morph-Map c3,c4,c5 is Function of <^c4,c5^>,<^(c3 . c5),(c3 . c4)^>
proof end;
end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Contravariant FunctorStr of c1,c2;
let c4, c5 be object of c1;
assume E33: ( <^c4,c5^> <> {} & <^(c3 . c5),(c3 . c4)^> <> {} ) ;
let c6 be Morphism of c4,c5;
func c3 . c6 -> Morphism of (a3 . a5),(a3 . a4) equals :Def17: :: FUNCTOR0:def 17
(Morph-Map a3,a4,a5) . a6;
coherence
(Morph-Map c3,c4,c5) . c6 is Morphism of (c3 . c5),(c3 . c4)
proof end;
end;

:: deftheorem Def17 defines . FUNCTOR0:def 17 :
for b1, b2 being non empty AltGraph
for b3 being Contravariant FunctorStr of b1,b2
for b4, b5 being object of b1 st <^b4,b5^> <> {} & <^(b3 . b5),(b3 . b4)^> <> {} holds
for b6 being Morphism of b4,b5 holds b3 . b6 = (Morph-Map b3,b4,b5) . b6;

definition
let c1, c2 be non empty AltGraph ;
let c3 be object of c2;
assume E34: <^c3,c3^> <> {} ;
let c4 be Morphism of c3,c3;
func c1 --> c4 -> strict FunctorStr of a1,a2 means :Def18: :: FUNCTOR0:def 18
( the ObjectMap of a5 = [:the carrier of a1,the carrier of a1:] --> [a3,a3] & the MorphMap of a5 = { [[b1,b2],(<^b1,b2^> --> a4)] where B is object of a1, B is object of a1 : verum } );
existence
ex b1 being strict FunctorStr of c1,c2 st
( the ObjectMap of b1 = [:the carrier of c1,the carrier of c1:] --> [c3,c3] & the MorphMap of b1 = { [[b2,b3],(<^b2,b3^> --> c4)] where B is object of c1, B is object of c1 : verum } )
proof end;
uniqueness
for b1, b2 being strict FunctorStr of c1,c2 st the ObjectMap of b1 = [:the carrier of c1,the carrier of c1:] --> [c3,c3] & the MorphMap of b1 = { [[b3,b4],(<^b3,b4^> --> c4)] where B is object of c1, B is object of c1 : verum } & the ObjectMap of b2 = [:the carrier of c1,the carrier of c1:] --> [c3,c3] & the MorphMap of b2 = { [[b3,b4],(<^b3,b4^> --> c4)] where B is object of c1, B is object of c1 : verum } holds
b1 = b2
;
end;

:: deftheorem Def18 defines --> FUNCTOR0:def 18 :
for b1, b2 being non empty AltGraph
for b3 being object of b2 st <^b3,b3^> <> {} holds
for b4 being Morphism of b3,b3
for b5 being strict FunctorStr of b1,b2 holds
( b5 = b1 --> b4 iff ( the ObjectMap of b5 = [:the carrier of b1,the carrier of b1:] --> [b3,b3] & the MorphMap of b5 = { [[b6,b7],(<^b6,b7^> --> b4)] where B is object of b1, B is object of b1 : verum } ) );

theorem Th22: :: FUNCTOR0:22
for b1, b2 being non empty AltGraph
for b3 being object of b2 st <^b3,b3^> <> {} holds
for b4 being Morphism of b3,b3
for b5 being object of b1 holds (b1 --> b4) . b5 = b3
proof end;

registration
let c1 be non empty AltGraph ;
let c2 be non empty reflexive AltGraph ;
let c3 be object of c2;
let c4 be Morphism of c3,c3;
cluster a1 --> a4 -> feasible strict Covariant Contravariant ;
coherence
( c1 --> c4 is Covariant & c1 --> c4 is Contravariant & c1 --> c4 is feasible )
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2 be non empty reflexive AltGraph ;
cluster feasible Covariant Contravariant FunctorStr of a1,a2;
existence
ex b1 being FunctorStr of c1,c2 st
( b1 is feasible & b1 is Covariant & b1 is Contravariant )
proof end;
end;

theorem Th23: :: FUNCTOR0:23
for b1, b2 being non empty AltGraph
for b3 being Covariant FunctorStr of b1,b2
for b4, b5 being object of b1 holds the ObjectMap of b3 . b4,b5 = [(b3 . b4),(b3 . b5)]
proof end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Covariant FunctorStr of c1,c2;
redefine attr a3 is feasible means :Def19: :: FUNCTOR0:def 19
for b1, b2 being object of a1 st <^b1,b2^> <> {} holds
<^(a3 . b1),(a3 . b2)^> <> {} ;
compatibility
( c3 is feasible iff for b1, b2 being object of c1 st <^b1,b2^> <> {} holds
<^(c3 . b1),(c3 . b2)^> <> {} )
proof end;
end;

:: deftheorem Def19 defines feasible FUNCTOR0:def 19 :
for b1, b2 being non empty AltGraph
for b3 being Covariant FunctorStr of b1,b2 holds
( b3 is feasible iff for b4, b5 being object of b1 st <^b4,b5^> <> {} holds
<^(b3 . b4),(b3 . b5)^> <> {} );

theorem Th24: :: FUNCTOR0:24
for b1, b2 being non empty AltGraph
for b3 being Contravariant FunctorStr of b1,b2
for b4, b5 being object of b1 holds the ObjectMap of b3 . b4,b5 = [(b3 . b5),(b3 . b4)]
proof end;

definition
let c1, c2 be non empty AltGraph ;
let c3 be Contravariant FunctorStr of c1,c2;
redefine attr a3 is feasible means :Def20: :: FUNCTOR0:def 20
for b1, b2 being object of a1 st <^b1,b2^> <> {} holds
<^(a3 . b2),(a3 . b1)^> <> {} ;
compatibility
( c3 is feasible iff for b1, b2 being object of c1 st <^b1,b2^> <> {} holds
<^(c3 . b2),(c3 . b1)^> <> {} )
proof end;
end;

:: deftheorem Def20 defines feasible FUNCTOR0:def 20 :
for b1, b2 being non empty AltGraph
for b3 being Contravariant FunctorStr of b1,b2 holds
( b3 is feasible iff for b4, b5 being object of b1 st <^b4,b5^> <> {} holds
<^(b3 . b5),(b3 . b4)^> <> {} );

registration
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
cluster the MorphMap of a3 -> Function-yielding ;
coherence
the MorphMap of c3 is Function-yielding
;
end;

registration
cluster non empty reflexive AltCatStr ;
existence
ex b1 being AltCatStr st
( not b1 is empty & b1 is reflexive )
proof end;
end;

definition
let c1, c2 be non empty with_units AltCatStr ;
let c3 be FunctorStr of c1,c2;
attr a3 is id-preserving means :Def21: :: FUNCTOR0:def 21
for b1 being object of a1 holds (Morph-Map a3,b1,b1) . (idm b1) = idm (a3 . b1);
end;

:: deftheorem Def21 defines id-preserving FUNCTOR0:def 21 :
for b1, b2 being non empty with_units AltCatStr
for b3 being FunctorStr of b1,b2 holds
( b3 is id-preserving iff for b4 being object of b1 holds (Morph-Map b3,b4,b4) . (idm b4) = idm (b3 . b4) );

theorem Th25: :: FUNCTOR0:25
for b1, b2 being non empty AltGraph
for b3 being object of b2 st <^b3,b3^> <> {} holds
for b4 being Morphism of b3,b3
for b5, b6 being object of b1
for b7 being Morphism of b5,b6 st <^b5,b6^> <> {} holds
(Morph-Map (b1 --> b4),b5,b6) . b7 = b4
proof end;

registration
cluster non empty with_units -> non empty reflexive AltCatStr ;
coherence
for b1 being non empty AltCatStr st b1 is with_units holds
b1 is reflexive
proof end;
end;

registration
let c1, c2 be non empty with_units AltCatStr ;
let c3 be object of c2;
cluster a1 --> (idm a3) -> feasible strict Covariant Contravariant id-preserving ;
coherence
c1 --> (idm c3) is id-preserving
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2 be non empty reflexive AltGraph ;
let c3 be object of c2;
let c4 be Morphism of c3,c3;
cluster a1 --> a4 -> reflexive feasible strict Covariant Contravariant ;
coherence
c1 --> c4 is reflexive
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2 be non empty reflexive AltGraph ;
cluster reflexive feasible FunctorStr of a1,a2;
existence
ex b1 being FunctorStr of c1,c2 st
( b1 is feasible & b1 is reflexive )
proof end;
end;

registration
let c1, c2 be non empty with_units AltCatStr ;
cluster reflexive feasible strict id-preserving FunctorStr of a1,a2;
existence
ex b1 being FunctorStr of c1,c2 st
( b1 is id-preserving & b1 is feasible & b1 is reflexive & b1 is strict )
proof end;
end;

definition
let c1, c2 be non empty AltCatStr ;
let c3 be FunctorStr of c1,c2;
attr a3 is comp-preserving means :Def22: :: FUNCTOR0:def 22
for b1, b2, b3 being object of a1 st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 ex b6 being Morphism of (a3 . b1),(a3 . b2)ex b7 being Morphism of (a3 . b2),(a3 . b3) st
( b6 = (Morph-Map a3,b1,b2) . b4 & b7 = (Morph-Map a3,b2,b3) . b5 & (Morph-Map a3,b1,b3) . (b5 * b4) = b7 * b6 );
end;

:: deftheorem Def22 defines comp-preserving FUNCTOR0:def 22 :
for b1, b2 being non empty AltCatStr
for b3 being FunctorStr of b1,b2 holds
( b3 is comp-preserving iff for b4, b5, b6 being object of b1 st <^b4,b5^> <> {} & <^b5,b6^> <> {} holds
for b7 being Morphism of b4,b5
for b8 being Morphism of b5,b6 ex b9 being Morphism of (b3 . b4),(b3 . b5)ex b10 being Morphism of (b3 . b5),(b3 . b6) st
( b9 = (Morph-Map b3,b4,b5) . b7 & b10 = (Morph-Map b3,b5,b6) . b8 & (Morph-Map b3,b4,b6) . (b8 * b7) = b10 * b9 ) );

definition
let c1, c2 be non empty AltCatStr ;
let c3 be FunctorStr of c1,c2;
attr a3 is comp-reversing means :Def23: :: FUNCTOR0:def 23
for b1, b2, b3 being object of a1 st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 ex b6 being Morphism of (a3 . b2),(a3 . b1)ex b7 being Morphism of (a3 . b3),(a3 . b2) st
( b6 = (Morph-Map a3,b1,b2) . b4 & b7 = (Morph-Map a3,b2,b3) . b5 & (Morph-Map a3,b1,b3) . (b5 * b4) = b6 * b7 );
end;

:: deftheorem Def23 defines comp-reversing FUNCTOR0:def 23 :
for b1, b2 being non empty AltCatStr
for b3 being FunctorStr of b1,b2 holds
( b3 is comp-reversing iff for b4, b5, b6 being object of b1 st <^b4,b5^> <> {} & <^b5,b6^> <> {} holds
for b7 being Morphism of b4,b5
for b8 being Morphism of b5,b6 ex b9 being Morphism of (b3 . b5),(b3 . b4)ex b10 being Morphism of (b3 . b6),(b3 . b5) st
( b9 = (Morph-Map b3,b4,b5) . b7 & b10 = (Morph-Map b3,b5,b6) . b8 & (Morph-Map b3,b4,b6) . (b8 * b7) = b9 * b10 ) );

definition
let c1 be non empty transitive AltCatStr ;
let c2 be non empty reflexive AltCatStr ;
let c3 be feasible Covariant FunctorStr of c1,c2;
redefine attr a3 is comp-preserving means :: FUNCTOR0:def 24
for b1, b2, b3 being object of a1 st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 holds a3 . (b5 * b4) = (a3 . b5) * (a3 . b4);
compatibility
( c3 is comp-preserving iff 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 holds c3 . (b5 * b4) = (c3 . b5) * (c3 . b4) )
proof end;
end;

:: deftheorem Def24 defines comp-preserving FUNCTOR0:def 24 :
for b1 being non empty transitive AltCatStr
for b2 being non empty reflexive AltCatStr
for b3 being feasible Covariant FunctorStr of b1,b2 holds
( b3 is comp-preserving iff for b4, b5, b6 being object of b1 st <^b4,b5^> <> {} & <^b5,b6^> <> {} holds
for b7 being Morphism of b4,b5
for b8 being Morphism of b5,b6 holds b3 . (b8 * b7) = (b3 . b8) * (b3 . b7) );

definition
let c1 be non empty transitive AltCatStr ;
let c2 be non empty reflexive AltCatStr ;
let c3 be feasible Contravariant FunctorStr of c1,c2;
redefine attr a3 is comp-reversing means :: FUNCTOR0:def 25
for b1, b2, b3 being object of a1 st <^b1,b2^> <> {} & <^b2,b3^> <> {} holds
for b4 being Morphism of b1,b2
for b5 being Morphism of b2,b3 holds a3 . (b5 * b4) = (a3 . b4) * (a3 . b5);
compatibility
( c3 is comp-reversing iff 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 holds c3 . (b5 * b4) = (c3 . b4) * (c3 . b5) )
proof end;
end;

:: deftheorem Def25 defines comp-reversing FUNCTOR0:def 25 :
for b1 being non empty transitive AltCatStr
for b2 being non empty reflexive AltCatStr
for b3 being feasible Contravariant FunctorStr of b1,b2 holds
( b3 is comp-reversing iff for b4, b5, b6 being object of b1 st <^b4,b5^> <> {} & <^b5,b6^> <> {} holds
for b7 being Morphism of b4,b5
for b8 being Morphism of b5,b6 holds b3 . (b8 * b7) = (b3 . b7) * (b3 . b8) );

theorem Th26: :: FUNCTOR0:26
for b1 being non empty AltGraph
for b2 being non empty reflexive AltGraph
for b3 being object of b2
for b4 being Morphism of b3,b3
for b5 being feasible Covariant FunctorStr of b1,b2 st b5 = b1 --> b4 holds
for b6, b7 being object of b1
for b8 being Morphism of b6,b7 st <^b6,b7^> <> {} holds
b5 . b8 = b4
proof end;

theorem Th27: :: FUNCTOR0:27
for b1 being non empty AltGraph
for b2 being non empty reflexive AltGraph
for b3 being object of b2
for b4 being Morphism of b3,b3
for b5, b6 being object of b1
for b7 being Morphism of b5,b6 st <^b5,b6^> <> {} holds
(b1 --> b4) . b7 = b4
proof end;

registration
let c1 be non empty transitive AltCatStr ;
let c2 be non empty with_units AltCatStr ;
let c3 be object of c2;
cluster a1 --> (idm a3) -> reflexive feasible strict Covariant Contravariant comp-preserving comp-reversing ;
coherence
( c1 --> (idm c3) is comp-preserving & c1 --> (idm c3) is comp-reversing )
proof end;
end;

definition
let c1 be non empty transitive with_units AltCatStr ;
let c2 be non empty with_units AltCatStr ;
mode Functor of c1,c2 -> FunctorStr of a1,a2 means :Def26: :: FUNCTOR0:def 26
( a3 is feasible & a3 is id-preserving & ( ( a3 is Covariant & a3 is comp-preserving ) or ( a3 is Contravariant & a3 is comp-reversing ) ) );
existence
ex b1 being FunctorStr of c1,c2 st
( b1 is feasible & b1 is id-preserving & ( ( b1 is Covariant & b1 is comp-preserving ) or ( b1 is Contravariant & b1 is comp-reversing ) ) )
proof end;
end;

:: deftheorem Def26 defines Functor FUNCTOR0:def 26 :
for b1 being non empty transitive with_units AltCatStr
for b2 being non empty with_units AltCatStr
for b3 being FunctorStr of b1,b2 holds
( b3 is Functor of b1,b2 iff ( b3 is feasible & b3 is id-preserving & ( ( b3 is Covariant & b3 is comp-preserving ) or ( b3 is Contravariant & b3 is comp-reversing ) ) ) );

definition
let c1 be non empty transitive with_units AltCatStr ;
let c2 be non empty with_units AltCatStr ;
let c3 be Functor of c1,c2;
attr a3 is covariant means :Def27: :: FUNCTOR0:def 27
( a3 is Covariant & a3 is comp-preserving );
attr a3 is contravariant means :Def28: :: FUNCTOR0:def 28
( a3 is Contravariant & a3 is comp-reversing );
end;

:: deftheorem Def27 defines covariant FUNCTOR0:def 27 :
for b1 being non empty transitive with_units AltCatStr
for b2 being non empty with_units AltCatStr
for b3 being Functor of b1,b2 holds
( b3 is covariant iff ( b3 is Covariant & b3 is comp-preserving ) );

:: deftheorem Def28 defines contravariant FUNCTOR0:def 28 :
for b1 being non empty transitive with_units AltCatStr
for b2 being non empty with_units AltCatStr
for b3 being Functor of b1,b2 holds
( b3 is contravariant iff ( b3 is Contravariant & b3 is comp-reversing ) );

definition
let c1 be AltCatStr ;
let c2 be SubCatStr of c1;
func incl c2 -> strict FunctorStr of a2,a1 means :Def29: :: FUNCTOR0:def 29
( the ObjectMap of a3 = id [:the carrier of a2,the carrier of a2:] & the MorphMap of a3 = id the Arrows of a2 );
existence
ex b1 being strict FunctorStr of c2,c1 st
( the ObjectMap of b1 = id [:the carrier of c2,the carrier of c2:] & the MorphMap of b1 = id the Arrows of c2 )
proof end;
correctness
uniqueness
for b1, b2 being strict FunctorStr of c2,c1 st the ObjectMap of b1 = id [:the carrier of c2,the carrier of c2:] & the MorphMap of b1 = id the Arrows of c2 & the ObjectMap of b2 = id [:the carrier of c2,the carrier of c2:] & the MorphMap of b2 = id the Arrows of c2 holds
b1 = b2
;
;
end;

:: deftheorem Def29 defines incl FUNCTOR0:def 29 :
for b1 being AltCatStr
for b2 being SubCatStr of b1
for b3 being strict FunctorStr of b2,b1 holds
( b3 = incl b2 iff ( the ObjectMap of b3 = id [:the carrier of b2,the carrier of b2:] & the MorphMap of b3 = id the Arrows of b2 ) );

definition
let c1 be AltGraph ;
func id c1 -> strict FunctorStr of a1,a1 means :Def30: :: FUNCTOR0:def 30
( the ObjectMap of a2 = id [:the carrier of a1,the carrier of a1:] & the MorphMap of a2 = id the Arrows of a1 );
existence
ex b1 being strict FunctorStr of c1,c1 st
( the ObjectMap of b1 = id [:the carrier of c1,the carrier of c1:] & the MorphMap of b1 = id the Arrows of c1 )
proof end;
correctness
uniqueness
for b1, b2 being strict FunctorStr of c1,c1 st the ObjectMap of b1 = id [:the carrier of c1,the carrier of c1:] & the MorphMap of b1 = id the Arrows of c1 & the ObjectMap of b2 = id [:the carrier of c1,the carrier of c1:] & the MorphMap of b2 = id the Arrows of c1 holds
b1 = b2
;
;
end;

:: deftheorem Def30 defines id FUNCTOR0:def 30 :
for b1 being AltGraph
for b2 being strict FunctorStr of b1,b1 holds
( b2 = id b1 iff ( the ObjectMap of b2 = id [:the carrier of b1,the carrier of b1:] & the MorphMap of b2 = id the Arrows of b1 ) );

registration
let c1 be AltCatStr ;
let c2 be SubCatStr of c1;
cluster incl a2 -> strict Covariant ;
coherence
incl c2 is Covariant
proof end;
end;

theorem Th28: :: FUNCTOR0:28
for b1 being non empty AltCatStr
for b2 being non empty SubCatStr of b1
for b3 being object of b2 holds (incl b2) . b3 = b3
proof end;

theorem Th29: :: FUNCTOR0:29
for b1 being non empty AltCatStr
for b2 being non empty SubCatStr of b1
for b3, b4 being object of b2 holds <^b3,b4^> c= <^((incl b2) . b3),((incl b2) . b4)^>
proof end;

registration
let c1 be non empty AltCatStr ;
let c2 be non empty SubCatStr of c1;
cluster incl a2 -> feasible strict Covariant ;
coherence
incl c2 is feasible
proof end;
end;

definition
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
attr a3 is faithful means :Def31: :: FUNCTOR0:def 31
the MorphMap of a3 is "1-1";
end;

:: deftheorem Def31 defines faithful FUNCTOR0:def 31 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is faithful iff the MorphMap of b3 is "1-1" );

definition
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
attr a3 is full means :Def32: :: FUNCTOR0:def 32
ex b1 being ManySortedSet of [:the carrier of a1,the carrier of a1:]ex b2 being ManySortedFunction of the Arrows of a1,b1 st
( b1 = the Arrows of a2 * the ObjectMap of a3 & b2 = the MorphMap of a3 & b2 is "onto" );
end;

:: deftheorem Def32 defines full FUNCTOR0:def 32 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is full iff ex b4 being ManySortedSet of [:the carrier of b1,the carrier of b1:]ex b5 being ManySortedFunction of the Arrows of b1,b4 st
( b4 = the Arrows of b2 * the ObjectMap of b3 & b5 = the MorphMap of b3 & b5 is "onto" ) );

definition
let c1 be AltGraph ;
let c2 be non empty AltGraph ;
let c3 be FunctorStr of c1,c2;
redefine attr a3 is full means :Def33: :: FUNCTOR0:def 33
ex b1 being ManySortedFunction of the Arrows of a1,the Arrows of a2 * the ObjectMap of a3 st
( b1 = the MorphMap of a3 & b1 is "onto" );
compatibility
( c3 is full iff ex b1 being ManySortedFunction of the Arrows of c1,the Arrows of c2 * the ObjectMap of c3 st
( b1 = the MorphMap of c3 & b1 is "onto" ) )
proof end;
end;

:: deftheorem Def33 defines full FUNCTOR0:def 33 :
for b1 being AltGraph
for b2 being non empty AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is full iff ex b4 being ManySortedFunction of the Arrows of b1,the Arrows of b2 * the ObjectMap of b3 st
( b4 = the MorphMap of b3 & b4 is "onto" ) );

definition
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
attr a3 is injective means :Def34: :: FUNCTOR0:def 34
( a3 is one-to-one & a3 is faithful );
attr a3 is surjective means :Def35: :: FUNCTOR0:def 35
( a3 is full & a3 is onto );
end;

:: deftheorem Def34 defines injective FUNCTOR0:def 34 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is injective iff ( b3 is one-to-one & b3 is faithful ) );

:: deftheorem Def35 defines surjective FUNCTOR0:def 35 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is surjective iff ( b3 is full & b3 is onto ) );

definition
let c1, c2 be AltGraph ;
let c3 be FunctorStr of c1,c2;
attr a3 is bijective means :Def36: :: FUNCTOR0:def 36
( a3 is injective & a3 is surjective );
end;

:: deftheorem Def36 defines bijective FUNCTOR0:def 36 :
for b1, b2 being AltGraph
for b3 being FunctorStr of b1,b2 holds
( b3 is bijective iff ( b3 is injective & b3 is surjective ) );

registration
let c1, c2 be non empty transitive with_units AltCatStr ;
cluster feasible strict covariant contravariant Functor of a1,a2;
existence
ex b1 being Functor of c1,c2 st
( b1 is strict & b1 is covariant & b1 is contravariant & b1 is feasible )
proof end;
end;

theorem Th30: :: FUNCTOR0:30
for b1 being non empty AltGraph
for b2 being object of b1 holds (id b1) . b2 = b2
proof end;

theorem Th31: :: FUNCTOR0:31
for b1 being non empty AltGraph
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being Morphism of b2,b3 holds (Morph-Map (id b1),b2,b3) . b4 = b4
proof end;

registration
let c1 be non empty AltGraph ;
cluster id a1 -> feasible strict Covariant ;
coherence
( id c1 is feasible & id c1 is Covariant )
proof end;
end;

registration
let c1 be non empty AltGraph ;
cluster feasible Covariant FunctorStr of a1,a1;
existence
ex b1 being FunctorStr of c1,c1 st
( b1 is Covariant & b1 is feasible )
proof end;
end;

theorem Th32: :: FUNCTOR0:32
for b1 being non empty AltGraph
for b2, b3 being object of b1 st <^b2,b3^> <> {} holds
for b4 being feasible Covariant FunctorStr of b1,b1 st b4 = id b1 holds
for b5 being Morphism of b2,b3 holds b4 . b5 = b5
proof end;

registration
let c1 be non empty transitive with_units AltCatStr ;
cluster id a1 -> feasible strict Covariant id-preserving comp-preserving ;
coherence
( id c1 is id-preserving & id c1 is comp-preserving )
proof end;
end;

definition
let c1 be non empty transitive with_units AltCatStr ;
redefine func id as id c1 -> strict covariant Functor of a1,a1;
coherence
id c1 is strict covariant Functor of c1,c1
by Def26, Def27;
end;

registration
let c1 be AltGraph ;
cluster id a1 -> strict bijective ;
coherence
id c1 is bijective
proof end;
end;

definition
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible FunctorStr of c1,c2;
let c5 be FunctorStr of c2,c3;
func c5 * c4 -> strict FunctorStr of a1,a3 means :Def37: :: FUNCTOR0:def 37
( the ObjectMap of a6 = the ObjectMap of a5 * the ObjectMap of a4 & the MorphMap of a6 = (the MorphMap of a5 * the ObjectMap of a4) ** the MorphMap of a4 );
existence
ex b1 being strict FunctorStr of c1,c3 st
( the ObjectMap of b1 = the ObjectMap of c5 * the ObjectMap of c4 & the MorphMap of b1 = (the MorphMap of c5 * the ObjectMap of c4) ** the MorphMap of c4 )
proof end;
correctness
uniqueness
for b1, b2 being strict FunctorStr of c1,c3 st the ObjectMap of b1 = the ObjectMap of c5 * the ObjectMap of c4 & the MorphMap of b1 = (the MorphMap of c5 * the ObjectMap of c4) ** the MorphMap of c4 & the ObjectMap of b2 = the ObjectMap of c5 * the ObjectMap of c4 & the MorphMap of b2 = (the MorphMap of c5 * the ObjectMap of c4) ** the MorphMap of c4 holds
b1 = b2
;
;
end;

:: deftheorem Def37 defines * FUNCTOR0:def 37 :
for b1 being non empty AltGraph
for b2, b3 being non empty reflexive AltGraph
for b4 being feasible FunctorStr of b1,b2
for b5 being FunctorStr of b2,b3
for b6 being strict FunctorStr of b1,b3 holds
( b6 = b5 * b4 iff ( the ObjectMap of b6 = the ObjectMap of b5 * the ObjectMap of b4 & the MorphMap of b6 = (the MorphMap of b5 * the ObjectMap of b4) ** the MorphMap of b4 ) );

registration
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible Covariant FunctorStr of c1,c2;
let c5 be Covariant FunctorStr of c2,c3;
cluster a5 * a4 -> strict Covariant ;
correctness
coherence
c5 * c4 is Covariant
;
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible Contravariant FunctorStr of c1,c2;
let c5 be Covariant FunctorStr of c2,c3;
cluster a5 * a4 -> strict Contravariant ;
correctness
coherence
c5 * c4 is Contravariant
;
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible Covariant FunctorStr of c1,c2;
let c5 be Contravariant FunctorStr of c2,c3;
cluster a5 * a4 -> strict Contravariant ;
correctness
coherence
c5 * c4 is Contravariant
;
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible Contravariant FunctorStr of c1,c2;
let c5 be Contravariant FunctorStr of c2,c3;
cluster a5 * a4 -> strict Covariant ;
correctness
coherence
c5 * c4 is Covariant
;
proof end;
end;

registration
let c1 be non empty AltGraph ;
let c2, c3 be non empty reflexive AltGraph ;
let c4 be feasible FunctorStr of c1,c2;
let c5 be feasible FunctorStr of c2,c3;
cluster a5 * a4 -> feasible strict ;
coherence
c5 * c4 is feasible
proof end;
end;

theorem Th33: :: FUNCTOR0:33
for b1 being non empty AltGraph
for b2, b3, b4 being non empty reflexive AltGraph
for b5 being feasible FunctorStr of b1,b2
for b6 being feasible FunctorStr of b2,b3
for b7 being FunctorStr of b3,b4 holds (b7 * b6) * b5 = b7 * (b6 * b5)
proof end;

theorem Th34: :: FUNCTOR0:34
for b1 being non empty AltCatStr
for b2, b3 being non empty reflexive AltCatStr
for b4 being reflexive feasible FunctorStr of b1,b2
for b5 being FunctorStr of b2,b3
for b6 being object of b1 holds (b5 * b4) . b6 = b5 . (b4 . b6)
proof end;

theorem Th35: :: FUNCTOR0:35
for b1 being non empty AltGraph
for b2, b3 being non empty reflexive AltGraph
for b4 being reflexive feasible FunctorStr of b1,b2
for b5 being FunctorStr of b2,b3
for b6 being object of b1 holds Morph-Map (b5 * b4),b6,b6 = (Morph-Map b5,(b4 . b6),(b4 . b6)) * (Morph-Map b4,b6,b6)
proof end;

registration
let c1, c2, c3 be non empty with_units AltCatStr ;
let c4 be reflexive feasible id-preserving FunctorStr of c1,c2;
let c5 be id-preserving FunctorStr of c2,c3;
cluster a5 * a4 -> strict id-preserving ;
coherence
c5 * c4 is id-preserving
proof end;
end;

definition
let c1, c2 be non empty reflexive AltCatStr ;
let c3 be non empty SubCatStr of c1;
let c4 be FunctorStr of c1,c2;
func c4 | c3 -> FunctorStr of a3,a2 equals :: FUNCTOR0:def 38
a4 * (incl a3);
correctness
coherence
c4 * (incl c3) is FunctorStr of c3,c2
;
;
end;

:: deftheorem Def38 defines | FUNCTOR0:def 38 :
for b1, b2 being non empty reflexive AltCatStr
for b3 being non empty SubCatStr of b1
for b4 being FunctorStr of b1,b2 holds b4 | b3 = b4 * (incl b3);

definition
let c1, c2 be non empty AltGraph ;
let c3 be FunctorStr of c1,c2;
assume E65: c3 is bijective ;
func c3 " -> strict FunctorStr of a2,a1 means :Def39: :: FUNCTOR0:def 39
( the ObjectMap of a4 = the ObjectMap of a3 " & ex b1 being ManySortedFunction of the Arrows of a1,the Arrows of a2 * the ObjectMap of a3 st
( b1 = the MorphMap of a3 & the MorphMap of a4 = (b1 "" ) * (the ObjectMap of a3 " ) ) );
existence
ex b1 being strict FunctorStr of c2,c1 st
( the ObjectMap of b1 = the ObjectMap of c3 " & ex b2 being ManySortedFunction of the Arrows of c1,the Arrows of c2 * the ObjectMap of c3 st
( b2 = the MorphMap of c3 & the MorphMap of b1 = (b2 "" ) * (the ObjectMap of c3 " ) ) )
proof end;
uniqueness
for b1, b2 being strict FunctorStr of c2,c1 st the ObjectMap of b1 = the ObjectMap of c3 " & ex b3 being ManySortedFunction of the Arrows of c1,the Arrows of c2 * the ObjectMap of c3 st
( b3 = the MorphMap of c3 & the MorphMap of b1 = (b3 "" ) * (the ObjectMap of c3 " ) ) & the ObjectMap of b2 = the ObjectMap of c3 " & ex b3 being ManySortedFunction of the Arrows of c1,the Arrows of c2 * the ObjectMap of c3 st
( b3 = the MorphMap of c3 & the MorphMap of b2 = (b3 "" ) * (the ObjectMap of c3 " ) ) holds
b1 = b2
;
end;

:: deftheorem Def39 defines " FUNCTOR0:def 39 :
for b1, b2 being non empty AltGraph
for b3 being FunctorStr of b1,b2 st b3 is bijective holds
for b4 being strict FunctorStr of b2,b1 holds
( b4 = b3 " iff ( the ObjectMap of b4 = the ObjectMap of b3 " & ex b5 being ManySortedFunction of the Arrows of b1,the Arrows of b2 * the ObjectMap of b3 st
( b5 = the MorphMap of b3 & the MorphMap of b4 = (b5 "" ) * (the ObjectMap of b3 " ) ) ) );

theorem Th36: :: FUNCTOR0:36
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being feasible FunctorStr of b1,b2 st b3 is bijective holds
( b3 " is bijective & b3 " is feasible )
proof end;

theorem Th37: :: FUNCTOR0:37
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible FunctorStr of b1,b2 st b3 is bijective & b3 is coreflexive holds
b3 " is reflexive
proof end;

theorem Th38: :: FUNCTOR0:38
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible id-preserving FunctorStr of b1,b2 st b3 is bijective & b3 is coreflexive holds
b3 " is id-preserving
proof end;

theorem Th39: :: FUNCTOR0:39
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being feasible FunctorStr of b1,b2 st b3 is bijective & b3 is Covariant holds
b3 " is Covariant
proof end;

theorem Th40: :: FUNCTOR0:40
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being feasible FunctorStr of b1,b2 st b3 is bijective & b3 is Contravariant holds
b3 " is Contravariant
proof end;

theorem Th41: :: FUNCTOR0:41
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible FunctorStr of b1,b2 st b3 is bijective & b3 is coreflexive & b3 is Covariant holds
for b4, b5 being object of b2
for b6 being Morphism of b4,b5 st <^b4,b5^> <> {} holds
(Morph-Map b3,((b3 " ) . b4),((b3 " ) . b5)) . ((Morph-Map (b3 " ),b4,b5) . b6) = b6
proof end;

theorem Th42: :: FUNCTOR0:42
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible FunctorStr of b1,b2 st b3 is bijective & b3 is coreflexive & b3 is Contravariant holds
for b4, b5 being object of b2
for b6 being Morphism of b4,b5 st <^b4,b5^> <> {} holds
(Morph-Map b3,((b3 " ) . b5),((b3 " ) . b4)) . ((Morph-Map (b3 " ),b4,b5) . b6) = b6
proof end;

theorem Th43: :: FUNCTOR0:43
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible FunctorStr of b1,b2 st b3 is bijective & b3 is comp-preserving & b3 is Covariant & b3 is coreflexive holds
b3 " is comp-preserving
proof end;

theorem Th44: :: FUNCTOR0:44
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being reflexive feasible FunctorStr of b1,b2 st b3 is bijective & b3 is comp-reversing & b3 is Contravariant & b3 is coreflexive holds
b3 " is comp-reversing
proof end;

registration
let c1 be 1-sorted ;
let c2 be non empty 1-sorted ;
cluster Covariant -> reflexive BimapStr of a1,a2;
coherence
for b1 being BimapStr of c1,c2 st b1 is Covariant holds
b1 is reflexive
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be non empty 1-sorted ;
cluster Contravariant -> reflexive BimapStr of a1,a2;
coherence
for b1 being BimapStr of c1,c2 st b1 is Contravariant holds
b1 is reflexive
proof end;
end;

theorem Th45: :: FUNCTOR0:45
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 st b3 is Covariant & b3 is onto holds
b3 is coreflexive
proof end;

theorem Th46: :: FUNCTOR0:46
for b1, b2 being 1-sorted
for b3 being BimapStr of b1,b2 st b3 is Contravariant & b3 is onto holds
b3 is coreflexive
proof end;

registration
let c1 be non empty transitive with_units AltCatStr ;
let c2 be non empty with_units AltCatStr ;
cluster covariant -> reflexive Functor of a1,a2;
coherence
for b1 being Functor of c1,c2 st b1 is covariant holds
b1 is reflexive
proof end;
end;

registration
let c1 be non empty transitive with_units AltCatStr ;
let c2 be non empty with_units AltCatStr ;
cluster contravariant -> reflexive Functor of a1,a2;
coherence
for b1 being Functor of c1,c2 st b1 is contravariant holds
b1 is reflexive
proof end;
end;

theorem Th47: :: FUNCTOR0:47
for b1 being non empty transitive with_units AltCatStr
for b2 being non empty with_units AltCatStr
for b3 being Functor of b1,b2 st b3 is covariant & b3 is onto holds
b3 is coreflexive
proof end;

theorem Th48: :: FUNCTOR0:48
for b1 being non empty transitive with_units AltCatStr
for b2 being non empty with_units AltCatStr
for b3 being Functor of b1,b2 st b3 is contravariant & b3 is onto holds
b3 is coreflexive
proof end;

theorem Th49: :: FUNCTOR0:49
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being covariant Functor of b1,b2 st b3 is bijective holds
ex b4 being Functor of b2,b1 st
( b4 = b3 " & b4 is bijective & b4 is covariant )
proof end;

theorem Th50: :: FUNCTOR0:50
for b1, b2 being non empty transitive with_units AltCatStr
for b3 being contravariant Functor of b1,b2 st b3 is bijective holds
ex b4 being Functor of b2,b1 st
( b4 = b3 " & b4 is bijective & b4 is contravariant )
proof end;

definition
let c1, c2 be non empty transitive with_units AltCatStr ;
pred c1,c2 are_isomorphic means :: FUNCTOR0:def 40
ex b1 being Functor of a1,a2 st
( b1 is bijective & b1 is covariant );
reflexivity
for b1 being non empty transitive with_units AltCatStr ex b2 being Functor of b1,b1 st
( b2 is bijective & b2 is covariant )
proof end;
symmetry
for b1, b2 being non empty transitive with_units AltCatStr st ex b3 being Functor of b1,b2 st
( b3 is bijective & b3 is covariant ) holds
ex b3 being Functor of b2,b1 st
( b3 is bijective & b3 is covariant )
proof end;
pred c1,c2 are_anti-isomorphic means :: FUNCTOR0:def 41
ex b1 being Functor of a1,a2 st
( b1 is bijective & b1 is contravariant );
symmetry
for b1, b2 being non empty transitive with_units AltCatStr st ex b3 being Functor of b1,b2 st
( b3 is bijective & b3 is contravariant ) holds
ex b3 being Functor of b2,b1 st
( b3 is bijective & b3 is contravariant )
proof end;
end;

:: deftheorem Def40 defines are_isomorphic FUNCTOR0:def 40 :
for b1, b2 being non empty transitive with_units AltCatStr holds
( b1,b2 are_isomorphic iff ex b3 being Functor of b1,b2 st
( b3 is bijective & b3 is covariant ) );

:: deftheorem Def41 defines are_anti-isomorphic FUNCTOR0:def 41 :
for b1, b2 being non empty transitive with_units AltCatStr holds
( b1,b2 are_anti-isomorphic iff ex b3 being Functor of b1,b2 st
( b3 is bijective & b3 is contravariant ) );