19 lines
349 B
Plaintext
19 lines
349 B
Plaintext
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))}
|