ãããã°ã©ãã®ããã®åè«ãã¯ããã¾ã§ã®åãã¾ã¨ãã¦PDFãã¡ã¤ã«ã«ãã¾ãããåèã«ãã¦ãã ããã
Category Theory for Programmers: The Preface Posted by Bartosz Milewski under C++, Category Theory, Functional Programming, Haskell, Programming [184] Comments Table of Contents Part One Category: The Essence of Composition Types and Functions Categories Great and Small Kleisli Categories Products and Coproducts Simple Algebraic Data Types Functors Functoriality Function Types Natural Transformati
This is part 28 of Categories for Programmers. Previously: Kan Extensions. See the Table of Contents. A category is small if its objects form a set. But we know that there are things larger than sets. Famously, a set of all sets cannot be formed within the standard set theory (the Zermelo-Fraenkel theory, optionally augmented with the Axiom of Choice). So a category of all sets must be large. Ther
ã¨ããæ°å¼ãåºã¦ãã¦ããï½ã®ãã¢ããã£ã¦æãã«ãªãã¾ãã $X$ã¨ããã®ã¯$Sets$ã®ä¸ã®å¯¾è±¡ã§ãä½ãã®éåãããã§ãã $1$ã¨ããã®ã¯$Sets$ã®ä¸ã®çµå¯¾è±¡ã§ããªãã§ãããããè¦ç´ æ°ã1ã®éåã ããã§ãã ããã¦$Hom_{Sets}(1,X)$ã¯çµå¯¾è±¡ãã$X$ã¸ã®å°ãå ¨ã¦éããéåã ããã§ãã ã¨ãªãã¨ããã®æ°å¼ã¯ãããéåã¨ã$Sets$ã®ä¸ã®å°ã®éåãåããã®ã ã¨è¨ã£ã¦ãããã¨ã«ãªãã¾ãã ãããªãã¨è¨ããã¦ããããããåãã«è¦ãã¾ããï¼ ãã¦ããããªæã«å©ãã«ãªãã®ã¯ããã£ã±ãå ·ä½ä¾ã§ãã ã¨ã«ããå ·ä½ä¾ãè¦ã¦ãã ãããã®æãã§ããããã¤ãã¿ã¾ãããã ãã®ããã«$Sets_{fin}$ã使ãã¾ãã ãã®ã³ã¼ããã³ãããããªããªããªããã¦ãæå ã«SetsFin.hsãç¨æãã¦ãã ããã ãããghciã«èªã¿è¾¼ã¾ãã¾ãã
Kleisli Categories Posted by Bartosz Milewski under C++, Category Theory, Haskell [34] Comments In the previous installment of Categories for Programmers, Categories Great and Small, I gave a few examples of simple categories. In this installment weâll work through a more advanced example. If youâre new to the series, hereâs the Table of Contents. Composition of Logs Youâve seen how to model types
8th October 2014 in London There are 7 other SkillsCasts available from Haskell eXchange 2014 Please log in to watch this conference skillscast. In this talk, I hope to explain a little bit about how categories can help the working Haskeller. I'll focus on two aspects: categories as an organising principle, helping us to manage generic libraries; and categories as a reasoning principle, helping us
Interactive code snippets not yet available for SoH 2.0, see our Status of of School of Haskell 2.0 blog post This post is a bit of a divergence from my norm. I'm going to editorialize a bit about mathematics, type classes and the tension between different ways of fitting ideas together, rather than about any one algorithm or data structure. I apologize in advance for the fact that my examples are
Wed, Apr 30, 2014 I hope most mathematicians continue to fear and despise category theory, so I can continue to maintain a certain advantage over them. âJohn Baez The above is a graph of the number of times the phrase âcategory theoryâ has been used in books, from about 1950 through the present. It speaks for itself. But why? Whatâs the big deal? Why does category theory matter? Iâm about a quarte
category-extras: A meta-package documenting various packages inspired by category theory The obsolete category-extras package provided a monolithic set of modules designed for the use of category theory in Haskell. It was exploded into more focused, self-contained packages (listed in the dependencies below); this meta-package documents where the code has gone. In addition to the core definitions,
åã¯å¯¾è±¡ã¨å°ã®éã¾ãã ãããã®æãè¦ç´ çãªãã®ã¨ãã¦ï¼ã¤ã®éåï¼å¯¾è±¡ï¼ã¨ãã®éã®ååï¼å°ï¼ã®æ§è³ªã«ã¤ãã¦èãã¦ã¿ããã ã¾ããéå A ããéå B ã¸ã®åå f ãããã¨ããããããåã«ãªãããã«ã¯ãéå A ã®ã©ã®è¦ç´ a ã«ã対å¿ããéå B ã®è¦ç´ f(a) ãå®ç¾©ããã¦ããªããã°ãªããªãããã®ã¨ãéå A ã¯å° f ã® domain ã§ãéå B 㯠codomain ã¨ãªããï¼åã¨ããå ´åã«ã¯ãå°ã®åæã®åå¨ã¨ãçµåå¾ã¨ãåä½å å¾ãå¿ è¦ã ãå®ç¾©ã¯ãããæºããã¦ããã詳細ã¯çç¥ãããï¼ ä¾ãã°ãA = [a, b, c] 㧠B = [h, i, j, k] ã§ããã°ãf(a) = h, f(b) = i, f(c) = j ã¨ãªãå° f ã¨éå A, B ã¯åã§ããã ãã¦ããã®ãããªéå A ããéå B ã¸ã®å° f :: A -> B ãããã¨ããããã¨ã¯éæ¹åã®ã g :
ãã®é ç®ã§ã¯ Haskell ã«é¢é£ããå 容ã«éã£ã¦åè«ã®æ¦è¦³ãä¸ãããã¨ã試ã¿ãããã®ããã«ãæ°å¦çãªå®ç¾©ã«ä½µã㦠Haskell ã³ã¼ãã示ãã絶対çãªå³å¯ãã¯æ±ããªãããã®ããããåè«ã®æ¦å¿µã¨ã¯ã©ããªãã®ããã©ã®ããã« Haskell ã«é¢é£ãããã®ç´æçãªç解ãèªè ã«ä¸ãããã¨ã追æ±ããã ï¼ã¤ã®å¯¾è±¡A, B, Cãï¼ã¤ã®æçå°, , ã¨ãããã«å¥ã®å°, ãããªãåç´ãªåãï¼ã¤ãã®è¦ç´ (ã©ã®ããã«å°ãåæãããã®å®ç¾©)ã¯ç¤ºãã¦ããªãã æ¬è³ªçã«ãåã¨ã¯åç´ãªéã¾ãã§ãããããã¯æ¬¡ã®ï¼ã¤ã®è¦ç´ ãããªãã 対象(Object)ã®éã¾ãã ãµãã¤ã®å¯¾è±¡(source objectã¨target object)ãã²ã¨ã¤ã«çµã³ã¤ããå°ã®éã¾ãã(ãããã¯arrowã¨å¼ã°ãããã¨ãããããHaskellã§ã¯ããã¯å¥ã®æå³ãæã¤ç¨èªãªã®ã§ãããã§ã¯ãã®ç¨èªãé¿ãããã¨ã«ããã) f ãã½ã¼ã¹ãªã
ãããã¯ã¼ã¯ã®è¨æ¸¬ã¨è§£æ ã¤ã³ã¿ã¼ãããã®ä½¿ããæ¹ããããã¯ã¼ã¯ã®æåãææ¡ããäºã¯ããããã¯ã¼ã¯ãéç¨ãããã®æè¡éçºãè¡ã ããã«æ¬ ããã¾ããããããã観測ã§å¾ããããã¼ã¿éã¯è¨å¤§ã§ãããã¤ãºãå¤ããã¾ãã観測ã§ããã®ã¯æ¥µãã¦éãããé¨åã§ããããã¾ãããããã§ãè¨å¤§ãªãã¼ã¿ããæå³ã®ããæ å ±ãæ½åºããããé¨åçãªè¦³æ¸¬ããããä¸è¬çãªå¾åãæ¨æ¸¬ããäºãå¿ è¦ã¨ãªãã¾ãã... ã¤ã³ã¿ã¼ãããåºç¤æè¡ éãã¦ãå®å ¨ã§ãä¿¡é ¼æ§ãé«ãã使ããããããªã©ãã¤ã³ã¿ã¼ããããµã¼ãã¹ã¸ã®è¦æ±ã¯ã¾ãã¾ãé«ã¾ã£ã¦ãã¾ãããããã®è¦æ±ã«å¿ããããã«ãã¤ã³ã¿ã¼ãããã® åºç¤æè¡ãæ¥ã é²æ©ãã¦ãã¾ãããã¾ãã¤ã³ã¿ã¼ãããã¯ã¤ãªããã ãã®ãµã¼ãã¹ã§ã¯ãªããé«åº¦ã§è¤éãªæ©è½ãåãã社ä¼åºç¤ã¨ãªãã¾ãããIIJæè¡ç 究æã¯ãã¤ã³ã¿ã¼ãããã®åºç¤ã¨ãã¦å®ç¾ãæå¾ ãããæ©è½ãæä¾ããããã«ããã¾ãã¾ãªæè¡èª²é¡ã«åãçµãã§
endomap endomap 㯠domain 㨠codomain ãåãå°ã ãããçãããã®ã§ã¯ãªããæ´æ°ã®éåã domain ã¨ããæ´æ°ã®2åã®å¤ãè¿ãé¢æ°ï¼å°ï¼ã¯ãcodomain ãæ´æ°ã«ãªãã Prelude> :set +m Prelude> let Prelude| double :: Int -> Int Prelude| double x = 2 * x Prelude| Prelude> double 3 6 æéåã®æ°å¤ã®éåã® endomap ã®ãã¡ãå ¨åå°ã«ãªããã®ã¯ãé åã ã Prelude> let Prelude| f 1 = 4 Prelude| f 2 = 3 Prelude| f 3 = 2 Prelude| f 4 = 1 Prelude| Prelude> map f [1,2,3,4] [4,3,2,1] identity map endo
Haskell ãåå¼·ãå§ã㦠IO ã¢ãããªããã«åºããããªããã°åè«ãªã©è¿ã¥ããã¨ãããªãã£ãã ããããã¢ãããæ£ç¢ºã«ç解ããããªã£ã¦ãåè«ã®å ¥éæ¸ Conceptual Mathematics: A First Introduction to Categories F. William Lawvereã Stephen H. Schanuel ãèªã¿å§ãããé«æ ¡åæ¥ç¨åº¦ã®äºåç¥èã§ãèªããããã«æåä¸å¯§ã«æ¸ããã¦ããã®ãããããã ããããåè«ã¯åè«ãªã®ã§ãããç°¡åã«ç解ã§ããããã«ã¯æããªããããã§ãåãã£ãã¨æããã¨ãããã¾ã¨ãã¦ã¿ãäºã«ããã åè«ã¯é©ç¨ç¯å²ãåºãæ½è±¡çãªèãæ¹ãªã®ã§ãå ·ä½çãªã¤ã¡ã¼ã¸ãä½ãã«ããããã¯ããæ £ã親ããã éåã¨ååã使ãããéåã®åãããå§ããæ¹ãè¯ãããã ãéåã¨ååãã対象ã¨å°ã¨ãã¦åãæ±ãäºã«ãã£ã¦ãä»ã®åã«å¯¾ãã¦ãã¤ã¡ã¼ã¸ãåºãã¦ããäºãã§
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}