This is a markdown version of the tutorial Learn You an Agda and Achieve Enlightenment! by Liam OâConnor-Davis. I made this version for my own reference, while working through the tutorial, making some revisions and additions, and a few corrections. You may prefer the original. $\def\N{\mathbb N} \def\true{\mathsf{true}} \def\conj{\wedge} \def\disj{\vee}$ Table of Contents 1. Introduction About th
Codensity ã¨ããåããã. å®ç¾©ã¯ä»¥ä¸. newtype Codensity m a = Codensity { runCodensity :: forall b. (a -> m b) -> m b } instance Functor (Codensity k) where fmap f (Codensity m) = Codensity (\k -> m (k . f)) instance Monad (Codensity f) where return x = Codensity (\k -> k x) m >>= k = Codensity (\c -> runCodensity m (\a -> runCodensity (k a) c)) ããã®ä½ãè¯ããã¨è¨ãã¨, ããã¯ä»¥ä¸ã®ããã«MonadFreeãªä½ç¨ãæã¤. instance (Functor f, Mon
Agdaæ´2é±éãããã®ã¶ã³ã§ãã Agdaã§åè«ã®ã©ã¤ãã©ãªãä½ã£ã¦ãæµãã§ä½ç¸ç©ºéã®å®ç¾©ããããã¨æã£ããããããéåãæ®éã«æ±ããã©ã¤ãã©ãªãã©ãã«ããªãã æ¨æºã©ã¤ãã©ãªã«Relation.Unaryã¨ãããã®ããããã©ãããã¯è¡¨é¢çã«ã¯ä¸æãè¡ã£ã¦ããããã«è¦ããã ãã§ããã¾ã使ãç©ã«ãªããªãã å ·ä½çã«è¨ãã¨åéåã®å ¬çããªãã®ã§(binary cupã¨indexed bigcupã¯ãã)ä»»æåã®Unionãã¨ããªãã ä»ã«ããããããâã®å®ç¾©ãå½æ°é©ç¨ãªã®ã§ X â B ã¨æ¸ãã¨ãã«Xã¨Bã§ã¯åãéãã®ãããããã¢ãã¨ãããã¢ãã¨ãããããã®ããã§ZFã®ä¸é¨ã®å ¬çã¯åããããªãã¦è¡¨ç¾ã§ããªãã£ãããããã ããããããã§ã¾ãã¯éåã使ããããã«ããã¨ããã ãã ã³ã¼ãã¯ä¸çªä¸ã«è¼ã£ãã¾ããã ã³ã¼ãã«ã¤ã㦠äºéå¦å®é¤å» Relation.Nullary.Negation e
ghc-7.8ã§ãã«ãã§ããAgdaããã«ãã¼ã¨ãæãã¤ã¤ï¼Agda-2.3.4ã®ãªãªã¼ã¹ãã¼ã(ã¾ã ãªãªã¼ã¹ããã¦ãªããã©)ãçºãã¦ããï¼å®é¨çæ©è½ã¨ãã¦copatternsã£ã¦ãã¤ãå ¥ãã¨æ¸ããã¦ããï¼ä½(co-)ãã¤ãã¦ãã®ã§ãã¶ãå¥åº·ã«ãããªããã¤ãªãã ãããªã¨æãã¤ã¤èªãã¨ï¼ãªã«ãããããªã«ã³ã¸ã®ããã ï¼ ã¿ãã«ãã¬ã³ã¼ãã§å®ç¾©ããã¨ï¼æ¬¡ã®ããã«ãªãï¼ record _Ã_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _Ã_ã¿ãã«ã®ãã£ã¼ã«ãã¨ãã¦ã¯1çªç®ã®è¦ç´ ã§ããfstã¨2çªç®ã®è¦ç´ ã§ããsndãæã£ã¦ãã¦ï¼recordãopenããã°ãããã¯æ®éã«é¢æ°ã¨ãã¦ä½¿ããï¼ é常ï¼ã¿ãã«ãä¸ãããããªé¢æ°ã¯æçµçã«ã¿ãã«ãã³ã³ã¹ãã©ã¯ããããã¨ã«ãªãï¼ pair : {A B : Set} â
èè¹æ¡ã¶ä¸ã¸ ä»å¹´åº¦ã®ææ¥ãå ¨ã¦çµäºãããæå¾ã®ææ¥ã¯ãã¹ãè¿å´ã¨ãã®ç¢ºèªä½æ¥ã®å¾ã¯ç¹ã«ä½ãããã¨ãè¨ããã¦ããªãã£ãã®ã§ããè³ããã¾ãã°ãã®å¾åããå§ããã¨é«ãè¨ãäºããããå ´é¢ãçå¾ã¨çã§è¦ãã ãã®å ´é¢ããã®å ´é¢ããå§ããã¯é«ã«ãä»ããªãããããªããã¨ããéâ¦
See the official user manual for the most up-to-date version of the information on this page. TOC This document has been extracted from a literate Agda file, which was tested with Agda 2.3.0 Introduction Agda is a total language, so all computations must terminate and return a value without any run-time errors. This means that effectively not all programs that can be defined in (for instance) Hask
æè¿Agdaã触ãæ©ä¼ããã£ãã®ã ããAgdaããæªæ¥ã®ããã°ã©ãã³ã°è¨èªã§ã¯ãªããã¨ããæ°ããã¦ãããããã§ã¯è¡åã®è»¢ç½®ãããé¢æ°ãå®ç¾©ãããã¨ã§ãAgdaã§ã®ããã°ã©ãã³ã°ãã©ããªãã®ãç´¹ä»ãããããã®åã«ä¸è¨:Agdaã¯å®ç証æç³»ã¨ãã¦ç´¹ä»ããããã¨ãå¤ããããã¯Agdaã«ã¨ã£ã¦ä¸å¹¸ãªãã¨ã ã確ãã«Agdaã®åã·ã¹ãã ã¯å¼·åãªã®ã§ãä¾ã®ã«ãªã¼ãã¯ã¼ãååã«ãããåãå½é¡ãããã°ã©ã ã証æã¨ã¿ãªããã¨ãã§ããããã ããç§ã®å°è±¡ã§ã¯Agdaä¸ã¯æ°å¦ã®è¨¼æãããããããã«ã¯ãããªã«ã¯ã§ãã¦ããªããAgdaã§è¨¼æããã«ã¯ãããåããã¤å®æ°ãªãé¢æ°ãå®ç¾©ãããã¨ã«ãªãããã ããå®ç¾©ããé¢æ°ããã®åãæã£ã¦ããããã¨ãåãã§ãã«ã«èª¬å¾ããããã«ãåãã§ãã«ã®è©³ããæåã«ã¤ãã¦ç解ãã¦ããªããã°ãªããªããããããAgdaã¯ä¾ååããã¤ããã°ã©ãã³ã°è¨èªã¨æã£ãæ¹ãããã¨æããä¾ååã¨ã¯ãªã«ãã¯ä¾ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}