4.2: Productsのノート
TerminalオブジェクトからのOutgoing Arrow
TerminalオブジェクトからのOutgoing Arrowは、Generalized objectを定義する。
シングルトンセットからオブジェクトへのArrowは、Set theoryでのオブジェクトを取り出す操作に相当する。
Oppositeカテゴリー
これまでに、2種類のUniversal constructionsが出てきた。
- Temrinal object
- Initial object
全てのカテゴリーには、Arrowの方向を逆にした、Oppositeカテゴリーが存在する。
Terminal Objectは、OppositeカテゴリーではInitial Objectになる。その逆もまた同じ。
CompositionのOpposite
$(g \circ f)^{op} = f^{op} \circ g^{op}$
で、Associative。
idのOpposite
idのOppositeはid。
Categorical Products
カテゴリーセオリーでのCartesian Products
以下の様な形になる。
Categorical Productsになる条件
$a$, $b$ に向けたArrowがあるオブジェクトがある状態にはいろいろなパターンがありえる。
どんな場合にCategorical Productsになるのかを判定するためには、Universal Constructionを使う。
具体的には、$a$, $b$に向けたArrowがあるオブジェクト同士と、$a$, $b$に向けたArrowの組について、ランク付けができる状態になっているかを確認する。
$c'$から$c$へのユニークなArrow $m$が存在して、そのArrowが、
$p = m \circ p'$
$q = m \circ q'$
を満たす場合、$c$は、$c'$よりも上のランクになる。
mとは何?
$m$ は、ランク下のProjection $p'$と$q'$を因数分解して、ランク上のProjection $p$と$q$に含まれない、単射性や全射性を損なう効果を抜き出したもの。
プログラミングを使った具体例
例1: a = Int, b = Bool, c = (Int, Bool), c' = Int
-- ランク上
p :: (Int, Bool) -> Int
p(a, _) = a
q :: (Int, Bool) -> Bool
q(_, b) = b
-- ランク下
p' :: Int -> Int
p' = id
q' :: Int -> Bool
q' = True
-- ランク付け。m is non-surjective. False is not mapped.
m :: Int -> (Int, Bool)
m x = (x, True)
mのイメージ
マップ先の2次元のスペース$(Int, Bool)$に、Trueだけがマップされていて、$False$ のマッピングが存在しない。
例2: a = Int, b = Bool, c = (Int, Bool), c' = (Int, Int, Bool)
-- ランク上
p :: (Int, Bool) -> Int
p(a, _) = a
q :: (Int, Bool) -> Bool
q(_, b) = b
-- ランク下
p' :: (Int, Int, Bool) -> Int
p'(x, _, _) = x
q' :: (Int, Int, Bool) -> Bool
q'(_, _, b) = b
-- ランク付け。m is non-injective. Second element is discarded.
m: (Int, Int, Bool) -> (Int, Bool)
m(x, y, b) = (x, b)
mのイメージ
3次元から2次元へのマッピングになっていて、Co-domainに対してイメージが縮小してしまっているので、単射ではない。
Categorical Productの定義
オブジェクト$c$から、オブジェクト$a$, $b$へのArrowが存在して、
p :: c -> a
q :: c -> q
全ての、オブジェクト$a$, $b$へのArrowが存在する、オブジェクト$c'$
p' :: c' -> a
q' :: c' -> b
について、ユニークなArrow
m :: c' -> c
が存在して、$m$が、以下の形で、$p'$, $q'$を因数分解する場合、
$p' = p \circ m$
$q' = q \circ m$
$c$は、$p$と$q$を伴っ、Categorical Productになる。
セットカテゴリー
全てのカテゴリーがCategorical Productsを持つわけではないし、もし持っていたとして、全てのオブジェクトペアがプロダクトを持つとは限らない。
セットカテゴリーでは、全ての2つのセットの組み合わせがプロダクトを持っている。
セットカテゴリーのようなカテゴリー
セットカテゴリーのようなカテゴリーを作る場合、以下の全てを持つ必要がある。
- Temrinal object
- Initial object
- Product
- Co-product
動画
Bartosz Milewski / Category Theory 4.2: Products
https://www.youtube.com/watch?v=Bsdl_NKbNnU