Module
Data.Ring.Module
- Package
- purescript-ring-modules
- Repository
- f-o-a-m/purescript-ring-modules
#LeftModule Source
class (Ring r) <= LeftModule x r | x -> r where
Left modules over rings.
Instances must satisfy the following laws:
- Left distributivity:
r ^* (x ^+ y) = r ^* x ^+ r ^* y
- Left distributivity:
(r + s) ^* x = r ^* x ^+ s ^* x
- Left compatibility:
(r * s) ^* x = r ^* (s ^* x)
- Left identity:
one ^* x = x
Members
Instances
(Ring a) => LeftModule Unit a
#mnegateL Source
mnegateL :: forall r x. LeftModule x r => x -> x
#RightModule Source
class (Ring r) <= RightModule x r | x -> r where
Right modules over rings.
Instances must satisfy the following laws:
- Right distributivity:
(x +^ y) *^ r = x *^ r +^ y *^ r
- Right distributivity:
x *^ (r + s) = x *^ r +^ x *^ s
- Right compatibility:
x *^ (r * s) = (x *^ r) *^ s
- Right identity:
x *^ one = x
Members
Instances
(Ring a) => RightModule Unit a
#mnegateR Source
mnegateR :: forall r x. RightModule x r => x -> x
- Modules
- Data.
Ring. Module