SlideShare a Scribd company logo
1 of 27
圏論3分クッキング
(ゆるふわ)
圏論3分クッキング
(ゆるふわ)
30
趣旨
● wikipedia「圏」の項を
適宜、簡略,追加して書いています
– https://ja.wikipedia.org/wiki/圏_(数学)
● 圏論を
…ゆるふわに説明したいなぁ 。
目録
● 圏の定義
● 圏の例(群の圏)
● 関手
● おまけ
僕
・名前:   あいや (@aiya_000)
– 主兵装: C#
– 使いたいもの: Haskell
– 自学で圏論をちょくちょく進めては
Twitterでご指摘をいただいている
(大感謝)
圏の定義
圏の定義
● 圏Cとは次のものからなる
– 対象 ­ 対象X, 対象Y, 対象Z (X,Y,Z C)∈
– 射 ­ 対象の組(X, Y)  に対して 射f : X ­> Y
– 恒等射 ­ 任意の対象X  に対して 射idX : X ­> X
対象X, Y, Z
射f : X ­> Y
射idX : X ­> X
射idY : Y ­> Y
圏の定義
● 圏Cとは次のものからなる
– 合成 
● 任意の対象の組(X,Y,Z) があり
● 射f : X ­> Y, g : Y ­> Z があるとき
● 射g   f : X ­> Z ○ が合成可能
射f : X ­> Y
射g : Y ­> Z
 射の合成演算子 (○)
 射 (g ○ f) : X ­> Z
圏の定義
● ちなみに
– 射fの対象Xを「射のdomain(始域)」
– 射fの対象Yを「射のcodomain(終域)」という
● 射gのYは始域, Zは終域
射f : X ­> Y
射g : Y ­> Z
 射の合成演算子 (○)
 射 (g ○ f) : X ­> Z
圏の定義
● 射は射の合成について以下を満たす
– (h   g)   f = h   (g   f) (○ ○ ○ ○ 結合律)
– idY   f = f   id○ ○ X = f
f : X ­> Y
g : Y ­> Z
h : Z ­> V
idX : X ­> X
idY : Y ­> Y
圏の例(群の圏)
圏の例(群の圏)
● 圏Grp ­ 群の圏(群視点)
– 群が対象
– 群の準同型写像が射
圏Grpの部分圏Grp'
Z
Y
対象A(群A)
X X'
対象B(群B)
Y'
Z'
射f(準同型写像f):A ­> B
圏の例(群の圏)
● 圏Grp ­ 群の圏(圏視点)
– 群が対象
– 群の準同型写像が射
A B
射f:A ­> B
圏Grpの部分圏Grp'
関手
関手
● 2つの圏C,Dがあったとき
● 関手F:C ­> Dは圏C,Dに以下の対応関係を与える
– Cの対象X  に対し
Dの対象F(X)
– Cの射f : X ­> Y に対し
– Dの射F(f) : F(X) ­> F(Y)
関手
● Cの対象X  に対し
Dの対象F(X)
● Cの射f : X ­> Y に対し
Dの射F(f): F(X) ­> F(Y)
X
Y
f
F(X)
F(Y)
F(f)関手F
圏C 圏D
関手
● 関手は対象と射に関する次の性質を満たす
– Cの各対象をDの各対象に対応させる
= 対象関数
– Cにおける射をDにおける射に対応させる
= 射関数
X
Y
f
F(X)
F(Y)
F(f)関手F
圏C 圏D
関手
● Cの各対象をDの各対象に対応させる
– 対象X C∈    と 対象F(X) D∈
– 対象Y C∈    と 対象F(Y) D∈
X
Y
f
F(X)
F(Y)
F(f)
圏C 圏D
関手
● Cにおける射をDにおける射に対応させ
次に示す2つの性質を満たす
– ①各対象X C∈ に対して
F(idX) = idF(X)
圏C 圏D
X
idX idF(X)
F(X)
関手
● ①各対象X C∈  に対して F(idX) = idF(X)
– idX      C∈
– idF(X)    D∈
– F(idX)   D∈
圏C 圏D
X
idX idF(X)
F(X)
関手
● ①各対象X C∈  に対して F(idX) = idF(X)
– 関手の始域の圏の各対象の恒等射は
– 必ず終域の圏の各対象の恒等射に写される
圏C 圏D
X
idX idF(X)
F(X)
関手
● Cにおける射をDにおける射に対応させ
次に示す2つの性質を満たす
– ②任意の射f:X­>Y, g:Y­>Z  に対して
F(g f○ ) = F(g)   F(○ f)
 Zunko has gone to the heaven /
圏C
X
Y Z
f
g
g f○
圏D
X
Y Z
F(f)
F(g)
F(g f○ )
= F(g)○F(f)
関手
● 任意の射f:X­>Y, g:Y­>Z  に対して
F(g f○ ) = F(g)   F(○ f)
● これは関手が「射の構造を保つ」ことを示す
 Zunko has gone to the heaven /
圏C
X
Y Z
f
g
g f○
圏D
X
Y Z
F(f)
F(g)
F(g f○ )
= F(g)○F(f)
おまけ
おまけ
モナドは単なる
自己関手の圏における
モノイド対象だよ♡
おまけ
● 始域と終域の圏が同じ関手G : C ­> Cを
「自己関手」と呼ぶ
– 「恒等関手」は自己関手の一種
圏C
X
Y Z
f
g
関手G : C ­> C
だいじ!
owari !

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

圏論 3分(?) クッキング