mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 10:41:59 +03:00
20 lines
435 B
Idris
20 lines
435 B
Idris
module Data.Nat.Algebra
|
|
|
|
import Control.Algebra
|
|
import Data.Nat
|
|
|
|
%default total
|
|
|
|
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
|