ããã°ã©ãã®ããã®åè«(åç´ç·¨)ã§ã¯ãèªç¶å¤æã¾ã§èª¬æãããããã¾ã§ç解ããã¨æ¬å½ã®æå³ã§åè«ãèªç±ã«æ±ããããã«ãªããä¸ç´ç·¨ã§ã¯ãããã¾ã§ã®ç解ãè¸ã¾ãã¦ãããã«åè«ã®å¥¥ç¾©ãå¦ã¶ãã¨ã«ãããã
ï¼ï¼æ¥µé
åè«ã®ç¹å¾´ã¯æ½è±¡é層ã ã¨æããåã¯ã対象ã¨å°ã«ãã£ã¦æ§æãããæ§é ã ãå¾ã£ã¦é©å½ã«ã対象ã¨å°ãé¸ã¶ãã¨ã«ãã£ã¦ãåãä½ããã¨ãã§ãããä¸å³ã§ã¯ãå\(\mathcal{B}\)ã¯ã対象\(A,Aâ\)ã¨å°\(f,fâ,fââ\)ã«ããæ§æããã¦ãã(åãæ§æããã«ã¯ããã®ã»ãã«ãåæãæçå°ãªã©ãå¿ è¦ã¨ãããããã§ã¯æ¬è³ªçãªãã®ã ãã§è¨è¿°ãã)ã
ããã«ãåã対象ã«ãã¦ãåã¨åã¨ã®é¢ä¿ãå°ã¨ãããã¨ã§ãæ½è±¡çãªåãä½æãããã¨ãã§ããããã®æä½ãç¹°ãè¿ããã¨ã§ãããæ½è±¡çãªåãå¾ããã¨ãã§ããã
ä¸å³ã§ã¯ãå\(\mathcal{B}\)ã対象\(B\)ã«ãã¦ãæ°ããªå\(\mathcal{C}\)ãæ§æããã\(Bâ\)ã¯åããå\(\mathcal{Bâ}\)ã対象ã«ãããã®ã§ããã\(g,gâ,gââ\)ã¯å\(B\)ã¨\(Bâ\)ã®éã®å°ã§ãããä¸è¬ã«ã¯ã\(g,gâ,gââ\)ã¯é¢æã¨å¼ã°ãã\(\mathcal{C}\)ã¯å°ããªåã®åã¨å¼ã°ããã
åãããã«ãå\(\mathcal{D}\)ãæ§æãããããã®æã\(h,hâ,hââ\)ã¯èªç¶å¤æã¨å¼ã°ããã
éã«ãããåããããã®å¯¾è±¡ã®è¦ç´ ã対象ã¨ããè¦ç´ éã®é¢ä¿ãå°ã¨ãããã¨ã§ãå ·ä½çãªåãä½æãããã¨ãã§ããããã®æä½ãç¹°ãè¿ããã¨ã§ãããå ·ä½çãªåãå¾ããã¨ãã§ããã
対象ã¨å°ã¨ããæ¦å¿µã§ãæ½è±¡é層ã®ã©ã®ã¬ãã«ããæ§æã§ãããããåã®æ§é ã¯ã¨ã¦ãè¦åçã§ãç°¡æ½ã§ããã¨è¨ããã
åè«ã§ã¯ããããã種é¡ã®ä¸ã§æãç«ã£ã¦ãããããªæ®éçãªæ§è³ªã表ç¾ãããã¨ãä¸ã¤ã®ç®æ¨ã¨ãããåè«ã®æç§æ¸ãéãã¨æ§ã ãªæ®éæ§ãè¦ã¤ãããã¨ãã§ããããã®ä¸ã§ãæ½è±¡é層ã®æç¨æ§ãæãã¦ãããæ®éæ§ã¯æ¥µéã ã¨æããä¸å¦æ ¡ã§ã¯ãæå¤§å ¬åæ°ãæå°å ¬åæ°ãªã©ãç¿ã£ãããé«æ ¡ã§ã¯é¢æ°ã®æ大å¤ã»æå°å¤ãç¡éæ°åã®æ¥µéå¤ãªã©ãå¦ãã ããããã¯ãããæ§è³ªãæãããã®ã®ä¸¦ã³ã®ä¸ã§ã極éã«ãããã®ãæ±ãã¦ããã
ããã§ã¯ãåè«ã§ã®æ¥µéãã©ã®ãããªãã®ã§ããããè¦ã¦ãããã極éã®èª¬æã¯ãåã§ã®ç©ãç¨ãã¦è¡ããã¦ãããã¨ãå¤ãã®ã§ãããã§ããç©ãç¨ãã¦èª¬æãããã
ï¼ï¼ï¼ãåã§ã®ç©
åè«ã¯ã対象ãå®ç¾©ããªããã°ãªããªããããã§ã¯ãã¾ãã\(A\)ã¨\(B\)ã対象ã¨ããããããã¦ããã®ç©ã\(A \times B\)ã§è¡¨ããã¨ã«ãããã次ã«ãå°ãå®ç¾©ãããã¨ã«ããããããã§ã¯ã\(A \times B\)ãã\(A\)ã¸ã®å°\(fst\)ã¨\(A \times B\)ãã\(B\)ã¸ã®å°\(snd\)ã¨ã§è¡¨ããã¨ã«ããããå³ã§è¡¨ãã¨æ¬¡ã®ããã«ãªãã
\(A\)ã¨\(B\)ãéåã®å ´åã«ã¯ãç©ã¯ãã«ã«ãç©ã¨å¼ã°ããããããã®è¦ç´ \(a \in A\)ã¨\(b \in B\)ã®å¯¾(a,b)ã§è¡¨ããã¨ãã§ããã対ã¨ãã¦è¡¨ããæãæåã®è¦ç´ ã\(A\)ã«ãäºçªç®ã®ããã\(B\)ã«å±ãã¨ããæå³ã§ãåãããããããããã«ä¾¿å®çã«ãå°\(fst\)ã¨\(snd\)ãç¨ããããã®ããã\(fst\)ã¨\(snd\)ã§ããå¿
ç¶æ§ã¯ãªãã®ã§ãä¸è¬çã«ããç¨ãããã¦ãã\(\pi_1\)ã¨\(\pi_2\)ã§ãã£ã¦ãããã
åã§ç¨ãããã¦ãã対象ãå°ãç©ã漫ç¶ã¨ç解ããã¾ã¾ã§æ¬¡ã«é²ãã¨ç½ ã«ã¯ã¾ã£ã¦ãã¾ããã¨ãå¤ãã®ã§ãããã§ã¯ããããã®æ¦å¿µãå
·ä½çãªä¾ãç¨ãã¦ããã詳ããç解ãããã¨ã«ãããã
åã§ã®ç©ã¯ãä¹ç®ã§ãã£ãããè«çç©ã§ãã£ããããããããã§ã¯ãè«çç©ã¨èãããã¨ã«ããããã¾ãã対象ã¯ãé£ç¶çãªç©ºéã§ãã£ãããæéã®è¦ç´ ã®éåã§ãã£ããããããããã§ã¯ãã¾ããæéãªè¦ç´ ã®éåã¨ãããããã¦ã次ã®ãããªåé¡ãèãããã¨ã«ãããã
ä¾é¡1
ãããå¦å¹´ã§ã®\(A\)çµã®ã¯ã©ã¹ã§ä½è²ä¼ç³»ã®é¨ã«å±ãã¦ããç·å¥³ã®ãã¢ããããã«ã¤ãã¦ãåãé¨ã«å±ãã¦ãããã©ãããå¼å¥ãããããã°ã©ã ãèããå ã®å¯¾è±¡\(A \times B\)ãä½ã«ãããããããèãããã¨ã«ãããã
ãã®ããã°ã©ã ã¯ãæ¡ä»¶ã\(A\)çµã®ã¯ã©ã¹ã§ä½è²ä¼ç³»ã®é¨ã«å±ãã¦ããç·å¥³ã®ãã¢(ããã¯ãåä¸ã§ãè¤æ°ã§ãã£ã¦ãããã¨ãã)ããæºãããã®ã®ã¿åãä»ãããã¨ã§ããããã§ãªãå ´åã«ã¯ãåãä»ããå¦çãè¡ããªããã®ã¨ãããããã°ã©ã ãåãä»ããå ´åãåä¸ã®ä½è²ä¼ç³»ã®é¨ã«å±ãã¦ããå ´åã«ã¯\(True\)ããç°ãªãä½è²ä¼ç³»ã®é¨ã«å±ãã¦ããå ´åã«ã¯\(False\)ãè¿ããã®ã¨ãããããã¦ãããã°ã©ã ãåãä»ãã¦ããããã®ã\(A \times B\)ã®åè£ã¨ãããã¨ã«ãããã
ä¾ãã°ã\(A\)çµããã¹é¨æå±\(B1\)åã¨\(A\)çµæ°´æ³³é¨æå±\(G1\)ããã®\(P1=(B1,G1)\)ãããã°ã©ã ã«å ¥åããã¨ããããäºäººã¨ã\(A\)çµã«å±ããä½è²ä¼ç³»ã®é¨ã«å±ããã®ã§ãããã°ã©ã ã¯åãä»ãã¦ããã\(False\)ãè¿ã£ã¦ãããå¾ã£ã¦ã\(p1\)ã¯\(A \times B\)ã®åè£ã§ããã
次ã®ä¾ã¯ã©ãã§ããããã\(B\)çµæå±ã®ç·å\(b2\)ã¨\(A\)çµããã¹é¨æå±ã®å¥³å\(G2\)ã®å¯¾\(P2=(B2,G2)\)ãããã°ã©ã ã«å ¥åããã¨ããããç·åã\(A\)çµã§ãªãã®ã§ããã®ããã°ã©ã ã¯ãã®å ¥åãåãä»ããªãããã®ããã\(P2\)ã¯åè£ã¨ãªããªãã
ããã§ã¯ã\(A\)çµåçé¨æå±ã®ç·å\(B3\)ã¨\(A\)çµãã³ã¹é¨æå±ã®å¥³å\(G3\)ã®å¯¾\(P3=(B3,G3)\)ãããã°ã©ã ã«å ¥åããã¨ãããããã®å ¥åã¯åãä»ããããããã®ããã\(P3\)ã¯åè£ã¨ãªãã
ãã®ãããªãã¨ãç¹°ãè¿ãè¡ã£ãã¨ããã¨ãããã¤ãã®åè£ãä¸ããã§ãããããã®ä¸ã§ãä¸è¶³ãããã¨ãªãæ¡ä»¶ã«åã対ã¨ãªã£ã¦ããã®ã¯ã©ãã§ããããã\(A\)çµä½è²ä¼ç³»ã®é¨ã«æå±ããç·å\(Bas\)ã¨\(A\)çµä½è²ä¼ç³»ã®é¨ã«æå±ãã女å\(Gas\)ã®å¯¾ã§ãããã¨ã¯å®¹æã«åããã
ãããå³ã§è¡¨ãã¦ã¿ããã\(P1\)ã¨\(P3\)ã¨\(Bas \times Gas\)ãåè£ã§ããã\(A \times B = Bas \times Gas\)ãæ¡ä»¶ãæºããæ大ã®éåã§ãããã¨ãåãã£ãã®ã§ã次ã®å¯æå³å¼ãå¾ããå³ã«ããã¦\(incl\)ã¯å
å«é¢æ°ã§ããã
ãã®ä¾ã§ã\(A \times B \)ã®åè£ã¨ãªãã®ã¯ã\(Bas \times Gas\)ã®é¨åéåã§ãããã¨ãåããã
ä¾é¡2
å ã®ä¾ã¯é¢æ£ç³»ã§ãã£ãã®ã§ãä»åº¦ã¯é£ç¶ãã空éã§ã®ä¾ãæãããã¨ã«ããããããå°å\(R\)ã®æ¨é«ã¨å¹´éå¹³åæ°æ¸©ã®é¢ä¿ã表ããã¨ãèããããä»ãæ¨é«ã®æ¹ã¯èµ¤è²ã§è¡¨ããã¨ã«ããé«ãã»ã©æ¿ããªãããã«ãããã¾ããæ°æ¸©ã®æ¹ã¯é»è²ã§è¡¨ããã¨ã«ããä½ãã»ã©æ¿ããªãããã«ããããããã®è²ã¯çµµã®å ·ã§æ··ãããã¨ã«ãããå¾ã£ã¦ãæ¨é«ãé«ãæ°æ¸©ãä½ãã»ã©ãæ©è²ã¯æ¿ããªããå対ã®å ´åã«ã¯èããªãã
æ¨é«ã赤è²ã§è¡¨ããå°å\(R\)ã®å°å³ã\(A\)ã¨ããå¹´éå¹³åæ°æ¸©ãé»è²ã§è¡¨ãã\(R\)ã®å°å³ã\(B\)ã¨ããæããã®ãããªå°å³ããã®ä¸é¨ã§ãä½æã§ãããããªãã®ãæ¢ããã¨ã¨ããããåã®ä¾ã«ç¿ã£ã¦ãããã\(A \times B\)ã®åè£ã¨å¼ã¶ãã¨ã«ãããã
\(R\)å ã®ããå°ç¹\(R1\)ã§ã®æ¨é«ã\(P1_h\)ã¨ãããã®å°ç¹ã§ã®å¹´éå¹³åæ°æ¸©ã\( R1_t\)ã¨ããæã\(R1=(R1_h, R1_t\)ã¯ãæ±ãããã¦ããå°å³ã®ä¸é¨ãæããã¨ãã§ããã®ã§ãåè£ã¨ãªãã
\(R\)ã®é£ã®å°å\(R2\)ã§ã®æ¨é«ã\(R2_h\)ã¨ããããã®å¹´éå¹³åæ°æ¸©ã\( R2_t \)ã¨ããæã\(R2=(R2_h, R2_t)\)ã¯ãæ±ãããã¦ããå°å³ã®ç¯å²å¤ã§ããã®ã§ãåè£ã¨ã¯ãªããªãã
\(R\)ã«å«ã¾ããå°ããªå°å\(R3\)ã§ã®æ¨é«ã\(R3_h\)ã¨ããããã®å¹´éå¹³åæ°æ¸©ã\( R3_t \)ã¨ããæã\(R3=(R3_h, R3_t)\)ã¯ãæ±ãããã¦ããå°å³ã®ä¸é¨ãæããã¨ãã§ããã®ã§ãåè£ã¨ãªãã
\(R\)ã«å«ã¾ããå°ããªå°å\(R4\)ã§ã®æ¨é«ã\(R4_h\)ã¨ãã\(R\)å ã®å¥ã®å°å\(R4â\)ã®å¹´éå¹³åæ°æ¸©ã\( R4â_t \)ã¨ããæã\(R4=(R4_h, R4â_t)\)ã¯ãæ±ãããã¦ããå°å³ã®ä¸é¨ãæããã¨ãã§ããªãã®ã§ãåè£ã¨ãªããªãã
\(R\)ã«å«ã¾ããå°ããªå°å\(R5\)ã§ã®æ¨é«ã\(R5_h\)ã¨ãã\(R5\)ã®å¹´éæ¥ç §æéã\( R5_s \)ã¨ããæã\(R5=(R5_h, R5_s\)ã¯ãæ±ãããã¦ããå°å³ã®ä¸é¨ãæããã¨ãã§ããªãã®ã§ãåè£ã¨ãªããªãã
ãããã®é¢ä¿ãå¯æå³å¼ã§ç¤ºããã®ããä¸å³ã§ããã
ãã®ä¾ã§ãã\(A \times B \)ã®åè£ã¨ãªãã®ã¯ã\(R_h \times R_t\)ã®é¨åéåã§ãããã¨ãåããã
ï¼ï¼ï¼ãç©ã®å®ç¾©
åã§ã¯ç©ã¯æ¬¡ã®ããã«å®ç¾©ãããã
\(\mathcal{C}\)ãé©å½ãªå¯¾è±¡\(A,B\)ãæããåã¨ããã\(A\)ã¨\(B\)ã®ç©ã¯ã\(A \times B\)ã¨æ¸ããã\(\mathcal{C}\)ã®å¯¾è±¡ã¨äºã¤ã®å°\(fst : A \times B \rightarrow A \)ããã³\(snd : A \times B \rightarrow B \)ã¨ã®çµã§ã以ä¸ã®æ®éæ§ãæºãããã®ãããã
ç©ã®æ®éæ§
ä»»æã®å¯¾è±¡\(X\)(ããã¯ä¾é¡1ï¼2ã§ã¯åè£ã¨å¼ãã§ãããã®)ããã³å°ã®å¯¾\(p:X \rightarrow A\)ããã³\(q:X \rightarrow B\)ãä¸ããããæãä¸æçãªå°\(m : X \rightarrow A \times B\)ãåå¨ãã¦ãä¸å³
ãå¯æã«ããã
ä¸ã®å®ç¾©ããããã®åã§ã¯ã\(A\)ã¨\(B\)ã¸ã®å°ãæããã©ã®ãããªå¯¾è±¡ãæã£ã¦ããã¨ãã¦ããç©ã®æ®éæ§ãæºãããããå³ã¡ã\(A\)ã¨\(B\)ã¸ã®å°\(p'\)ã¨\(q'\)ãæããä»»æã®å¯¾è±¡\(Xâ\)ãæã£ã¦ããã¨ãã¦ãä¸å³ã®ããã«å¯ææ§ãæãç«ã¡ãä¸æçãªå°\(mâ : Xâ \rightarrow A \times B\)ãåå¨ããã
ãã®ãã¨ããããã®ãããªå ¨ã¦ã®å¯¾è±¡(ä¾é¡1ï¼2ã§åè£ã¨è¨ã£ã¦ãããã®)ã®ä¸ã§ã\(A \times B\)ã\(A\)ããã³\(B\)ã¸ã®æãåªããå°(å°ã®åæã¨ãã¦è¡¨ãããªãã¨ããæå³ã§åªããã¨ãããã¨ã«ãã)ãä¸ãããã¨ããã極éã¨ããããã(ãã ãã極éã¯ã®ã¡ã®èª¬æã§ã¯ãã£ã¨ä¸è¬çã«ä½¿ããåè£ã®ä¸ã§ãã©ããããåªããå°ãæãããã®ã¨ç解ãã¦æ¬²ãã)ã
ç解ãæ·±ããããã«ã¯ã次ã®åé¡ã解ããã¨ãå§ããã
åé¡1ï¼ä¾é¡1ãHaskellã§å®ç¾ããªããã
åé¡2ï¼ä¾é¡2ãHaskellã§å®ç¾ããªããã