æè¿Agdaãã¯ãã£ã¦ããã¿ãããªã®ã§ãCoqã§ãä¾ååï¼dependent typeï¼ã使ã£ã¦ã¿ãã å®è£ ããã®ã¯é·ã n ã®ãã¯ãã«åã ããã®ãã¯ãã«åã使ãã¨ã空ã§ãªãã¨ããé·ããçããã¨ããåã®æ®µéã§ä¿è¨¼ã§ããã®ã§ãããå®å ¨ãªããã°ã©ã ãæ¸ããã¨ãã§ããã®ã ã Variable A:Set. Inductive Vec : nat -> Set := | VNil : Vec O | VCons : forall n, A -> Vec n -> Vec (S n). ãã®ãã¯ãã«åã使ãã°ãã³ã³ãã¤ã«æã«é·ãã®æ´åæ§ããã§ãã¯ãã¦ããã¦ãééããããå ´æãæãã¦ããããã³ã³ãã¤ã«ããéãã°ãOutOfBoundsExceptionã®ãããªå®è¡æã¨ã©ã¼ã¯èµ·ããããªããã¨ãä¿è¨¼ãããã ä¾ãã°ãä¸è¬çã«ãªã¹ãã®headé¢æ°ã¯ãå¼æ°ã1以ä¸ã®é·ãã®ã¨ãã®ã¿å®ç¾©ã§ãã空ãªã¹ãã®å ´åã«ã¯å¤
{{#tags}}- {{label}}
{{/tags}}