• Nie Znaleziono Wyników

Functors and natural transformations

N/A
N/A
Protected

Academic year: 2021

Share "Functors and natural transformations"

Copied!
141
0
0

Pełen tekst

(1)

Functors and

natural transformations

functors ; category morphisms natural transformations ; functor morphisms

(2)

Functors and

natural transformations

functors ; category morphisms natural transformations ; functor morphisms

(3)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g) for all f : A → B and g : B → C in K.

We really should differentiate between various components of F

(4)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g)

(5)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g) for all f : A → B and g : B → C in K.

We really should differentiate between various components of F

(6)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g)

(7)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g) for all f : A → B and g : B → C in K.

We really should differentiate between various components of F

(8)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g)

(9)

Functors

A functor F : K → K0 from a category K to a category K0 consists of:

• a function F : |K| → |K0|, and

• for all A, B ∈ |K|, a function F : K(A, B) → K0(F(A), F(B))

such that: Make explicit categories in which we work at various places here

• F preserves identities, i.e.,

F(idA) = idF(A) for all A ∈ |K|, and

• F preserves composition, i.e.,

F(f ;g) = F(f );F(g) for all f : A → B and g : B → C in K.

We really should differentiate between various components of F

(10)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor : P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(11)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor : P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(12)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor : P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(13)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor : P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(14)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by Set P - Set

X - 2X

X0 - 2X0

? f

? f~ -

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(15)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by Set P - Set

X - 2X

X0 - 2X0

? f

? f~ -

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(16)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by Set P - Set

X - 2X

X0 - 2X0

? f

? f~ -

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(17)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by Set P - Set

X - 2X

X0 - 2X0

? f

? f~ -

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(18)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by Set P - Set

X - 2X

X0 - 2X0

? f

? f~ -

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor : P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(19)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

X0 - 2X0

? 6

f

?

~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set| -

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(20)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

6

f - ~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(21)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

X0 - 2X0

? 6

f

?

~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set| -

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(22)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

6

op Set f

~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set| -

(23)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

X0 - 2X0

? 6 f

inSet

?

~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set| -

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(24)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

Setop - Set P−1

X - 2X

6

Set f - ~f

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

(25)

Examples

• identity functors: IdK: K → K, for any category K

• inclusions: IK,→K0 : K → K0, for any subcategory K of K0

• constant functors: CA: K → K0, for any categories K, K0 and A ∈ |K0|, with CA(f ) = idA for all morphisms f in K

• powerset functor: P : Set → Set given by

− P(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P(f ) : P(X) → P(X0) for all f : X → X0 in Set, P(f )(Y ) = {f (y) | y ∈ Y } for all Y ⊆ X

• contravariant powerset functor: P−1: Setop → Set given by

− P−1(X) = {Y | Y ⊆ X}, for all X ∈ |Set|

− P−1(f ) : P(X) → P(X0) for all f : X0 → X in Set, P−1(f )(Y ) = {x0 ∈ X0 | f (x0) ∈ Y } for all Y ⊆ X

(26)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor : List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b , i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X

(27)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b , i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X Set List- Monoid

X - hX∗, b , i

X0 -h(X0)∗, b , i

? f

? f ∗ -

(28)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X Set List- Monoid

X - hX∗, b, i

f - f ∗

(29)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X Set List- Monoid

X - hX∗, b, i

X0 -h(X0)∗, b, i

? f

? f ∗ -

(30)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X Set List- Monoid

X - hX∗, b, i

f - f ∗

(31)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X Set List- Monoid

X - hX∗, b, i

X0 -h(X0)∗, b, i

? f

? f ∗ -

(32)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X

• totalisation functor: Tot : Pfn → Set∗, where Set∗ is the subcategory of Set of sets with a distinguished element ∗ and ∗-preserving functions

− Tot(X) = X ] {∗} Define Set∗ as the category of algebras

 f (x) if it is defined

(33)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X

• totalisation functor: Tot : Pfn → Set∗, where Set∗ is the subcategory of Set of sets with a distinguished element ∗ and ∗-preserving functions

− Tot(X) = X ] {∗} Define Set∗ as the category of algebras

− Tot(f )(x) =

f (x) if it is defined

∗ otherwise

(34)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X

• totalisation functor: Tot : Pfn → Set∗, where Set∗ is the subcategory of Set of sets with a distinguished element ∗ and ∗-preserving functions

− Tot(X) = X ] {∗} Define Set∗ as the category of algebras

 f (x) if it is defined

(35)

Examples, cont’d.

• projection functors: π1: K × K0 → K, π2 : K × K0 → K0

• list functor: List : Set → Monoid, where Monoid is the category of monoids (as objects) with monoid homomorphisms as morphisms:

− List(X) = hX∗, b, i, for all X ∈ |Set|, where X∗ is the set of all finite lists of elements from X, b is the list concatenation, and  is the empty list.

− List(f ) : List(X) → List(X0) for f : X → X0 in Set,

List(f )(hx1, . . . , xni) = hf (x1), . . . , f (xn)i for all x1, . . . , xn ∈ X

• totalisation functor: Tot : Pfn → Set∗, where Set∗ is the subcategory of Set of sets with a distinguished element ∗ and ∗-preserving functions

− Tot(X) = X ] {∗} Define Set∗ as the category of algebras

− Tot(f )(x) =

f (x) if it is defined

∗ otherwise

(36)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all

(37)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all n ∈ N and DAe = idA for all e ∈ E

− ∆GK(f ) = µf : DA → DB, for all f : A → B, where µfn = f for all n ∈ N

(38)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all

(39)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all n ∈ N and DAe = idA for all e ∈ E

− ∆GK(f ) = µf : DA → DB, for all f : A → B, where µfn = f for all n ∈ N

(40)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all

(41)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all n ∈ N and DAe = idA for all e ∈ E

− ∆GK(f ) = µf : DA → DB, for all f : A → B, where µfn = f for all n ∈ N

(42)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all

(43)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all n ∈ N and DAe = idA for all e ∈ E

− ∆GK(f ) = µf : DA → DB, for all f : A → B, where µfn = f for all n ∈ N

(44)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all

(45)

Examples, cont’d.

• carrier set functors: | | : Alg(Σ) → SetS, for any algebraic signature Σ = hS, Ωi, yielding the algebra carriers and homomorphisms as functions between them

• reduct functors: σ : Alg(Σ0) → Alg(Σ), for any signature morphism σ : Σ → Σ0, as defined earlier

• term algebra functors: TΣ: Set → Alg(Σ) for all (single-sorted) algebraic

signatures Σ ∈ |AlgSig| Generalise to many-sorted signatures

− TΣ(X) = TΣ(X) for all X ∈ |Set|

− TΣ(f ) = f#: TΣ(X) → TΣ(X0) for all functions f : X → X0

• diagonal functors: ∆GK: K → DiagGK for any graph G with nodes N = |G|nodes and edges E = |G|edges, and category K

− ∆GK(A) = DA, where DA is the “constant” diagram, with DnA = A for all n ∈ N and DAe = idA for all e ∈ E

− ∆GK(f ) = µf : DA → DB, for all f : A → B, where µfn = f for all n ∈ N

(46)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor , contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

A

B



K(A, B)

?

A0

B0



K(A0, B0)

?

 f

- g

h

(47)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

Also: HomK(A, ) : K → Set HomK( , B) : Kop → Set

A

B





K(A, B)

?

A0

B0





K(A0, B0)

?

 f

- g

HomK(f, g) 6 h

h - f ;h;g

(48)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

A

B



K(A, B)

?

A0

B0



K(A0, B0)

?

 f

- g

h

(49)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

Also: HomK(A, ) : K → Set HomK( , B) : Kop → Set

A

B





K(A, B)

?

A0

B0





K(A0, B0)

?

 f

- g

HomK(f, g) 6 h

h - f ;h;g

(50)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

A

B



K(A, B)

?

A0

B0



K(A0, B0)

?

 f

- g

h

(51)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

Also: HomK(A, ) : K → Set HomK( , B) : Kop → Set

A

B





K(A, B)

?

A0

B0





K(A0, B0)

?

 f

- g

HomK(f, g) 6 h

h - f ;h;g

(52)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

A

B



K(A, B)

?

A0

B0



K(A0, B0)

?

 f

- g

h

(53)

Hom-functors

Given a locally small category K, define

HomK: Kop × K → Set

a binary hom-functor, contravariant on the first argument and covariant on the second argument, as follows:

• HomK(hA, Bi) = K(A, B), for all hA, Bi ∈ |Kop × K|, i.e., A, B ∈ |K|

• HomK(hf, gi) : K(A, B) → K(A0, B0), for hf, gi : hA, Bi → hA0, B0i in Kop × K, i.e., f : A0 → A and g : B → B0 in K, as a function given by HomK(hf, gi)(h) = f ;h;g.

Also: HomK(A, ) : K → Set HomK( , B) : Kop → Set

A

B





K(A, B)

?

A0

B0





K(A0, B0)

?

 f

- g

HomK(f, g) 6 h

h - f ;h;g

(54)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

(55)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

(56)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0 If f : A → B is mono in K then

F(f ) : F(A) → F(B) is mono in K0 ??

(57)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0 If f : A → B is epi in K then

F(f ) : F(A) → F(B) is epi in K0 ??

(58)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

If f : A → B is a retraction in K then

F(f ) : F(A) → F(B) is a retraction in K0 ??

(59)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0 If f : A → B is iso in K then

F(f ) : F(A) → F(B) is iso in K0 ??

(60)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

If α : X → D is a cone on diagram D in K then F(α) : F(X) → F(D) is a cone on dia- gram F(D) in K0 ??

BTW:

• F(D) has the same shape as D, i.e. G(F(D)) = G(D)

(with nodes N and edges E)

− (F(D))n = F(Dn) for n ∈ N

− (F(D))e = F(De) for e ∈ E

(61)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

If α : X → D is a limit of diagram D in K then F(α) : F(X) → F(D) is a limit of diagram F(D) in K0 ??

(62)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0 . . .

(63)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

• A functor is (finitely) continuous if it preserves all existing (finite) limits.

Which of the above functors are (finitely) continuous?

(64)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

• A functor is (finitely) continuous if it preserves all existing (finite) limits.

Which of the above functors are (finitely) continuous?

(65)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

• A functor is (finitely) continuous if it preserves all existing (finite) limits.

Which of the above functors are (finitely) continuous?

(66)

Functors preserve. . .

• Check whether functors preserve:

− monomorphisms

− epimorphisms

− (co)retractions

− isomorphisms

− (co)cones

− (co)limits

− . . .

F : K → K0

• A functor is (finitely) continuous if it preserves all existing (finite) limits.

Which of the above functors are (finitely) continuous?

(67)

Functors compose. . .

Given two functors F : K → K0 and G : K0 → K00, their composition F;G : K → K00 is defined as expected:

• (F;G)(A) = G(F(A)) for all A ∈ |K|

• (F;G)(f ) = G(F(f )) for all f : A → B in K

Cat, the category of (sm)all categories

− objects: (sm)all categories

− morphisms: functors between them

− composition: as above

Characterise isomorphisms in Cat Define products, terminal objects, equalisers and pullback in Cat

Try to define their duals

(68)

Functors compose. . .

Given two functors F : K → K0 and G : K0 → K00, their composition F;G : K → K00 is defined as expected:

• (F;G)(A) = G(F(A)) for all A ∈ |K|

• (F;G)(f ) = G(F(f )) for all f : A → B in K

Cat, the category of (sm)all categories

− objects: (sm)all categories

− morphisms: functors between them

− composition: as above

Characterise isomorphisms in Cat Define products, terminal objects, equalisers and pullback in Cat

(69)

Functors compose. . .

Given two functors F : K → K0 and G : K0 → K00, their composition F;G : K → K00 is defined as expected:

• (F;G)(A) = G(F(A)) for all A ∈ |K|

• (F;G)(f ) = G(F(f )) for all f : A → B in K

Cat, the category of (sm)all categories

− objects: (sm)all categories

− morphisms: functors between them

− composition: as above

Characterise isomorphisms in Cat Define products, terminal objects, equalisers and pullback in Cat

Try to define their duals

(70)

Functors compose. . .

Given two functors F : K → K0 and G : K0 → K00, their composition F;G : K → K00 is defined as expected:

• (F;G)(A) = G(F(A)) for all A ∈ |K|

• (F;G)(f ) = G(F(f )) for all f : A → B in K

Cat, the category of (sm)all categories

− objects: (sm)all categories

− morphisms: functors between them

− composition: as above

Characterise isomorphisms in Cat Define products, terminal objects, equalisers and pullback in Cat

Cytaty

Powiązane dokumenty

The author tried to prove the existence of continuous, linear (i.e., additive and positive-homogeneous) operators extending admissible metrics from A to X, and has only succeeded

Using general methods developed in [2]–[5], we deduce that all natural transformations of the rth order cotangent bundle functor T r∗ into itself form an r-parameter family generated

Abstract: Let F (correspondingly P) denote the abelian category of functors (strict polynomial functors in the sense of Friedlander and Suslin) from finite dimensional vector

Results of parts 3 and 4 remain valid when categories of modules are replaced by appropriate abelian categories.. J t ', denote the category of all left

In this paper a new class of multi-valued mappings (multi-mor- phisms) is defined as a version of a strongly admissible mapping, and its properties and applications are

− for each algebraic type scheme ∀α 1...

Mikulski, The natural operators lifting horizontal 1-forms to some vector bundle functors on fibered manifolds, Colloq..

Riemannian manifold, higher order vector tangent bundle, higher order cotangent bundle, natural tensor, natural operator....