2007-02-01ãã1ã¶æéã®è¨äºä¸è¦§
æ£æã«æ¸ããã¨ã³ããªã¼ã«å¯¾ãã¦ãæªå±±ãããããã©ãã¯ããã¯ãããã£ãã®ã§ãããâ¦ããã¼é¢ç½ãããªãããèªãã°èªãã»ã©ããããªãã¨ãããã£ã¦ããããã£ã±ããèªåãããããæãåããã¦èãããã¿ã«å¯¾ãã¦ã®ã¬ã¹è¨äºãªã®ã§ãå¾ããããã®ãå¤ãã®ããâ¦
Cå ã«ç¢ºå®ã«åå¨ããå°ã¨ãèªç¶å¤æéããã¾ãçµã¿åããã¦ã[Aâ¡X, B] â [A, [X, B] ] ã¨ããååå°ï¼å¯éå°ï¼ãå ·ä½çã«æ§æã§ããã°ããã®ã§ãããããã¯ãªããªãé£ããããã§ããCããã«ã«ãéãªããåä»ãã©ã ãè¨ç®ã®çµæã翻訳ãã¦å ·ä½çæ§æãã§ããâ¦
ã§ãããï¼ãµã¤ãï¼ ååä¸ã¯æ°ããã¹ãã®é¸å®ä¼ãAsperti 㨠Longo ã® Categories, Types, and Structuresã«æ±ºå®ã åå¾ããæ©éèªã¿å§ããChapter 1 ã¯ç°¡åã«çµãããã¨æããããä½ç¸ç©ºéã®åã®åé¡(ãä½ç¸ç©ºéã®åã§ãepi ã ã surjective ã§ãªãå°ãæâ¦
éã£ãæ¹é¢ããæ»ãã¦ã¿ãããªããéä¸ãtex ã® frac ã使ã£ãã®ã§è¦ã¥ããã [tex: \frac{\large X \to^{} A \times A} {\frac{\large X \to^f A \hspace{4em} X \to^g A} {\frac{\large X + X \to^{\[f,g\]} A} {\frac{\large (X \times 1) + (X \times 1)â¦
æ風åã«å ¥ã£ã¦ãããé ã«æµ®ããã ããã®ãããç´ æ´ãªçåã æ´æ°ãªãå®æ°ã§ã¯æ®éã« ã ãã©ãã«ã«ãã·ã¢ã³éå (CCC) ä¸è¬ã«ãä»»æã®å¯¾è±¡ 㧠ãªã®ã ãããï¼æ®éã«ãããªãããã ããéåã®åãªããã証æã§ãããã ãã©ã ã¤ããæ®éã®ï¼åä»ï¼é¢æ°åè¨èªâ¦
ããã¯ãã³ããå®å®ããå°ã£ã¦ããã¨ãããã³ã¼ããããæ§ãã¦ããã¨ãã¯èãæããããã§ãæ¯ããªãã伸ã°ãã¦ããããã«ããã¨ãããã¨ã¢ããã¤ã¹ããããããã¼ã確ãã«ãã£ã¡ã®æ¹ãæã¡ããããèªç¶ã«æç¹ã«å ¥ããããæè»ã«æã¦ãã ãã¨ãæãåºãããâ¦
以åã®æ¥è¨ã®ã³ã¡ã³ãã«ã¬ã¹ãã¤ããªãããå»å¹´ã®PPLãµãã¼ã¹ã¯ã¼ã«ã§æ¨ä¸å çã話ãã¦ããæ²é¡ã®å 容ãæãåºãã¾ããã 以ä¸é ã«åæã詳ããã¯æ¨ä¸å çã®ãµã¤ãã«ããè³æï¼ãã¡ãï¼ãåç §ã®ãã¨ã æ®éå° æ¥µéãä½æ¥µé éä¼´ ç±³ç°ã®è£é¡ Kanæ¡å¤§ ï¼åçï¼â¦
ããªãã è¼ãããã³ãã¬ã¼ãã¢ããã®è¨äºã§ããã åãã¤ã¤ã«ã²ã³ãªè¨èªã®ã»ãã楽ã¡ãã«å®è£ ã§ãã¾ããã©ãæ¬æ¥ã®ã¢ããæ¦å¿µã¯å¼·ãï¼ãã®ãããå¼·ãï¼åãèæ¯ã¨ããå®å¼åã«ãªã£ã¦ãã¾ãã ããããã¨ãããããã¾ãå³å¯ã«æ¸ãã¦ã¾ããã§ããã â» å人çã«â¦
æ å ±å¦ããã° ãã¨ã§èªãã
â» ä»ãããã親ã¨ä»ãåã£ã¦é ããããã¾é£²ãã ã®ã§ãæ£ãããã¨ããã¦ããã¯ï¼ãã¤ã以ä¸ã«ï¼ä¿è¨¼ã§ãã¾ãããæ¥æ¬èªãããããããããã¾ããã 以ä¸ï¼1, 2ï¼ãè¸ã¾ãã¦èãã¦ã¿ãã¨ã以ä¸ã®ãããªãããªããã£ããªé¢æ°ãããä¸å追å ããã°ãã¨ã¦ãè¦éãâ¦
ä¸ã®ã¨ã³ããªã¼ã®ç¶ããã¤ã³ã¿ããªã¿ãã¡ãã£ã¨æ¹é ãã¦ã¿ãã interpret :: Lang -> Lang -> Computer Lang interpret m l = Run $ \p -> let (p', l') = runner (run l) p in (I m p' l', m) å®è¡çµæã *Main> showComp (P S) $ return S >>= interpret Tâ¦
ãããã¢ããã§æ¸ãã¦ã¿ããããããªãã¨ãªã⦠data Lang = S | T | M deriving (Eq, Show) data Program = P Lang | I Lang Program Lang deriving Show data Computer l = Run { runner :: Program -> (Program, l) } instance Monad Computer where returâ¦
æ£æã®ç¶ãããããã¨æã£ã¦ããã©ãçµå±ä»äºãããã¨ã«ãªãããã
ãã¾ãã¾"I still love, ... " ã£ã¦æè©ãè³ã«ãã¦ããï¼ãªããæ°æã¡æªããªãã¨æãã¤ã¤ããããlove ã£ã¦ä»åè©ã ã£ã*1ãã¨æã£ãã®ã¯ããã®ã§ããããã£ãããã®æã£ã¦Î»x. "I still love x" ãªã®ãâ¦ã¨ããµã¨æã£ã¦ãã¾ã£ãç§ã â¦éãï¼ç§ã¯æ±ºãã¦Î»æä¿¡è â¦
ä»æ¥ã¯èª¿åãã¤ãã¤ãã ã£ããã ããã©ãããã¯ãã³ãã§éã¯ãã¹ãå²ã«ãã¾ãæã¦ã¦ãã®ã¯åç©«ããã ãããææã¡å¾åã復活ãã¤ã¤ããã®ã§ãæ°ãã¤ãããè©ããã£ã¡ãå ¥ãã¦ã足ãåããããã¨ãåã«åºãã¨ãã¯ãã£ã¡ãè©°ããã®ãéè¦ãï¼è¶ æ»æåãªã³ã¼ãâ¦
ååã®ã¨ã³ããªã¼ã§ Haskellã§å®éã«ã¢ããæ¸ããããããã©ãä»äºã»ã£ã½ãåºãã¦éãã§ãã¾ãããã ã£ãã®ã§ãèªéã ãããªäºãè¨ã£ã¦ã¾ããããé±æ«ã§ã¡ãã£ã¨æã空ããã®ã§ãã£ã¦ã¿ã¾ãããå ãã¿ã¯ã³ã³ã¨ãã³ã³ã¨ãã ãHaskellã®ãã¢ããæ©æ§ã使ããªâ¦