begin
scheme
ValOnPair{
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
A1:
F2()
= { [[o,o9],F5(o,o9)] where o, o9 is Element of F1() : P1[o,o9] }
and A2:
P1[
F3(),
F4()]
theorem Th1:
theorem
canceled;
theorem Th3:
theorem Th4:
theorem Th5:
theorem Th6:
theorem Th7:
theorem Th8:
theorem Th9:
theorem Th10:
theorem Th11:
theorem Th12:
theorem Th13:
theorem Th14:
theorem Th15:
begin
:: deftheorem FUNCTOR0:def 1 :
canceled;
:: deftheorem Def2 defines Covariant FUNCTOR0:def 2 :
for A, B being set
for f being bifunction of A,B holds
( f is Covariant iff ex g being Function of A,B st f = [:g,g:] );
:: deftheorem Def3 defines Contravariant FUNCTOR0:def 3 :
for A, B being set
for f being bifunction of A,B holds
( f is Contravariant iff ex g being Function of A,B st f = ~ [:g,g:] );
theorem Th16:
theorem
begin
:: deftheorem Def4 defines MSUnTrans FUNCTOR0:def 4 :
for I1, I2 being set
for f being Function of I1,I2
for A being ManySortedSet of I1
for B being ManySortedSet of I2
for b6 being ManySortedSet of I1 holds
( ( I2 <> {} implies ( b6 is MSUnTrans of f,A,B iff ex I29 being non empty set ex B9 being ManySortedSet of I29 ex f9 being Function of I1,I29 st
( f = f9 & B = B9 & b6 is ManySortedFunction of A,B9 * f9 ) ) ) & ( not I2 <> {} implies ( b6 is MSUnTrans of f,A,B iff b6 = [[0]] I1 ) ) );
:: deftheorem Def5 defines MSUnTrans FUNCTOR0:def 5 :
for I1 being set
for I2 being non empty set
for f being Function of I1,I2
for A being ManySortedSet of I1
for B being ManySortedSet of I2
for b6 being ManySortedSet of I1 holds
( b6 is MSUnTrans of f,A,B iff b6 is ManySortedFunction of A,B * f );
theorem Th18:
definition
let I1 be
set ;
let I2 be non
empty set ;
let f be
Function of
I1,
I2;
let A be
ManySortedSet of
[:I1,I1:];
let B be
ManySortedSet of
[:I2,I2:];
let F be
MSUnTrans of
[:f,f:],
A,
B;
~redefine func ~ F -> MSUnTrans of
[:f,f:],
~ A,
~ B;
coherence
~ F is MSUnTrans of [:f,f:], ~ A, ~ B
end;
theorem Th19:
theorem Th20:
begin
:: deftheorem defines . FUNCTOR0:def 6 :
for C1, C2 being non empty AltGraph
for F being BimapStr of C1,C2
for o being object of C1 holds F . o = ( the ObjectMap of F . (o,o)) `1 ;
:: deftheorem Def7 defines one-to-one FUNCTOR0:def 7 :
for A, B being 1-sorted
for F being BimapStr of A,B holds
( F is one-to-one iff the ObjectMap of F is one-to-one );
:: deftheorem Def8 defines onto FUNCTOR0:def 8 :
for A, B being 1-sorted
for F being BimapStr of A,B holds
( F is onto iff the ObjectMap of F is onto );
:: deftheorem Def9 defines reflexive FUNCTOR0:def 9 :
for A, B being 1-sorted
for F being BimapStr of A,B holds
( F is reflexive iff the ObjectMap of F .: (id the carrier of A) c= id the carrier of B );
:: deftheorem Def10 defines coreflexive FUNCTOR0:def 10 :
for A, B being 1-sorted
for F being BimapStr of A,B holds
( F is coreflexive iff id the carrier of B c= the ObjectMap of F .: (id the carrier of A) );
:: deftheorem Def11 defines reflexive FUNCTOR0:def 11 :
for A, B being non empty AltGraph
for F being BimapStr of A,B holds
( F is reflexive iff for o being object of A holds the ObjectMap of F . (o,o) = [(F . o),(F . o)] );
theorem Th21:
:: deftheorem Def12 defines feasible FUNCTOR0:def 12 :
for C1, C2 being non empty AltGraph
for F being BimapStr of C1,C2 holds
( F is feasible iff for o1, o2 being object of C1 st <^o1,o2^> <> {} holds
the Arrows of C2 . ( the ObjectMap of F . (o1,o2)) <> {} );
:: deftheorem Def13 defines Covariant FUNCTOR0:def 13 :
for C1, C2 being 1-sorted
for IT being BimapStr of C1,C2 holds
( IT is Covariant iff the ObjectMap of IT is Covariant );
:: deftheorem Def14 defines Contravariant FUNCTOR0:def 14 :
for C1, C2 being 1-sorted
for IT being BimapStr of C1,C2 holds
( IT is Contravariant iff the ObjectMap of IT is Contravariant );
:: deftheorem defines Morph-Map FUNCTOR0:def 15 :
for C1, C2 being AltGraph
for F being FunctorStr of C1,C2
for o1, o2 being object of C1 holds Morph-Map (F,o1,o2) = the MorphMap of F . (o1,o2);
definition
let C1,
C2 be non
empty AltGraph ;
let F be
Covariant FunctorStr of
C1,
C2;
let o1,
o2 be
object of
C1;
Morph-Mapredefine func Morph-Map (
F,
o1,
o2)
-> Function of
<^o1,o2^>,
<^(F . o1),(F . o2)^>;
coherence
Morph-Map (F,o1,o2) is Function of <^o1,o2^>,<^(F . o1),(F . o2)^>
end;
definition
let C1,
C2 be non
empty AltGraph ;
let F be
Covariant FunctorStr of
C1,
C2;
let o1,
o2 be
object of
C1;
assume that A1:
<^o1,o2^> <> {}
and A2:
<^(F . o1),(F . o2)^> <> {}
;
let m be
Morphism of
o1,
o2;
func F . m -> Morphism of
(F . o1),
(F . o2) equals :
Def16:
(Morph-Map (F,o1,o2)) . m;
coherence
(Morph-Map (F,o1,o2)) . m is Morphism of (F . o1),(F . o2)
end;
:: deftheorem Def16 defines . FUNCTOR0:def 16 :
for C1, C2 being non empty AltGraph
for F being Covariant FunctorStr of C1,C2
for o1, o2 being object of C1 st <^o1,o2^> <> {} & <^(F . o1),(F . o2)^> <> {} holds
for m being Morphism of o1,o2 holds F . m = (Morph-Map (F,o1,o2)) . m;
definition
let C1,
C2 be non
empty AltGraph ;
let F be
Contravariant FunctorStr of
C1,
C2;
let o1,
o2 be
object of
C1;
Morph-Mapredefine func Morph-Map (
F,
o1,
o2)
-> Function of
<^o1,o2^>,
<^(F . o2),(F . o1)^>;
coherence
Morph-Map (F,o1,o2) is Function of <^o1,o2^>,<^(F . o2),(F . o1)^>
end;
definition
let C1,
C2 be non
empty AltGraph ;
let F be
Contravariant FunctorStr of
C1,
C2;
let o1,
o2 be
object of
C1;
assume that A1:
<^o1,o2^> <> {}
and A2:
<^(F . o2),(F . o1)^> <> {}
;
let m be
Morphism of
o1,
o2;
func F . m -> Morphism of
(F . o2),
(F . o1) equals :
Def17:
(Morph-Map (F,o1,o2)) . m;
coherence
(Morph-Map (F,o1,o2)) . m is Morphism of (F . o2),(F . o1)
end;
:: deftheorem Def17 defines . FUNCTOR0:def 17 :
for C1, C2 being non empty AltGraph
for F being Contravariant FunctorStr of C1,C2
for o1, o2 being object of C1 st <^o1,o2^> <> {} & <^(F . o2),(F . o1)^> <> {} holds
for m being Morphism of o1,o2 holds F . m = (Morph-Map (F,o1,o2)) . m;
definition
let C1,
C2 be non
empty AltGraph ;
let o be
object of
C2;
assume A1:
<^o,o^> <> {}
;
let m be
Morphism of
o,
o;
func C1 --> m -> strict FunctorStr of
C1,
C2 means :
Def18:
( the
ObjectMap of
it = [: the carrier of C1, the carrier of C1:] --> [o,o] & the
MorphMap of
it = { [[o1,o2],(<^o1,o2^> --> m)] where o1, o2 is object of C1 : verum } );
existence
ex b1 being strict FunctorStr of C1,C2 st
( the ObjectMap of b1 = [: the carrier of C1, the carrier of C1:] --> [o,o] & the MorphMap of b1 = { [[o1,o2],(<^o1,o2^> --> m)] where o1, o2 is object of C1 : verum } )
uniqueness
for b1, b2 being strict FunctorStr of C1,C2 st the ObjectMap of b1 = [: the carrier of C1, the carrier of C1:] --> [o,o] & the MorphMap of b1 = { [[o1,o2],(<^o1,o2^> --> m)] where o1, o2 is object of C1 : verum } & the ObjectMap of b2 = [: the carrier of C1, the carrier of C1:] --> [o,o] & the MorphMap of b2 = { [[o1,o2],(<^o1,o2^> --> m)] where o1, o2 is object of C1 : verum } holds
b1 = b2
;
end;
:: deftheorem Def18 defines --> FUNCTOR0:def 18 :
for C1, C2 being non empty AltGraph
for o being object of C2 st <^o,o^> <> {} holds
for m being Morphism of o,o
for b5 being strict FunctorStr of C1,C2 holds
( b5 = C1 --> m iff ( the ObjectMap of b5 = [: the carrier of C1, the carrier of C1:] --> [o,o] & the MorphMap of b5 = { [[o1,o2],(<^o1,o2^> --> m)] where o1, o2 is object of C1 : verum } ) );
theorem Th22:
theorem Th23:
:: deftheorem Def19 defines feasible FUNCTOR0:def 19 :
for C1, C2 being non empty AltGraph
for F being Covariant FunctorStr of C1,C2 holds
( F is feasible iff for o1, o2 being object of C1 st <^o1,o2^> <> {} holds
<^(F . o1),(F . o2)^> <> {} );
theorem Th24:
:: deftheorem Def20 defines feasible FUNCTOR0:def 20 :
for C1, C2 being non empty AltGraph
for F being Contravariant FunctorStr of C1,C2 holds
( F is feasible iff for o1, o2 being object of C1 st <^o1,o2^> <> {} holds
<^(F . o2),(F . o1)^> <> {} );
:: deftheorem Def21 defines id-preserving FUNCTOR0:def 21 :
for C1, C2 being non empty with_units AltCatStr
for F being FunctorStr of C1,C2 holds
( F is id-preserving iff for o being object of C1 holds (Morph-Map (F,o,o)) . (idm o) = idm (F . o) );
theorem Th25:
definition
let C1,
C2 be non
empty AltCatStr ;
let F be
FunctorStr of
C1,
C2;
attr F is
comp-preserving means :
Def22:
for
o1,
o2,
o3 being
object of
C1 st
<^o1,o2^> <> {} &
<^o2,o3^> <> {} holds
for
f being
Morphism of
o1,
o2 for
g being
Morphism of
o2,
o3 ex
f9 being
Morphism of
(F . o1),
(F . o2) ex
g9 being
Morphism of
(F . o2),
(F . o3) st
(
f9 = (Morph-Map (F,o1,o2)) . f &
g9 = (Morph-Map (F,o2,o3)) . g &
(Morph-Map (F,o1,o3)) . (g * f) = g9 * f9 );
end;
:: deftheorem Def22 defines comp-preserving FUNCTOR0:def 22 :
for C1, C2 being non empty AltCatStr
for F being FunctorStr of C1,C2 holds
( F is comp-preserving iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 ex f9 being Morphism of (F . o1),(F . o2) ex g9 being Morphism of (F . o2),(F . o3) st
( f9 = (Morph-Map (F,o1,o2)) . f & g9 = (Morph-Map (F,o2,o3)) . g & (Morph-Map (F,o1,o3)) . (g * f) = g9 * f9 ) );
definition
let C1,
C2 be non
empty AltCatStr ;
let F be
FunctorStr of
C1,
C2;
attr F is
comp-reversing means :
Def23:
for
o1,
o2,
o3 being
object of
C1 st
<^o1,o2^> <> {} &
<^o2,o3^> <> {} holds
for
f being
Morphism of
o1,
o2 for
g being
Morphism of
o2,
o3 ex
f9 being
Morphism of
(F . o2),
(F . o1) ex
g9 being
Morphism of
(F . o3),
(F . o2) st
(
f9 = (Morph-Map (F,o1,o2)) . f &
g9 = (Morph-Map (F,o2,o3)) . g &
(Morph-Map (F,o1,o3)) . (g * f) = f9 * g9 );
end;
:: deftheorem Def23 defines comp-reversing FUNCTOR0:def 23 :
for C1, C2 being non empty AltCatStr
for F being FunctorStr of C1,C2 holds
( F is comp-reversing iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 ex f9 being Morphism of (F . o2),(F . o1) ex g9 being Morphism of (F . o3),(F . o2) st
( f9 = (Morph-Map (F,o1,o2)) . f & g9 = (Morph-Map (F,o2,o3)) . g & (Morph-Map (F,o1,o3)) . (g * f) = f9 * g9 ) );
definition
let C1 be non
empty transitive AltCatStr ;
let C2 be non
empty reflexive AltCatStr ;
let F be
feasible Covariant FunctorStr of
C1,
C2;
redefine attr F is
comp-preserving means
for
o1,
o2,
o3 being
object of
C1 st
<^o1,o2^> <> {} &
<^o2,o3^> <> {} holds
for
f being
Morphism of
o1,
o2 for
g being
Morphism of
o2,
o3 holds
F . (g * f) = (F . g) * (F . f);
compatibility
( F is comp-preserving iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 holds F . (g * f) = (F . g) * (F . f) )
end;
:: deftheorem defines comp-preserving FUNCTOR0:def 24 :
for C1 being non empty transitive AltCatStr
for C2 being non empty reflexive AltCatStr
for F being feasible Covariant FunctorStr of C1,C2 holds
( F is comp-preserving iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 holds F . (g * f) = (F . g) * (F . f) );
definition
let C1 be non
empty transitive AltCatStr ;
let C2 be non
empty reflexive AltCatStr ;
let F be
feasible Contravariant FunctorStr of
C1,
C2;
redefine attr F is
comp-reversing means
for
o1,
o2,
o3 being
object of
C1 st
<^o1,o2^> <> {} &
<^o2,o3^> <> {} holds
for
f being
Morphism of
o1,
o2 for
g being
Morphism of
o2,
o3 holds
F . (g * f) = (F . f) * (F . g);
compatibility
( F is comp-reversing iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 holds F . (g * f) = (F . f) * (F . g) )
end;
:: deftheorem defines comp-reversing FUNCTOR0:def 25 :
for C1 being non empty transitive AltCatStr
for C2 being non empty reflexive AltCatStr
for F being feasible Contravariant FunctorStr of C1,C2 holds
( F is comp-reversing iff for o1, o2, o3 being object of C1 st <^o1,o2^> <> {} & <^o2,o3^> <> {} holds
for f being Morphism of o1,o2
for g being Morphism of o2,o3 holds F . (g * f) = (F . f) * (F . g) );
theorem Th26:
theorem Th27:
:: deftheorem Def26 defines Functor FUNCTOR0:def 26 :
for C1 being non empty transitive with_units AltCatStr
for C2 being non empty with_units AltCatStr
for b3 being FunctorStr of C1,C2 holds
( b3 is Functor of C1,C2 iff ( b3 is feasible & b3 is id-preserving & ( ( b3 is Covariant & b3 is comp-preserving ) or ( b3 is Contravariant & b3 is comp-reversing ) ) ) );
:: deftheorem Def27 defines covariant FUNCTOR0:def 27 :
for C1 being non empty transitive with_units AltCatStr
for C2 being non empty with_units AltCatStr
for F being Functor of C1,C2 holds
( F is covariant iff ( F is Covariant & F is comp-preserving ) );
:: deftheorem Def28 defines contravariant FUNCTOR0:def 28 :
for C1 being non empty transitive with_units AltCatStr
for C2 being non empty with_units AltCatStr
for F being Functor of C1,C2 holds
( F is contravariant iff ( F is Contravariant & F is comp-reversing ) );
:: deftheorem Def29 defines incl FUNCTOR0:def 29 :
for A being AltCatStr
for B being SubCatStr of A
for b3 being strict FunctorStr of B,A holds
( b3 = incl B iff ( the ObjectMap of b3 = id [: the carrier of B, the carrier of B:] & the MorphMap of b3 = id the Arrows of B ) );
:: deftheorem Def30 defines id FUNCTOR0:def 30 :
for A being AltGraph
for b2 being strict FunctorStr of A,A holds
( b2 = id A iff ( the ObjectMap of b2 = id [: the carrier of A, the carrier of A:] & the MorphMap of b2 = id the Arrows of A ) );
theorem Th28:
theorem Th29:
:: deftheorem Def31 defines faithful FUNCTOR0:def 31 :
for A, B being AltGraph
for F being FunctorStr of A,B holds
( F is faithful iff the MorphMap of F is "1-1" );
:: deftheorem Def32 defines full FUNCTOR0:def 32 :
for A, B being AltGraph
for F being FunctorStr of A,B holds
( F is full iff ex B9 being ManySortedSet of [: the carrier of A, the carrier of A:] ex f being ManySortedFunction of the Arrows of A,B9 st
( B9 = the Arrows of B * the ObjectMap of F & f = the MorphMap of F & f is "onto" ) );
:: deftheorem Def33 defines full FUNCTOR0:def 33 :
for A being AltGraph
for B being non empty AltGraph
for F being FunctorStr of A,B holds
( F is full iff ex f being ManySortedFunction of the Arrows of A, the Arrows of B * the ObjectMap of F st
( f = the MorphMap of F & f is "onto" ) );
:: deftheorem Def34 defines injective FUNCTOR0:def 34 :
for A, B being AltGraph
for F being FunctorStr of A,B holds
( F is injective iff ( F is one-to-one & F is faithful ) );
:: deftheorem Def35 defines surjective FUNCTOR0:def 35 :
for A, B being AltGraph
for F being FunctorStr of A,B holds
( F is surjective iff ( F is full & F is onto ) );
:: deftheorem Def36 defines bijective FUNCTOR0:def 36 :
for A, B being AltGraph
for F being FunctorStr of A,B holds
( F is bijective iff ( F is injective & F is surjective ) );
theorem Th30:
theorem Th31:
theorem Th32:
begin
:: deftheorem Def37 defines * FUNCTOR0:def 37 :
for C1 being non empty AltGraph
for C2, C3 being non empty reflexive AltGraph
for F being feasible FunctorStr of C1,C2
for G being FunctorStr of C2,C3
for b6 being strict FunctorStr of C1,C3 holds
( b6 = G * F iff ( the ObjectMap of b6 = the ObjectMap of G * the ObjectMap of F & the MorphMap of b6 = ( the MorphMap of G * the ObjectMap of F) ** the MorphMap of F ) );
theorem
theorem Th34:
theorem Th35:
:: deftheorem defines | FUNCTOR0:def 38 :
for A, C being non empty reflexive AltCatStr
for B being non empty SubCatStr of A
for F being FunctorStr of A,C holds F | B = F * (incl B);
begin
definition
let A,
B be non
empty AltGraph ;
let F be
FunctorStr of
A,
B;
assume A1:
F is
bijective
;
func F " -> strict FunctorStr of
B,
A means :
Def39:
( the
ObjectMap of
it = the
ObjectMap of
F " & ex
f being
ManySortedFunction of the
Arrows of
A, the
Arrows of
B * the
ObjectMap of
F st
(
f = the
MorphMap of
F & the
MorphMap of
it = (f "") * ( the ObjectMap of F ") ) );
existence
ex b1 being strict FunctorStr of B,A st
( the ObjectMap of b1 = the ObjectMap of F " & ex f being ManySortedFunction of the Arrows of A, the Arrows of B * the ObjectMap of F st
( f = the MorphMap of F & the MorphMap of b1 = (f "") * ( the ObjectMap of F ") ) )
uniqueness
for b1, b2 being strict FunctorStr of B,A st the ObjectMap of b1 = the ObjectMap of F " & ex f being ManySortedFunction of the Arrows of A, the Arrows of B * the ObjectMap of F st
( f = the MorphMap of F & the MorphMap of b1 = (f "") * ( the ObjectMap of F ") ) & the ObjectMap of b2 = the ObjectMap of F " & ex f being ManySortedFunction of the Arrows of A, the Arrows of B * the ObjectMap of F st
( f = the MorphMap of F & the MorphMap of b2 = (f "") * ( the ObjectMap of F ") ) holds
b1 = b2
;
end;
:: deftheorem Def39 defines " FUNCTOR0:def 39 :
for A, B being non empty AltGraph
for F being FunctorStr of A,B st F is bijective holds
for b4 being strict FunctorStr of B,A holds
( b4 = F " iff ( the ObjectMap of b4 = the ObjectMap of F " & ex f being ManySortedFunction of the Arrows of A, the Arrows of B * the ObjectMap of F st
( f = the MorphMap of F & the MorphMap of b4 = (f "") * ( the ObjectMap of F ") ) ) );
theorem Th36:
theorem Th37:
theorem Th38:
theorem Th39:
theorem Th40:
theorem Th41:
theorem Th42:
theorem Th43:
theorem Th44:
theorem Th45:
theorem Th46:
theorem Th47:
theorem Th48:
theorem Th49:
theorem Th50:
definition
let A,
B be non
empty transitive with_units AltCatStr ;
pred A,
B are_isomorphic means
ex
F being
Functor of
A,
B st
(
F is
bijective &
F is
covariant );
reflexivity
for A being non empty transitive with_units AltCatStr ex F being Functor of A,A st
( F is bijective & F is covariant )
symmetry
for A, B being non empty transitive with_units AltCatStr st ex F being Functor of A,B st
( F is bijective & F is covariant ) holds
ex F being Functor of B,A st
( F is bijective & F is covariant )
pred A,
B are_anti-isomorphic means
ex
F being
Functor of
A,
B st
(
F is
bijective &
F is
contravariant );
symmetry
for A, B being non empty transitive with_units AltCatStr st ex F being Functor of A,B st
( F is bijective & F is contravariant ) holds
ex F being Functor of B,A st
( F is bijective & F is contravariant )
end;
:: deftheorem defines are_isomorphic FUNCTOR0:def 40 :
for A, B being non empty transitive with_units AltCatStr holds
( A,B are_isomorphic iff ex F being Functor of A,B st
( F is bijective & F is covariant ) );
:: deftheorem defines are_anti-isomorphic FUNCTOR0:def 41 :
for A, B being non empty transitive with_units AltCatStr holds
( A,B are_anti-isomorphic iff ex F being Functor of A,B st
( F is bijective & F is contravariant ) );