LoginSignup
0
0

More than 3 years have passed since last update.

Products

Last updated at Posted at 2020-09-13

4.2: Productsのノート

TerminalオブジェクトからのOutgoing Arrow

TerminalオブジェクトからのOutgoing Arrowは、Generalized objectを定義する。
シングルトンセットからオブジェクトへのArrowは、Set theoryでのオブジェクトを取り出す操作に相当する。

Oppositeカテゴリー

これまでに、2種類のUniversal constructionsが出てきた。

  1. Temrinal object
  2. Initial object

全てのカテゴリーには、Arrowの方向を逆にした、Oppositeカテゴリーが存在する。

Terminal Objectは、OppositeカテゴリーではInitial Objectになる。その逆もまた同じ。

c_cop.png

CompositionのOpposite

$(g \circ f)^{op} = f^{op} \circ g^{op}$

で、Associative。

c_cop_comp.png

idのOpposite

idのOppositeはid。

id_op.png

Categorical Products

カテゴリーセオリーでのCartesian Products

以下の様な形になる。

cat-prod.png

Categorical Productsになる条件

$a$, $b$ に向けたArrowがあるオブジェクトがある状態にはいろいろなパターンがありえる。

many-candidates.png

どんな場合にCategorical Productsになるのかを判定するためには、Universal Constructionを使う。

具体的には、$a$, $b$に向けたArrowがあるオブジェクト同士と、$a$, $b$に向けたArrowの組について、ランク付けができる状態になっているかを確認する。

c_c'_m.png

$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$ のマッピングが存在しない。

ex1_2d.png

例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に対してイメージが縮小してしまっているので、単射ではない。

3d_2d.png

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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0