mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-21 03:41:30 +03:00
17 lines
260 B
Plaintext
17 lines
260 B
Plaintext
data Nat : Type where
|
|
Z : Nat
|
|
S : Nat -> Nat
|
|
|
|
data NotZero : Nat -> Type where
|
|
Is : {n : Nat} -> NotZero (S n)
|
|
|
|
record Positive (n : Nat) {auto 0 pos : NotZero n} where
|
|
constructor Check
|
|
|
|
a : Positive (S Z)
|
|
a = Check
|
|
|
|
b : Positive (S (S Z))
|
|
b = Check
|
|
|