This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Source: Conor McBride | |
| -- https://personal.cis.strath.ac.uk/conor.mcbride/fooling/Jigger.agda | |
| module Jigger where | |
| data Nat : Set where | |
| zero : Nat | |
| suc : Nat -> Nat | |
| _+_ : Nat -> Nat -> Nat | |
| zero + n = n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set Primitive Projections. | |
| From Equations Require Import Equations. | |
| Set Equations Transparent. | |
| Record maybe (X : Type) := { | |
| dom : Prop ; | |
| val : dom -> X ; | |
| }. | |
| Arguments dom {X}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Stdlib Require Import Vector. | |
| Notation vec := Vector.t. | |
| Arguments nil {A}. | |
| Arguments cons {A} _ {n}. | |
| (* For some reason cons has the length argument after the head argument, which | |
| will be cumbersome here. *) | |
| Definition cons' {A} n (x : A) (xs : vec A n) : vec A (S n) := cons x xs. | |
| Arguments cons' {_} _ _ _ /. |
OlderNewer