algebra-4.3.1: Constructive abstract algebra

Safe HaskellSafe
LanguageHaskell98

Numeric.Algebra.Class

Contents

Synopsis

Multiplicative Semigroups

class Multiplicative r where #

A multiplicative semigroup

Minimal complete definition

(*)

Methods

(*) :: r -> r -> r infixl 7 #

pow1p :: r -> Natural -> r infixr 8 #

productWith1 :: Foldable1 f => (a -> r) -> f a -> r #

Instances

Multiplicative Bool # 

Methods

(*) :: Bool -> Bool -> Bool #

pow1p :: Bool -> Natural -> Bool #

productWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool #

Multiplicative Int # 

Methods

(*) :: Int -> Int -> Int #

pow1p :: Int -> Natural -> Int #

productWith1 :: Foldable1 f => (a -> Int) -> f a -> Int #

Multiplicative Int8 # 

Methods

(*) :: Int8 -> Int8 -> Int8 #

pow1p :: Int8 -> Natural -> Int8 #

productWith1 :: Foldable1 f => (a -> Int8) -> f a -> Int8 #

Multiplicative Int16 # 

Methods

(*) :: Int16 -> Int16 -> Int16 #

pow1p :: Int16 -> Natural -> Int16 #

productWith1 :: Foldable1 f => (a -> Int16) -> f a -> Int16 #

Multiplicative Int32 # 

Methods

(*) :: Int32 -> Int32 -> Int32 #

pow1p :: Int32 -> Natural -> Int32 #

productWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 #

Multiplicative Int64 # 

Methods

(*) :: Int64 -> Int64 -> Int64 #

pow1p :: Int64 -> Natural -> Int64 #

productWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 #

Multiplicative Integer # 

Methods

(*) :: Integer -> Integer -> Integer #

pow1p :: Integer -> Natural -> Integer #

productWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer #

Multiplicative Natural # 

Methods

(*) :: Natural -> Natural -> Natural #

pow1p :: Natural -> Natural -> Natural #

productWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural #

Multiplicative Word # 

Methods

(*) :: Word -> Word -> Word #

pow1p :: Word -> Natural -> Word #

productWith1 :: Foldable1 f => (a -> Word) -> f a -> Word #

Multiplicative Word8 # 

Methods

(*) :: Word8 -> Word8 -> Word8 #

pow1p :: Word8 -> Natural -> Word8 #

productWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 #

Multiplicative Word16 # 

Methods

(*) :: Word16 -> Word16 -> Word16 #

pow1p :: Word16 -> Natural -> Word16 #

productWith1 :: Foldable1 f => (a -> Word16) -> f a -> Word16 #

Multiplicative Word32 # 

Methods

(*) :: Word32 -> Word32 -> Word32 #

pow1p :: Word32 -> Natural -> Word32 #

productWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 #

Multiplicative Word64 # 

Methods

(*) :: Word64 -> Word64 -> Word64 #

pow1p :: Word64 -> Natural -> Word64 #

productWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 #

Multiplicative () # 

Methods

(*) :: () -> () -> () #

pow1p :: () -> Natural -> () #

productWith1 :: Foldable1 f => (a -> ()) -> f a -> () #

Multiplicative Euclidean # 
Monoidal r => Multiplicative (ZeroRng r) # 

Methods

(*) :: ZeroRng r -> ZeroRng r -> ZeroRng r #

pow1p :: ZeroRng r -> Natural -> ZeroRng r #

productWith1 :: Foldable1 f => (a -> ZeroRng r) -> f a -> ZeroRng r #

Rng r => Multiplicative (RngRing r) # 

Methods

(*) :: RngRing r -> RngRing r -> RngRing r #

pow1p :: RngRing r -> Natural -> RngRing r #

productWith1 :: Foldable1 f => (a -> RngRing r) -> f a -> RngRing r #

Multiplicative r => Multiplicative (Opposite r) # 

Methods

(*) :: Opposite r -> Opposite r -> Opposite r #

pow1p :: Opposite r -> Natural -> Opposite r #

productWith1 :: Foldable1 f => (a -> Opposite r) -> f a -> Opposite r #

Multiplicative (End r) # 

Methods

(*) :: End r -> End r -> End r #

pow1p :: End r -> Natural -> End r #

productWith1 :: Foldable1 f => (a -> End r) -> f a -> End r #

Additive r => Multiplicative (Exp r) # 

Methods

(*) :: Exp r -> Exp r -> Exp r #

pow1p :: Exp r -> Natural -> Exp r #

productWith1 :: Foldable1 f => (a -> Exp r) -> f a -> Exp r #

(Commutative k, Rng k) => Multiplicative (Trig k) # 

Methods

(*) :: Trig k -> Trig k -> Trig k #

pow1p :: Trig k -> Natural -> Trig k #

productWith1 :: Foldable1 f => (a -> Trig k) -> f a -> Trig k #

(TriviallyInvolutive r, Semiring r) => Multiplicative (Quaternion' r) # 
(Commutative k, Semiring k) => Multiplicative (Hyper k) # 

Methods

(*) :: Hyper k -> Hyper k -> Hyper k #

pow1p :: Hyper k -> Natural -> Hyper k #

productWith1 :: Foldable1 f => (a -> Hyper k) -> f a -> Hyper k #

Multiplicative (BasisCoblade m) # 
(Commutative r, Rng r) => Multiplicative (Dual' r) # 

Methods

(*) :: Dual' r -> Dual' r -> Dual' r #

pow1p :: Dual' r -> Natural -> Dual' r #

productWith1 :: Foldable1 f => (a -> Dual' r) -> f a -> Dual' r #

(TriviallyInvolutive r, Rng r) => Multiplicative (Quaternion r) # 

Methods

(*) :: Quaternion r -> Quaternion r -> Quaternion r #

pow1p :: Quaternion r -> Natural -> Quaternion r #

productWith1 :: Foldable1 f => (a -> Quaternion r) -> f a -> Quaternion r #

(Commutative k, Semiring k) => Multiplicative (Hyper' k) # 

Methods

(*) :: Hyper' k -> Hyper' k -> Hyper' k #

pow1p :: Hyper' k -> Natural -> Hyper' k #

productWith1 :: Foldable1 f => (a -> Hyper' k) -> f a -> Hyper' k #

(Commutative r, Rng r) => Multiplicative (Dual r) # 

Methods

(*) :: Dual r -> Dual r -> Dual r #

pow1p :: Dual r -> Natural -> Dual r #

productWith1 :: Foldable1 f => (a -> Dual r) -> f a -> Dual r #

(Commutative r, Rng r) => Multiplicative (Complex r) # 

Methods

(*) :: Complex r -> Complex r -> Complex r #

pow1p :: Complex r -> Natural -> Complex r #

productWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r #

GCDDomain d => Multiplicative (Fraction d) # 

Methods

(*) :: Fraction d -> Fraction d -> Fraction d #

pow1p :: Fraction d -> Natural -> Fraction d #

productWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d #

Algebra r a => Multiplicative (a -> r) # 

Methods

(*) :: (a -> r) -> (a -> r) -> a -> r #

pow1p :: (a -> r) -> Natural -> a -> r #

productWith1 :: Foldable1 f => (a -> a -> r) -> f a -> a -> r #

(Multiplicative a, Multiplicative b) => Multiplicative (a, b) # 

Methods

(*) :: (a, b) -> (a, b) -> (a, b) #

pow1p :: (a, b) -> Natural -> (a, b) #

productWith1 :: Foldable1 f => (a -> (a, b)) -> f a -> (a, b) #

Multiplicative (Rect i j) # 

Methods

(*) :: Rect i j -> Rect i j -> Rect i j #

pow1p :: Rect i j -> Natural -> Rect i j #

productWith1 :: Foldable1 f => (a -> Rect i j) -> f a -> Rect i j #

Coalgebra r m => Multiplicative (Covector r m) # 

Methods

(*) :: Covector r m -> Covector r m -> Covector r m #

pow1p :: Covector r m -> Natural -> Covector r m #

productWith1 :: Foldable1 f => (a -> Covector r m) -> f a -> Covector r m #

(Multiplicative a, Multiplicative b, Multiplicative c) => Multiplicative (a, b, c) # 

Methods

(*) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

pow1p :: (a, b, c) -> Natural -> (a, b, c) #

productWith1 :: Foldable1 f => (a -> (a, b, c)) -> f a -> (a, b, c) #

Coalgebra r m => Multiplicative (Map r b m) # 

Methods

(*) :: Map r b m -> Map r b m -> Map r b m #

pow1p :: Map r b m -> Natural -> Map r b m #

productWith1 :: Foldable1 f => (a -> Map r b m) -> f a -> Map r b m #

(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d) => Multiplicative (a, b, c, d) # 

Methods

(*) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

pow1p :: (a, b, c, d) -> Natural -> (a, b, c, d) #

productWith1 :: Foldable1 f => (a -> (a, b, c, d)) -> f a -> (a, b, c, d) #

(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d, Multiplicative e) => Multiplicative (a, b, c, d, e) # 

Methods

(*) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

pow1p :: (a, b, c, d, e) -> Natural -> (a, b, c, d, e) #

productWith1 :: Foldable1 f => (a -> (a, b, c, d, e)) -> f a -> (a, b, c, d, e) #

pow1pIntegral :: (Integral r, Integral n) => r -> n -> r #

product1 :: (Foldable1 f, Multiplicative r) => f r -> r #

Semirings

class (Additive r, Abelian r, Multiplicative r) => Semiring r #

A pair of an additive abelian semigroup, and a multiplicative semigroup, with the distributive laws:

a(b + c) = ab + ac -- left distribution (we are a LeftNearSemiring)
(a + b)c = ac + bc -- right distribution (we are a [Right]NearSemiring)

Common notation includes the laws for additive and multiplicative identity in semiring.

If you want that, look at Rig instead.

Ideally we'd use the cyclic definition:

class (LeftModule r r, RightModule r r, Additive r, Abelian r, Multiplicative r) => Semiring r

to enforce that every semiring r is an r-module over itself, but Haskell doesn't like that.

Left and Right Modules

class (Semiring r, Additive m) => LeftModule r m where #

Minimal complete definition

(.*)

Methods

(.*) :: r -> m -> m infixl 7 #

Instances

LeftModule Integer Int # 

Methods

(.*) :: Integer -> Int -> Int #

LeftModule Integer Int8 # 

Methods

(.*) :: Integer -> Int8 -> Int8 #

LeftModule Integer Int16 # 

Methods

(.*) :: Integer -> Int16 -> Int16 #

LeftModule Integer Int32 # 

Methods

(.*) :: Integer -> Int32 -> Int32 #

LeftModule Integer Int64 # 

Methods

(.*) :: Integer -> Int64 -> Int64 #

LeftModule Integer Integer # 

Methods

(.*) :: Integer -> Integer -> Integer #

LeftModule Integer Word # 

Methods

(.*) :: Integer -> Word -> Word #

LeftModule Integer Word8 # 

Methods

(.*) :: Integer -> Word8 -> Word8 #

LeftModule Integer Word16 # 

Methods

(.*) :: Integer -> Word16 -> Word16 #

LeftModule Integer Word32 # 

Methods

(.*) :: Integer -> Word32 -> Word32 #

LeftModule Integer Word64 # 

Methods

(.*) :: Integer -> Word64 -> Word64 #

LeftModule Integer Euclidean # 

Methods

(.*) :: Integer -> Euclidean -> Euclidean #

LeftModule Natural Bool # 

Methods

(.*) :: Natural -> Bool -> Bool #

LeftModule Natural Int # 

Methods

(.*) :: Natural -> Int -> Int #

LeftModule Natural Int8 # 

Methods

(.*) :: Natural -> Int8 -> Int8 #

LeftModule Natural Int16 # 

Methods

(.*) :: Natural -> Int16 -> Int16 #

LeftModule Natural Int32 # 

Methods

(.*) :: Natural -> Int32 -> Int32 #

LeftModule Natural Int64 # 

Methods

(.*) :: Natural -> Int64 -> Int64 #

LeftModule Natural Integer # 

Methods

(.*) :: Natural -> Integer -> Integer #

LeftModule Natural Natural # 

Methods

(.*) :: Natural -> Natural -> Natural #

LeftModule Natural Word # 

Methods

(.*) :: Natural -> Word -> Word #

LeftModule Natural Word8 # 

Methods

(.*) :: Natural -> Word8 -> Word8 #

LeftModule Natural Word16 # 

Methods

(.*) :: Natural -> Word16 -> Word16 #

LeftModule Natural Word32 # 

Methods

(.*) :: Natural -> Word32 -> Word32 #

LeftModule Natural Word64 # 

Methods

(.*) :: Natural -> Word64 -> Word64 #

LeftModule Natural Euclidean # 

Methods

(.*) :: Natural -> Euclidean -> Euclidean #

Additive m => LeftModule () m # 

Methods

(.*) :: () -> m -> m #

Semiring r => LeftModule r () # 

Methods

(.*) :: r -> () -> () #

Group r => LeftModule Integer (ZeroRng r) # 

Methods

(.*) :: Integer -> ZeroRng r -> ZeroRng r #

(Abelian r, Group r) => LeftModule Integer (RngRing r) # 

Methods

(.*) :: Integer -> RngRing r -> RngRing r #

Division r => LeftModule Integer (Log r) # 

Methods

(.*) :: Integer -> Log r -> Log r #

GCDDomain d => LeftModule Integer (Fraction d) # 

Methods

(.*) :: Integer -> Fraction d -> Fraction d #

Monoidal r => LeftModule Natural (ZeroRng r) # 

Methods

(.*) :: Natural -> ZeroRng r -> ZeroRng r #

(Abelian r, Monoidal r) => LeftModule Natural (RngRing r) # 

Methods

(.*) :: Natural -> RngRing r -> RngRing r #

Unital r => LeftModule Natural (Log r) # 

Methods

(.*) :: Natural -> Log r -> Log r #

LeftModule Natural (BasisCoblade m) # 

Methods

(.*) :: Natural -> BasisCoblade m -> BasisCoblade m #

GCDDomain d => LeftModule Natural (Fraction d) # 

Methods

(.*) :: Natural -> Fraction d -> Fraction d #

RightModule r s => LeftModule r (Opposite s) # 

Methods

(.*) :: r -> Opposite s -> Opposite s #

LeftModule r m => LeftModule r (End m) # 

Methods

(.*) :: r -> End m -> End m #

LeftModule r s => LeftModule r (Trig s) # 

Methods

(.*) :: r -> Trig s -> Trig s #

LeftModule r s => LeftModule r (Quaternion' s) # 

Methods

(.*) :: r -> Quaternion' s -> Quaternion' s #

LeftModule r s => LeftModule r (Hyper s) # 

Methods

(.*) :: r -> Hyper s -> Hyper s #

LeftModule r s => LeftModule r (Dual' s) # 

Methods

(.*) :: r -> Dual' s -> Dual' s #

LeftModule r s => LeftModule r (Quaternion s) # 

Methods

(.*) :: r -> Quaternion s -> Quaternion s #

LeftModule r s => LeftModule r (Hyper' s) # 

Methods

(.*) :: r -> Hyper' s -> Hyper' s #

LeftModule r s => LeftModule r (Dual s) # 

Methods

(.*) :: r -> Dual s -> Dual s #

LeftModule r s => LeftModule r (Complex s) # 

Methods

(.*) :: r -> Complex s -> Complex s #

(LeftModule r a, LeftModule r b) => LeftModule r (a, b) # 

Methods

(.*) :: r -> (a, b) -> (a, b) #

LeftModule r m => LeftModule r (e -> m) # 

Methods

(.*) :: r -> (e -> m) -> e -> m #

LeftModule r s => LeftModule r (Covector s m) # 

Methods

(.*) :: r -> Covector s m -> Covector s m #

(LeftModule r a, LeftModule r b, LeftModule r c) => LeftModule r (a, b, c) # 

Methods

(.*) :: r -> (a, b, c) -> (a, b, c) #

LeftModule r s => LeftModule r (Map s b m) # 

Methods

(.*) :: r -> Map s b m -> Map s b m #

(LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d) => LeftModule r (a, b, c, d) # 

Methods

(.*) :: r -> (a, b, c, d) -> (a, b, c, d) #

(LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d, LeftModule r e) => LeftModule r (a, b, c, d, e) # 

Methods

(.*) :: r -> (a, b, c, d, e) -> (a, b, c, d, e) #

Rng s => LeftModule (RngRing s) (RngRing s) # 

Methods

(.*) :: RngRing s -> RngRing s -> RngRing s #

Semiring r => LeftModule (Opposite r) (Opposite r) # 

Methods

(.*) :: Opposite r -> Opposite r -> Opposite r #

(Monoidal m, Abelian m) => LeftModule (End m) (End m) # 

Methods

(.*) :: End m -> End m -> End m #

(Commutative r, Rng r) => LeftModule (Trig r) (Trig r) # 

Methods

(.*) :: Trig r -> Trig r -> Trig r #

(TriviallyInvolutive r, Rng r) => LeftModule (Quaternion' r) (Quaternion' r) # 

Methods

(.*) :: Quaternion' r -> Quaternion' r -> Quaternion' r #

(Commutative r, Semiring r) => LeftModule (Hyper r) (Hyper r) # 

Methods

(.*) :: Hyper r -> Hyper r -> Hyper r #

(Commutative r, Rng r) => LeftModule (Dual' r) (Dual' r) # 

Methods

(.*) :: Dual' r -> Dual' r -> Dual' r #

(TriviallyInvolutive r, Rng r) => LeftModule (Quaternion r) (Quaternion r) # 

Methods

(.*) :: Quaternion r -> Quaternion r -> Quaternion r #

(Commutative r, Semiring r) => LeftModule (Hyper' r) (Hyper' r) # 

Methods

(.*) :: Hyper' r -> Hyper' r -> Hyper' r #

(Commutative r, Rng r) => LeftModule (Dual r) (Dual r) # 

Methods

(.*) :: Dual r -> Dual r -> Dual r #

(Commutative r, Rng r) => LeftModule (Complex r) (Complex r) # 

Methods

(.*) :: Complex r -> Complex r -> Complex r #

Coalgebra r m => LeftModule (Covector r m) (Covector r m) # 

Methods

(.*) :: Covector r m -> Covector r m -> Covector r m #

Coalgebra r m => LeftModule (Map r b m) (Map r b m) # 

Methods

(.*) :: Map r b m -> Map r b m -> Map r b m #

class (Semiring r, Additive m) => RightModule r m where #

Minimal complete definition

(*.)

Methods

(*.) :: m -> r -> m infixl 7 #

Instances

RightModule Integer Int # 

Methods

(*.) :: Int -> Integer -> Int #

RightModule Integer Int8 # 

Methods

(*.) :: Int8 -> Integer -> Int8 #

RightModule Integer Int16 # 

Methods

(*.) :: Int16 -> Integer -> Int16 #

RightModule Integer Int32 # 

Methods

(*.) :: Int32 -> Integer -> Int32 #

RightModule Integer Int64 # 

Methods

(*.) :: Int64 -> Integer -> Int64 #

RightModule Integer Integer # 

Methods

(*.) :: Integer -> Integer -> Integer #

RightModule Integer Word # 

Methods

(*.) :: Word -> Integer -> Word #

RightModule Integer Word8 # 

Methods

(*.) :: Word8 -> Integer -> Word8 #

RightModule Integer Word16 # 

Methods

(*.) :: Word16 -> Integer -> Word16 #

RightModule Integer Word32 # 

Methods

(*.) :: Word32 -> Integer -> Word32 #

RightModule Integer Word64 # 

Methods

(*.) :: Word64 -> Integer -> Word64 #

RightModule Integer Euclidean # 

Methods

(*.) :: Euclidean -> Integer -> Euclidean #

RightModule Natural Bool # 

Methods

(*.) :: Bool -> Natural -> Bool #

RightModule Natural Int # 

Methods

(*.) :: Int -> Natural -> Int #

RightModule Natural Int8 # 

Methods

(*.) :: Int8 -> Natural -> Int8 #

RightModule Natural Int16 # 

Methods

(*.) :: Int16 -> Natural -> Int16 #

RightModule Natural Int32 # 

Methods

(*.) :: Int32 -> Natural -> Int32 #

RightModule Natural Int64 # 

Methods

(*.) :: Int64 -> Natural -> Int64 #

RightModule Natural Integer # 

Methods

(*.) :: Integer -> Natural -> Integer #

RightModule Natural Natural # 

Methods

(*.) :: Natural -> Natural -> Natural #

RightModule Natural Word # 

Methods

(*.) :: Word -> Natural -> Word #

RightModule Natural Word8 # 

Methods

(*.) :: Word8 -> Natural -> Word8 #

RightModule Natural Word16 # 

Methods

(*.) :: Word16 -> Natural -> Word16 #

RightModule Natural Word32 # 

Methods

(*.) :: Word32 -> Natural -> Word32 #

RightModule Natural Word64 # 

Methods

(*.) :: Word64 -> Natural -> Word64 #

RightModule Natural Euclidean # 

Methods

(*.) :: Euclidean -> Natural -> Euclidean #

Additive m => RightModule () m # 

Methods

(*.) :: m -> () -> m #

Semiring r => RightModule r () # 

Methods

(*.) :: () -> r -> () #

Group r => RightModule Integer (ZeroRng r) # 

Methods

(*.) :: ZeroRng r -> Integer -> ZeroRng r #

(Abelian r, Group r) => RightModule Integer (RngRing r) # 

Methods

(*.) :: RngRing r -> Integer -> RngRing r #

Division r => RightModule Integer (Log r) # 

Methods

(*.) :: Log r -> Integer -> Log r #

GCDDomain d => RightModule Integer (Fraction d) # 

Methods

(*.) :: Fraction d -> Integer -> Fraction d #

Monoidal r => RightModule Natural (ZeroRng r) # 

Methods

(*.) :: ZeroRng r -> Natural -> ZeroRng r #

(Abelian r, Monoidal r) => RightModule Natural (RngRing r) # 

Methods

(*.) :: RngRing r -> Natural -> RngRing r #

Unital r => RightModule Natural (Log r) # 

Methods

(*.) :: Log r -> Natural -> Log r #

RightModule Natural (BasisCoblade m) # 

Methods

(*.) :: BasisCoblade m -> Natural -> BasisCoblade m #

GCDDomain d => RightModule Natural (Fraction d) # 

Methods

(*.) :: Fraction d -> Natural -> Fraction d #

LeftModule r s => RightModule r (Opposite s) # 

Methods

(*.) :: Opposite s -> r -> Opposite s #

RightModule r m => RightModule r (End m) # 

Methods

(*.) :: End m -> r -> End m #

RightModule r s => RightModule r (Trig s) # 

Methods

(*.) :: Trig s -> r -> Trig s #

RightModule r s => RightModule r (Quaternion' s) # 

Methods

(*.) :: Quaternion' s -> r -> Quaternion' s #

RightModule r s => RightModule r (Hyper s) # 

Methods

(*.) :: Hyper s -> r -> Hyper s #

RightModule r s => RightModule r (Dual' s) # 

Methods

(*.) :: Dual' s -> r -> Dual' s #

RightModule r s => RightModule r (Quaternion s) # 

Methods

(*.) :: Quaternion s -> r -> Quaternion s #

RightModule r s => RightModule r (Hyper' s) # 

Methods

(*.) :: Hyper' s -> r -> Hyper' s #

RightModule r s => RightModule r (Dual s) # 

Methods

(*.) :: Dual s -> r -> Dual s #

RightModule r s => RightModule r (Complex s) # 

Methods

(*.) :: Complex s -> r -> Complex s #

(RightModule r a, RightModule r b) => RightModule r (a, b) # 

Methods

(*.) :: (a, b) -> r -> (a, b) #

RightModule r m => RightModule r (e -> m) # 

Methods

(*.) :: (e -> m) -> r -> e -> m #

RightModule r s => RightModule r (Covector s m) # 

Methods

(*.) :: Covector s m -> r -> Covector s m #

(RightModule r a, RightModule r b, RightModule r c) => RightModule r (a, b, c) # 

Methods

(*.) :: (a, b, c) -> r -> (a, b, c) #

RightModule r s => RightModule r (Map s b m) # 

Methods

(*.) :: Map s b m -> r -> Map s b m #

(RightModule r a, RightModule r b, RightModule r c, RightModule r d) => RightModule r (a, b, c, d) # 

Methods

(*.) :: (a, b, c, d) -> r -> (a, b, c, d) #

(RightModule r a, RightModule r b, RightModule r c, RightModule r d, RightModule r e) => RightModule r (a, b, c, d, e) # 

Methods

(*.) :: (a, b, c, d, e) -> r -> (a, b, c, d, e) #

Rng s => RightModule (RngRing s) (RngRing s) # 

Methods

(*.) :: RngRing s -> RngRing s -> RngRing s #

Semiring r => RightModule (Opposite r) (Opposite r) # 

Methods

(*.) :: Opposite r -> Opposite r -> Opposite r #

(Monoidal m, Abelian m) => RightModule (End m) (End m) # 

Methods

(*.) :: End m -> End m -> End m #

(Commutative r, Rng r) => RightModule (Trig r) (Trig r) # 

Methods

(*.) :: Trig r -> Trig r -> Trig r #

(TriviallyInvolutive r, Rng r) => RightModule (Quaternion' r) (Quaternion' r) # 

Methods

(*.) :: Quaternion' r -> Quaternion' r -> Quaternion' r #

(Commutative r, Semiring r) => RightModule (Hyper r) (Hyper r) # 

Methods

(*.) :: Hyper r -> Hyper r -> Hyper r #

(Commutative r, Rng r) => RightModule (Dual' r) (Dual' r) # 

Methods

(*.) :: Dual' r -> Dual' r -> Dual' r #

(TriviallyInvolutive r, Rng r) => RightModule (Quaternion r) (Quaternion r) # 

Methods

(*.) :: Quaternion r -> Quaternion r -> Quaternion r #

(Commutative r, Semiring r) => RightModule (Hyper' r) (Hyper' r) # 

Methods

(*.) :: Hyper' r -> Hyper' r -> Hyper' r #

(Commutative r, Rng r) => RightModule (Dual r) (Dual r) # 

Methods

(*.) :: Dual r -> Dual r -> Dual r #

(Commutative r, Rng r) => RightModule (Complex r) (Complex r) # 

Methods

(*.) :: Complex r -> Complex r -> Complex r #

Coalgebra r m => RightModule (Covector r m) (Covector r m) # 

Methods

(*.) :: Covector r m -> Covector r m -> Covector r m #

Coalgebra r m => RightModule (Map r b m) (Map r b m) # 

Methods

(*.) :: Map r b m -> Map r b m -> Map r b m #

class (LeftModule r m, RightModule r m) => Module r m #

Instances

(LeftModule r m, RightModule r m) => Module r m # 

Additive Monoids

class (LeftModule Natural m, RightModule Natural m) => Monoidal m where #

An additive monoid

zero + a = a = a + zero

Minimal complete definition

zero

Methods

zero :: m #

sinnum :: Natural -> m -> m #

sumWith :: Foldable f => (a -> m) -> f a -> m #

Instances

Monoidal Bool # 

Methods

zero :: Bool #

sinnum :: Natural -> Bool -> Bool #

sumWith :: Foldable f => (a -> Bool) -> f a -> Bool #

Monoidal Int # 

Methods

zero :: Int #

sinnum :: Natural -> Int -> Int #

sumWith :: Foldable f => (a -> Int) -> f a -> Int #

Monoidal Int8 # 

Methods

zero :: Int8 #

sinnum :: Natural -> Int8 -> Int8 #

sumWith :: Foldable f => (a -> Int8) -> f a -> Int8 #

Monoidal Int16 # 

Methods

zero :: Int16 #

sinnum :: Natural -> Int16 -> Int16 #

sumWith :: Foldable f => (a -> Int16) -> f a -> Int16 #

Monoidal Int32 # 

Methods

zero :: Int32 #

sinnum :: Natural -> Int32 -> Int32 #

sumWith :: Foldable f => (a -> Int32) -> f a -> Int32 #

Monoidal Int64 # 

Methods

zero :: Int64 #

sinnum :: Natural -> Int64 -> Int64 #

sumWith :: Foldable f => (a -> Int64) -> f a -> Int64 #

Monoidal Integer # 

Methods

zero :: Integer #

sinnum :: Natural -> Integer -> Integer #

sumWith :: Foldable f => (a -> Integer) -> f a -> Integer #

Monoidal Natural # 

Methods

zero :: Natural #

sinnum :: Natural -> Natural -> Natural #

sumWith :: Foldable f => (a -> Natural) -> f a -> Natural #

Monoidal Word # 

Methods

zero :: Word #

sinnum :: Natural -> Word -> Word #

sumWith :: Foldable f => (a -> Word) -> f a -> Word #

Monoidal Word8 # 

Methods

zero :: Word8 #

sinnum :: Natural -> Word8 -> Word8 #

sumWith :: Foldable f => (a -> Word8) -> f a -> Word8 #

Monoidal Word16 # 

Methods

zero :: Word16 #

sinnum :: Natural -> Word16 -> Word16 #

sumWith :: Foldable f => (a -> Word16) -> f a -> Word16 #

Monoidal Word32 # 

Methods

zero :: Word32 #

sinnum :: Natural -> Word32 -> Word32 #

sumWith :: Foldable f => (a -> Word32) -> f a -> Word32 #

Monoidal Word64 # 

Methods

zero :: Word64 #

sinnum :: Natural -> Word64 -> Word64 #

sumWith :: Foldable f => (a -> Word64) -> f a -> Word64 #

Monoidal () # 

Methods

zero :: () #

sinnum :: Natural -> () -> () #

sumWith :: Foldable f => (a -> ()) -> f a -> () #

Monoidal Euclidean # 

Methods

zero :: Euclidean #

sinnum :: Natural -> Euclidean -> Euclidean #

sumWith :: Foldable f => (a -> Euclidean) -> f a -> Euclidean #

Monoidal r => Monoidal (ZeroRng r) # 

Methods

zero :: ZeroRng r #

sinnum :: Natural -> ZeroRng r -> ZeroRng r #

sumWith :: Foldable f => (a -> ZeroRng r) -> f a -> ZeroRng r #

(Abelian r, Monoidal r) => Monoidal (RngRing r) # 

Methods

zero :: RngRing r #

sinnum :: Natural -> RngRing r -> RngRing r #

sumWith :: Foldable f => (a -> RngRing r) -> f a -> RngRing r #

Monoidal r => Monoidal (Opposite r) # 

Methods

zero :: Opposite r #

sinnum :: Natural -> Opposite r -> Opposite r #

sumWith :: Foldable f => (a -> Opposite r) -> f a -> Opposite r #

Monoidal r => Monoidal (End r) # 

Methods

zero :: End r #

sinnum :: Natural -> End r -> End r #

sumWith :: Foldable f => (a -> End r) -> f a -> End r #

Unital r => Monoidal (Log r) # 

Methods

zero :: Log r #

sinnum :: Natural -> Log r -> Log r #

sumWith :: Foldable f => (a -> Log r) -> f a -> Log r #

Monoidal r => Monoidal (Trig r) # 

Methods

zero :: Trig r #

sinnum :: Natural -> Trig r -> Trig r #

sumWith :: Foldable f => (a -> Trig r) -> f a -> Trig r #

Monoidal r => Monoidal (Quaternion' r) # 

Methods

zero :: Quaternion' r #

sinnum :: Natural -> Quaternion' r -> Quaternion' r #

sumWith :: Foldable f => (a -> Quaternion' r) -> f a -> Quaternion' r #

Monoidal r => Monoidal (Hyper r) # 

Methods

zero :: Hyper r #

sinnum :: Natural -> Hyper r -> Hyper r #

sumWith :: Foldable f => (a -> Hyper r) -> f a -> Hyper r #

Monoidal (BasisCoblade m) # 

Methods

zero :: BasisCoblade m #

sinnum :: Natural -> BasisCoblade m -> BasisCoblade m #

sumWith :: Foldable f => (a -> BasisCoblade m) -> f a -> BasisCoblade m #

Monoidal r => Monoidal (Dual' r) # 

Methods

zero :: Dual' r #

sinnum :: Natural -> Dual' r -> Dual' r #

sumWith :: Foldable f => (a -> Dual' r) -> f a -> Dual' r #

Monoidal r => Monoidal (Quaternion r) # 

Methods

zero :: Quaternion r #

sinnum :: Natural -> Quaternion r -> Quaternion r #

sumWith :: Foldable f => (a -> Quaternion r) -> f a -> Quaternion r #

Monoidal r => Monoidal (Hyper' r) # 

Methods

zero :: Hyper' r #

sinnum :: Natural -> Hyper' r -> Hyper' r #

sumWith :: Foldable f => (a -> Hyper' r) -> f a -> Hyper' r #

Monoidal r => Monoidal (Dual r) # 

Methods

zero :: Dual r #

sinnum :: Natural -> Dual r -> Dual r #

sumWith :: Foldable f => (a -> Dual r) -> f a -> Dual r #

Monoidal r => Monoidal (Complex r) # 

Methods

zero :: Complex r #

sinnum :: Natural -> Complex r -> Complex r #

sumWith :: Foldable f => (a -> Complex r) -> f a -> Complex r #

GCDDomain d => Monoidal (Fraction d) # 

Methods

zero :: Fraction d #

sinnum :: Natural -> Fraction d -> Fraction d #

sumWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d #

Monoidal r => Monoidal (e -> r) # 

Methods

zero :: e -> r #

sinnum :: Natural -> (e -> r) -> e -> r #

sumWith :: Foldable f => (a -> e -> r) -> f a -> e -> r #

(Monoidal a, Monoidal b) => Monoidal (a, b) # 

Methods

zero :: (a, b) #

sinnum :: Natural -> (a, b) -> (a, b) #

sumWith :: Foldable f => (a -> (a, b)) -> f a -> (a, b) #

Monoidal s => Monoidal (Covector s a) # 

Methods

zero :: Covector s a #

sinnum :: Natural -> Covector s a -> Covector s a #

sumWith :: Foldable f => (a -> Covector s a) -> f a -> Covector s a #

(Monoidal a, Monoidal b, Monoidal c) => Monoidal (a, b, c) # 

Methods

zero :: (a, b, c) #

sinnum :: Natural -> (a, b, c) -> (a, b, c) #

sumWith :: Foldable f => (a -> (a, b, c)) -> f a -> (a, b, c) #

Monoidal s => Monoidal (Map s b a) # 

Methods

zero :: Map s b a #

sinnum :: Natural -> Map s b a -> Map s b a #

sumWith :: Foldable f => (a -> Map s b a) -> f a -> Map s b a #

(Monoidal a, Monoidal b, Monoidal c, Monoidal d) => Monoidal (a, b, c, d) # 

Methods

zero :: (a, b, c, d) #

sinnum :: Natural -> (a, b, c, d) -> (a, b, c, d) #

sumWith :: Foldable f => (a -> (a, b, c, d)) -> f a -> (a, b, c, d) #

(Monoidal a, Monoidal b, Monoidal c, Monoidal d, Monoidal e) => Monoidal (a, b, c, d, e) # 

Methods

zero :: (a, b, c, d, e) #

sinnum :: Natural -> (a, b, c, d, e) -> (a, b, c, d, e) #

sumWith :: Foldable f => (a -> (a, b, c, d, e)) -> f a -> (a, b, c, d, e) #

sum :: (Foldable f, Monoidal m) => f m -> m #

sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r #

Associative algebras

class Semiring r => Algebra r a where #

An associative algebra built with a free module over a semiring

Minimal complete definition

mult

Methods

mult :: (a -> a -> r) -> a -> r #

Instances

Algebra () a # 

Methods

mult :: (a -> a -> ()) -> a -> () #

Semiring r => Algebra r IntSet # 

Methods

mult :: (IntSet -> IntSet -> r) -> IntSet -> r #

Semiring r => Algebra r () # 

Methods

mult :: (() -> () -> r) -> () -> r #

(Commutative k, Rng k) => Algebra k TrigBasis # 

Methods

mult :: (TrigBasis -> TrigBasis -> k) -> TrigBasis -> k #

(TriviallyInvolutive r, Semiring r) => Algebra r QuaternionBasis' #

the trivial diagonal algebra

Semiring k => Algebra k HyperBasis #

the trivial diagonal algebra

Methods

mult :: (HyperBasis -> HyperBasis -> k) -> HyperBasis -> k #

Semiring k => Algebra k DualBasis' # 

Methods

mult :: (DualBasis' -> DualBasis' -> k) -> DualBasis' -> k #

(TriviallyInvolutive r, Rng r) => Algebra r QuaternionBasis #

the quaternion algebra

(Commutative k, Semiring k) => Algebra k HyperBasis' # 

Methods

mult :: (HyperBasis' -> HyperBasis' -> k) -> HyperBasis' -> k #

Rng k => Algebra k DualBasis # 

Methods

mult :: (DualBasis -> DualBasis -> k) -> DualBasis -> k #

Rng k => Algebra k ComplexBasis # 

Methods

mult :: (ComplexBasis -> ComplexBasis -> k) -> ComplexBasis -> k #

(Semiring r, Ord a) => Algebra r (Set a) # 

Methods

mult :: (Set a -> Set a -> r) -> Set a -> r #

Semiring r => Algebra r (Seq a) #

The tensor algebra

Methods

mult :: (Seq a -> Seq a -> r) -> Seq a -> r #

Semiring r => Algebra r [a] #

The tensor algebra

Methods

mult :: ([a] -> [a] -> r) -> [a] -> r #

(Commutative r, Monoidal r, Semiring r, LocallyFiniteOrder a) => Algebra r (Interval a) # 

Methods

mult :: (Interval a -> Interval a -> r) -> Interval a -> r #

(Algebra r a, Algebra r b) => Algebra r (a, b) # 

Methods

mult :: ((a, b) -> (a, b) -> r) -> (a, b) -> r #

(Algebra r a, Algebra r b, Algebra r c) => Algebra r (a, b, c) # 

Methods

mult :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> r #

(Algebra r a, Algebra r b, Algebra r c, Algebra r d) => Algebra r (a, b, c, d) # 

Methods

mult :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> r #

(Algebra r a, Algebra r b, Algebra r c, Algebra r d, Algebra r e) => Algebra r (a, b, c, d, e) # 

Methods

mult :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r #

Coassociative coalgebras

class Semiring r => Coalgebra r c where #

Minimal complete definition

comult

Methods

comult :: (c -> r) -> c -> c -> r #

Instances

Semiring r => Coalgebra r IntSet #

the free commutative band coalgebra over Int

Methods

comult :: (IntSet -> r) -> IntSet -> IntSet -> r #

Semiring r => Coalgebra r () # 

Methods

comult :: (() -> r) -> () -> () -> r #

(Commutative k, Rng k) => Coalgebra k TrigBasis # 

Methods

comult :: (TrigBasis -> k) -> TrigBasis -> TrigBasis -> k #

(TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis' #

dual quaternion comultiplication

(Commutative k, Semiring k) => Coalgebra k HyperBasis #

the hyperbolic trigonometric coalgebra

Methods

comult :: (HyperBasis -> k) -> HyperBasis -> HyperBasis -> k #

Rng k => Coalgebra k DualBasis' # 

Methods

comult :: (DualBasis' -> k) -> DualBasis' -> DualBasis' -> k #

(TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis #

the trivial diagonal coalgebra

(Commutative k, Monoidal k, Semiring k) => Coalgebra k HyperBasis' # 

Methods

comult :: (HyperBasis' -> k) -> HyperBasis' -> HyperBasis' -> k #

Rng k => Coalgebra k DualBasis # 

Methods

comult :: (DualBasis -> k) -> DualBasis -> DualBasis -> k #

Rng k => Coalgebra k ComplexBasis # 

Methods

comult :: (ComplexBasis -> k) -> ComplexBasis -> ComplexBasis -> k #

(Semiring r, Additive b) => Coalgebra r (IntMap b) #

the free commutative coalgebra over a set and Int

Methods

comult :: (IntMap b -> r) -> IntMap b -> IntMap b -> r #

(Semiring r, Ord a) => Coalgebra r (Set a) #

the free commutative band coalgebra

Methods

comult :: (Set a -> r) -> Set a -> Set a -> r #

Semiring r => Coalgebra r (Seq a) #

The tensor Hopf algebra

Methods

comult :: (Seq a -> r) -> Seq a -> Seq a -> r #

Semiring r => Coalgebra r [a] #

The tensor Hopf algebra

Methods

comult :: ([a] -> r) -> [a] -> [a] -> r #

(Commutative r, Monoidal r, Semiring r, PartialSemigroup a) => Coalgebra r (Morphism a) # 

Methods

comult :: (Morphism a -> r) -> Morphism a -> Morphism a -> r #

(Eq a, Commutative r, Monoidal r, Semiring r) => Coalgebra r (Interval' a) # 

Methods

comult :: (Interval' a -> r) -> Interval' a -> Interval' a -> r #

Eigenmetric r m => Coalgebra r (BasisCoblade m) # 

Methods

comult :: (BasisCoblade m -> r) -> BasisCoblade m -> BasisCoblade m -> r #

(Semiring r, Ord a, Additive b) => Coalgebra r (Map a b) #

the free commutative coalgebra over a set and a given semigroup

Methods

comult :: (Map a b -> r) -> Map a b -> Map a b -> r #

(Coalgebra r a, Coalgebra r b) => Coalgebra r (a, b) # 

Methods

comult :: ((a, b) -> r) -> (a, b) -> (a, b) -> r #

Algebra r m => Coalgebra r (m -> r) #

Every coalgebra gives rise to an algebra by vector space duality classically. Sadly, it requires vector space duality, which we cannot use constructively. The dual argument only relies in the fact that any constructive coalgebra can only inspect a finite number of coefficients, which we CAN exploit.

Methods

comult :: ((m -> r) -> r) -> (m -> r) -> (m -> r) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c) => Coalgebra r (a, b, c) # 

Methods

comult :: ((a, b, c) -> r) -> (a, b, c) -> (a, b, c) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d) => Coalgebra r (a, b, c, d) # 

Methods

comult :: ((a, b, c, d) -> r) -> (a, b, c, d) -> (a, b, c, d) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d, Coalgebra r e) => Coalgebra r (a, b, c, d, e) # 

Methods

comult :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> (a, b, c, d, e) -> r #