Created
September 15, 2016 11:43
-
-
Save petercommand/955480cf4c182b7161edcbf5ba88f0ce to your computer and use it in GitHub Desktop.
This file contains 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
data W (S : Set) (P : S -> Set) : Set where | |
sup : (s : S) (f : P s -> W S P) -> W S P | |
data ⊥ : Set where | |
record ⊤ : Set where | |
data Bool : Set where | |
tt : Bool | |
ff : Bool | |
Nat : Set | |
Nat = W Bool (λ { tt -> ⊤ | |
; ff -> ⊥ }) | |
zero : Nat | |
zero = sup ff (λ ()) | |
suc : Nat -> Nat | |
suc n = sup tt (λ _ -> n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment