Idris2/libs/contrib/Data/Nat/Algebra.idr

20 lines
435 B
Idris
Raw Normal View History

2020-07-14 01:52:22 +03:00
module Data.Nat.Algebra
import Control.Algebra
import Data.Nat
%default total
2021-02-22 12:54:16 +03:00
namespace SemigroupV
public export
[Additive] SemigroupV Nat using Semigroup.Additive where
semigroupOpIsAssociative = plusAssociative
namespace MonoidV
public export
[Additive] MonoidV Nat using Monoid.Additive SemigroupV.Additive where
monoidNeutralIsNeutralL = plusZeroRightNeutral
monoidNeutralIsNeutralR = plusZeroLeftNeutral