1 + 1 = 2
This commit is contained in:
18
tests/black/caseeval.newt
Normal file
18
tests/black/caseeval.newt
Normal file
@@ -0,0 +1,18 @@
|
||||
module CaseEval
|
||||
|
||||
data Nat : U where
|
||||
Z : Nat
|
||||
S : Nat -> Nat
|
||||
|
||||
plus : Nat -> Nat -> Nat
|
||||
plus Z y = y
|
||||
plus (S x) y = S (plus x y)
|
||||
|
||||
data Eq : {A : U} -> A -> A -> U where
|
||||
Refl : {A : U} -> {x : A} -> Eq x x
|
||||
|
||||
two : Eq (plus (S Z) (S Z)) (S (S Z))
|
||||
two = Refl
|
||||
|
||||
three : Eq (plus (S Z) (S (S Z))) (plus (S (S Z)) (S Z))
|
||||
three = Refl {Nat} {S (S (S Z))}
|
||||
Reference in New Issue
Block a user