Data.Ring.Module
 Portability non-portable (MPTCs) Stability experimental Maintainer ekmett@gmail.com
 Contents R-Modules R-Normed Modules Vector Spaces R-Algebras
Description
Left- and right- modules over rings, semirings, and Seminearrings. To avoid a proliferation of classes. These only require that there be an addition and multiplication operation for the Ring
Synopsis
module Data.Ring
class (Ringoid r, Monoid m) => Module r m
class Module r m => LeftModule r m where
 (*.) :: r -> m -> m
class Module r m => RightModule r m where
 (.*) :: m -> r -> m
class (LeftModule r m, RightModule r m) => Bimodule r m
class Module r m => Normed r m where
 mabs :: m -> r
class (Field f, Module f g) => VectorSpace f g
class (Bimodule r m, Multiplicative m) => Algebra r m
Documentation
module Data.Ring
R-Modules
 class (Ringoid r, Monoid m) => Module r m Source
Instances
 Module Natural Ordering Module Natural Ordering Module Natural () Module Natural () Module Natural All Module Natural All Module Natural Any Module Natural Any Bits a => Module Integer (Boolean a) Bits a => Module Integer (Boolean a) Module Natural ([] a) Module Natural ([] a) Monoid m => Module Natural (Dual m) Monoid m => Module Natural (Dual m) Module Natural (Endo a) Module Natural (Endo a) Num a => Module Natural (Sum a) Num a => Module Natural (Sum a) Num a => Module Natural (Product a) Num a => Module Natural (Product a) Module Natural (First a) Module Natural (First a) Module Natural (Last a) Module Natural (Last a) CharReducer m => Module Natural (UTF8 m) CharReducer m => Module Natural (UTF8 m) Module Natural (SourcePosition f) Module Natural (SourcePosition f) Monoid m => Module Natural (Self m) Monoid m => Module Natural (Self m) Monoid m => Module Natural (FromString m) Monoid m => Module Natural (FromString m) Multiplicative m => Module Natural (Log m) Multiplicative m => Module Natural (Log m) Applicative f => Module Natural (Traversal f) Applicative f => Module Natural (Traversal f) Monad f => Module Natural (Action f) Monad f => Module Natural (Action f) Module Natural (Free a) Module Natural (Free a) Bits a => Module Natural (Boolean a) Bits a => Module Natural (Boolean a) Enum a => Module Natural (BitSet a) Enum a => Module Natural (BitSet a) (Ord a, Num a) => Module Natural (Tropical a) (Ord a, Num a) => Module Natural (Tropical a) (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r) (Module r m, Module r n) => Module r ((,) m n) (Module r m, Applicative f) => Module r (App f m) (Module r m, Monad f) => Module r (Mon f m) Monoid m => Module Natural (a -> m) Monoid m => Module Natural (a -> m) Category k => Module Natural (GEndo k a) Category k => Module Natural (GEndo k a) Alternative f => Module Natural (Alt f a) Alternative f => Module Natural (Alt f a) MonadPlus f => Module Natural (MonadSum f a) MonadPlus f => Module Natural (MonadSum f a) (Module r m, Module r n, Module r o) => Module r ((,,) m n o) Monoid m => Module Natural (CMonoid m m m) Monoid m => Module Natural (CMonoid m m m) (Module r m, Module r n, Module r o, Module r p) => Module r ((,,,) m n o p) (Module r m, Module r n, Module r o, Module r p, Module r q) => Module r ((,,,,) m n o p q) Bits a => Module (Boolean a) (Boolean a) (Bounded a, Enum a) => Module (BitSet a) (BitSet a) (Ord a, Num a) => Module (Tropical a) (Tropical a)
 class Module r m => LeftModule r m where Source
` (x * y) *. m = x * (y *. m)`
Methods
 (*.) :: r -> m -> m Source
Instances
 LeftModule Natural Ordering LeftModule Natural Ordering LeftModule Natural () LeftModule Natural () LeftModule Natural All LeftModule Natural All LeftModule Natural Any LeftModule Natural Any Bits a => LeftModule Integer (Boolean a) Bits a => LeftModule Integer (Boolean a) LeftModule Natural ([] a) LeftModule Natural ([] a) Monoid m => LeftModule Natural (Dual m) Monoid m => LeftModule Natural (Dual m) LeftModule Natural (Endo a) LeftModule Natural (Endo a) Num a => LeftModule Natural (Sum a) Num a => LeftModule Natural (Sum a) Num a => LeftModule Natural (Product a) Num a => LeftModule Natural (Product a) LeftModule Natural (First a) LeftModule Natural (First a) LeftModule Natural (Last a) LeftModule Natural (Last a) CharReducer m => LeftModule Natural (UTF8 m) CharReducer m => LeftModule Natural (UTF8 m) LeftModule Natural (SourcePosition f) LeftModule Natural (SourcePosition f) Monoid m => LeftModule Natural (Self m) Monoid m => LeftModule Natural (Self m) Monoid m => LeftModule Natural (FromString m) Monoid m => LeftModule Natural (FromString m) Multiplicative m => LeftModule Natural (Log m) Multiplicative m => LeftModule Natural (Log m) Applicative f => LeftModule Natural (Traversal f) Applicative f => LeftModule Natural (Traversal f) Monad f => LeftModule Natural (Action f) Monad f => LeftModule Natural (Action f) LeftModule Natural (Free a) LeftModule Natural (Free a) Bits a => LeftModule Natural (Boolean a) Bits a => LeftModule Natural (Boolean a) Enum a => LeftModule Natural (BitSet a) Enum a => LeftModule Natural (BitSet a) (Ord a, Num a) => LeftModule Natural (Tropical a) (Ord a, Num a) => LeftModule Natural (Tropical a) (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => LeftModule r (UnionWith f r) (LeftModule r m, LeftModule r n) => LeftModule r ((,) m n) (LeftModule r m, Applicative f) => LeftModule r (App f m) (LeftModule r m, Monad f) => LeftModule r (Mon f m) Monoid m => LeftModule Natural (a -> m) Monoid m => LeftModule Natural (a -> m) Category k => LeftModule Natural (GEndo k a) Category k => LeftModule Natural (GEndo k a) Alternative f => LeftModule Natural (Alt f a) Alternative f => LeftModule Natural (Alt f a) MonadPlus f => LeftModule Natural (MonadSum f a) MonadPlus f => LeftModule Natural (MonadSum f a) (LeftModule r m, LeftModule r n, LeftModule r o) => LeftModule r ((,,) m n o) Monoid m => LeftModule Natural (CMonoid m m m) Monoid m => LeftModule Natural (CMonoid m m m) (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p) => LeftModule r ((,,,) m n o p) (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p, LeftModule r q) => LeftModule r ((,,,,) m n o p q) Bits a => LeftModule (Boolean a) (Boolean a) (Bounded a, Enum a) => LeftModule (BitSet a) (BitSet a) (Ord a, Num a) => LeftModule (Tropical a) (Tropical a)
 class Module r m => RightModule r m where Source
` (m .* x) * y = m .* (x * y)`
Methods
 (.*) :: m -> r -> m Source
Instances
 RightModule Natural Ordering RightModule Natural Ordering RightModule Natural () RightModule Natural () RightModule Natural All RightModule Natural All RightModule Natural Any RightModule Natural Any Bits a => RightModule Integer (Boolean a) Bits a => RightModule Integer (Boolean a) RightModule Natural ([] a) RightModule Natural ([] a) Monoid m => RightModule Natural (Dual m) Monoid m => RightModule Natural (Dual m) RightModule Natural (Endo a) RightModule Natural (Endo a) Num a => RightModule Natural (Sum a) Num a => RightModule Natural (Sum a) Num a => RightModule Natural (Product a) Num a => RightModule Natural (Product a) RightModule Natural (First a) RightModule Natural (First a) RightModule Natural (Last a) RightModule Natural (Last a) CharReducer m => RightModule Natural (UTF8 m) CharReducer m => RightModule Natural (UTF8 m) RightModule Natural (SourcePosition f) RightModule Natural (SourcePosition f) Monoid m => RightModule Natural (Self m) Monoid m => RightModule Natural (Self m) Monoid m => RightModule Natural (FromString m) Monoid m => RightModule Natural (FromString m) Multiplicative m => RightModule Natural (Log m) Multiplicative m => RightModule Natural (Log m) Applicative f => RightModule Natural (Traversal f) Applicative f => RightModule Natural (Traversal f) Monad f => RightModule Natural (Action f) Monad f => RightModule Natural (Action f) RightModule Natural (Free a) RightModule Natural (Free a) Bits a => RightModule Natural (Boolean a) Bits a => RightModule Natural (Boolean a) Enum a => RightModule Natural (BitSet a) Enum a => RightModule Natural (BitSet a) (Ord a, Num a) => RightModule Natural (Tropical a) (Ord a, Num a) => RightModule Natural (Tropical a) (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => RightModule r (UnionWith f r) (RightModule r m, RightModule r n) => RightModule r ((,) m n) (RightModule r m, Applicative f) => RightModule r (App f m) (RightModule r m, Monad f) => RightModule r (Mon f m) Monoid m => RightModule Natural (a -> m) Monoid m => RightModule Natural (a -> m) Category k => RightModule Natural (GEndo k a) Category k => RightModule Natural (GEndo k a) Alternative f => RightModule Natural (Alt f a) Alternative f => RightModule Natural (Alt f a) MonadPlus f => RightModule Natural (MonadSum f a) MonadPlus f => RightModule Natural (MonadSum f a) (RightModule r m, RightModule r n, RightModule r o) => RightModule r ((,,) m n o) Monoid m => RightModule Natural (CMonoid m m m) Monoid m => RightModule Natural (CMonoid m m m) (RightModule r m, RightModule r n, RightModule r o, RightModule r p) => RightModule r ((,,,) m n o p) (RightModule r m, RightModule r n, RightModule r o, RightModule r p, RightModule r q) => RightModule r ((,,,,) m n o p q) Bits a => RightModule (Boolean a) (Boolean a) (Bounded a, Enum a) => RightModule (BitSet a) (BitSet a) (Ord a, Num a) => RightModule (Tropical a) (Tropical a)
 class (LeftModule r m, RightModule r m) => Bimodule r m Source
` (x *. m) .* y = x *. (m .* y)`
Instances
 Bits a => Bimodule Integer (Boolean a) Bits a => Bimodule Integer (Boolean a) Bits a => Bimodule Natural (Boolean a) Bits a => Bimodule Natural (Boolean a) Enum a => Bimodule Natural (BitSet a) Enum a => Bimodule Natural (BitSet a) (Ord a, Num a) => Bimodule Natural (Tropical a) (Ord a, Num a) => Bimodule Natural (Tropical a) (Bimodule r m, Bimodule r n) => Bimodule r ((,) m n) (Bimodule r m, Bimodule r n, Bimodule r o) => Bimodule r ((,,) m n o) (Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p) => Bimodule r ((,,,) m n o p) (Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p, Bimodule r q) => Bimodule r ((,,,,) m n o p q) Bits a => Bimodule (Boolean a) (Boolean a) (Bounded a, Enum a) => Bimodule (BitSet a) (BitSet a) (Ord a, Num a) => Bimodule (Tropical a) (Tropical a)
R-Normed Modules
 class Module r m => Normed r m where Source

An r-normed module m satisfies:

1. `mabs m >= 0`

2 mabs m == zero{-_r-} => m == zero{-_m-}

3 mabs (m + n) <= mabs m + mabs n

4 r * mabs m = mabs (r *. m) -- if m is an r-LeftModule

5 mabs m * r = mabs (m .* r) -- if m is an r-RightModule

Methods
 mabs :: m -> r Source
Instances
 Bits a => Normed (Boolean a) (Boolean a)
Vector Spaces
 class (Field f, Module f g) => VectorSpace f g Source
R-Algebras
 class (Bimodule r m, Multiplicative m) => Algebra r m Source
Algebra over a (near) (semi) ring. r *. (x * y) = (r *. x) * y = x * (r *. y) (x * y) .* r = y * (x .* r) = (y .* r) * x
Instances
 (Bounded a, Enum a) => Algebra Natural (BitSet a) (Bounded a, Enum a) => Algebra Natural (BitSet a) (Bounded a, Enum a) => Algebra (BitSet a) (BitSet a)
Produced by Haddock version 2.4.2