Lots of speedups (#116)

This commit is contained in:
Patrick Stevens
2020-04-16 13:41:51 +01:00
committed by GitHub
parent 1bcb3f8537
commit 9b80058157
63 changed files with 1082 additions and 564 deletions

View File

@@ -9,6 +9,7 @@ infix 15 _+N_
_+N_ :
zero +N y = y
succ x +N y = succ (x +N y)
{-# BUILTIN NATPLUS _+N_ #-}
addZeroRight : (x : ) (x +N zero) x
addZeroRight zero = refl

View File

@@ -10,6 +10,7 @@ infix 25 _*N_
_*N_ :
zero *N y = zero
(succ x) *N y = y +N (x *N y)
{-# BUILTIN NATTIMES _*N_ #-}
productZeroIsZeroLeft : (a : ) (zero *N a zero)
productZeroIsZeroLeft a = refl