1#![no_std]
2
3pub trait Semigroup {
4 fn op(Self, Self) -> Self;
5}
6
7pub trait Monoid: Semigroup {
8 fn neutral() -> Self;
9}
10
11pub trait Group: Monoid {
12 fn invert(self) -> Self;
13}
14
15pub trait Module<A>: Semigroup {
16 fn scale(self, a: A) -> Self;
17}