Personal tools

User:Michiexile/MATH198/Lecture 4

From HaskellWiki

< User:Michiexile | MATH198(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
   
 
===Product===
 
===Product===
  +
  +
Recall the construction of a ''cartesian product'': for sets <math>S,T</math>, the set <math>S\times T=\{(s,t) : s\in S, t\in T\}</math>.
  +
  +
The cartesian product is one of the canonical ways to combine sets with each other. This is how we build binary operations, and higher ones - as well as how we formally define functions, partial functions and relations in the first place.
  +
  +
This, too, is how we construct vector spaces: recall that <math>\mathbb R^n</math> is built out of tuples of elements from <math>\mathbb R</math>, with pointwise operations. This constructions reoccurs all over the place - sets with structure almost always have the structure carry over to products by pointwise operations.
  +
  +
Given the cartesian product in sets, the important thing about the product is that we can extract both parts, and doing so preserves any structure present, since the structure is defined pointwise.
  +
  +
This is what we use to define what we want to mean by products in a categorical setting.
  +
  +
''Definition'' Let <math>C</math> be a category. The ''product'' of two objects <math>A,B</math> is an object <math>A\times B</math> equipped with maps <math>p_1: A\times B\to A</math> and <math>p_2: A\times B\to B</math> such that any other object <math>V</math> with maps <math>A\leftarrow^{q_1} V\rightarrow^{q_2} B</math> has a unique map <math>V\to A\times B</math> such that both maps from <math>V</math> factor through the <math>p_1,p_2</math>.
  +
  +
In the category of Set, the unique map from <math>V</math> to <math>A\times B</math> would be given by <math>q(v) = (q_1(v),q_2(v))</math>.
   
 
* Cartesian product in Set
 
* Cartesian product in Set

Revision as of 19:02, 7 October 2009

IMPORTANT NOTE: THESE NOTES ARE STILL UNDER DEVELOPMENT. PLEASE WAIT UNTIL AFTER THE LECTURE WITH HANDING ANYTHING IN, OR TREATING THE NOTES AS READY TO READ.

Contents

1 Product

Recall the construction of a cartesian product: for sets S,T, the set S\times T=\{(s,t) : s\in S, t\in T\}.

The cartesian product is one of the canonical ways to combine sets with each other. This is how we build binary operations, and higher ones - as well as how we formally define functions, partial functions and relations in the first place.

This, too, is how we construct vector spaces: recall that \mathbb R^n is built out of tuples of elements from \mathbb R, with pointwise operations. This constructions reoccurs all over the place - sets with structure almost always have the structure carry over to products by pointwise operations.

Given the cartesian product in sets, the important thing about the product is that we can extract both parts, and doing so preserves any structure present, since the structure is defined pointwise.

This is what we use to define what we want to mean by products in a categorical setting.

Definition Let C be a category. The product of two objects A,B is an object A\times B equipped with maps p_1: A\times B\to A and p_2: A\times B\to B such that any other object V with maps A\leftarrow^{q_1} V\rightarrow^{q_2} B has a unique map V\to A\times B such that both maps from V factor through the p1,p2.

In the category of Set, the unique map from V to A\times B would be given by q(v) = (q1(v),q2(v)).

  • Cartesian product in Set
  • Product of categories construction
  • Record types
  • Categorical formulation
    • Universal X such that Y

2 Coproduct

  • Diagram definition
  • Disjoint union in Set
  • Coproduct of categories construction
  • Union types

3 Limits and colimits

  • Generalizing these constructions
  • Diagram and universal object mapping to (from) the diagram
  • Express product/coproduct as limit/colimit
  • Issues with Haskell
    • No dependent types
    • No compiler-enforced equational conditions
    • Can be simulated but not enforced, e.g. using QuickCheck.

3.1 Useful limits and colimits

3.1.1 Equalizer, coequalizer
  • Kernels, cokernels, images, coimages
    • connect to linear algebra: null spaces et.c.
3.1.2 Pushout and pullback squares
  • Computer science applications
   * The power of dualization.
   * Limits, colimits.
   * Products, coproducts.
   * Equalizers, coequalizers.