mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-13 23:58:38 +00:00
Lots of speedups (#116)
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user