algebra-4.3: Constructive abstract algebra

Numeric.Algebra

Synopsis

class Additive r where Source #

(a + b) + c = a + (b + c)
sinnum 1 a = a
sinnum (2 * n) a = sinnum n a + sinnum n a
sinnum (2 * n + 1) a = sinnum n a + sinnum n a + a

Minimal complete definition

(+)

Methods

(+) :: r -> r -> r infixl 6 Source #

sinnum1p :: Natural -> r -> r Source #

sinnum1p n r = sinnum (1 + n) r

sumWith1 :: Foldable1 f => (a -> r) -> f a -> r Source #

Instances

sum1 :: (Foldable1 f, Additive r) => f r -> r Source #

class Additive r => Abelian r Source #

a + b = b + a

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Abelian () Source # Source # Source # GCDDomain d => Abelian (Fraction d) Source # Abelian r => Abelian (Complex r) Source # Abelian r => Abelian (Dual r) Source # Abelian r => Abelian (Hyper' r) Source # Abelian r => Abelian (Quaternion r) Source # Abelian r => Abelian (Dual' r) Source # Source # Abelian r => Abelian (Hyper r) Source # Abelian r => Abelian (Quaternion' r) Source # Abelian r => Abelian (Trig r) Source # Commutative r => Abelian (Log r) Source # Abelian r => Abelian (End r) Source # Abelian r => Abelian (Opposite r) Source # Abelian r => Abelian (RngRing r) Source # Abelian r => Abelian (ZeroRng r) Source # Abelian r => Abelian (e -> r) Source # (Abelian a, Abelian b) => Abelian (a, b) Source # Abelian s => Abelian (Covector s a) Source # (Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) Source # Abelian s => Abelian (Map s b a) Source # (Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) Source # (Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) Source #

class Additive r => Idempotent r Source #

a + a = a

Instances

 Source # Source # Idempotent r => Idempotent (Complex r) Source # Idempotent r => Idempotent (Dual r) Source # Idempotent r => Idempotent (Hyper' r) Source # Source # Idempotent r => Idempotent (Dual' r) Source # Idempotent r => Idempotent (Hyper r) Source # Source # Idempotent r => Idempotent (Trig r) Source # Band r => Idempotent (Log r) Source # Idempotent r => Idempotent (Opposite r) Source # Idempotent r => Idempotent (ZeroRng r) Source # Idempotent r => Idempotent (e -> r) Source # (Idempotent a, Idempotent b) => Idempotent (a, b) Source # Idempotent r => Idempotent (Covector r a) Source # (Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) Source # (Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) Source # (Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) Source #

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

class Additive m => Partitionable m where Source #

Minimal complete definition

partitionWith

Methods

partitionWith :: (m -> m -> r) -> m -> NonEmpty r Source #

partitionWith f c returns a list containing f a b for each a b such that a + b = c,

Instances

 Source # MethodspartitionWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r Source # Source # MethodspartitionWith :: (() -> () -> r) -> () -> NonEmpty r Source # Source # MethodspartitionWith :: (Natural -> Natural -> r) -> Natural -> NonEmpty r Source # Source # MethodspartitionWith :: (Complex r -> Complex r -> r) -> Complex r -> NonEmpty r Source # Source # MethodspartitionWith :: (Dual r -> Dual r -> r) -> Dual r -> NonEmpty r Source # Source # MethodspartitionWith :: (Hyper' r -> Hyper' r -> r) -> Hyper' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Quaternion r -> Quaternion r -> r) -> Quaternion r -> NonEmpty r Source # Source # MethodspartitionWith :: (Dual' r -> Dual' r -> r) -> Dual' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Hyper r -> Hyper r -> r) -> Hyper r -> NonEmpty r Source # Source # MethodspartitionWith :: (Quaternion' r -> Quaternion' r -> r) -> Quaternion' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Trig r -> Trig r -> r) -> Trig r -> NonEmpty r Source # Factorable r => Partitionable (Log r) Source # MethodspartitionWith :: (Log r -> Log r -> r) -> Log r -> NonEmpty r Source # (Partitionable a, Partitionable b) => Partitionable (a, b) Source # MethodspartitionWith :: ((a, b) -> (a, b) -> r) -> (a, b) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) Source # MethodspartitionWith :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) Source # MethodspartitionWith :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) Source # MethodspartitionWith :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> NonEmpty r Source #

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

zero + a = a = a + zero

Minimal complete definition

zero

Methods

zero :: m Source #

sinnum :: Natural -> m -> m Source #

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

Instances

 Source # MethodssumWith :: Foldable f => (a -> Bool) -> f a -> Bool Source # Source # MethodssumWith :: Foldable f => (a -> Int) -> f a -> Int Source # Source # MethodssumWith :: Foldable f => (a -> Int8) -> f a -> Int8 Source # Source # MethodssumWith :: Foldable f => (a -> Int16) -> f a -> Int16 Source # Source # MethodssumWith :: Foldable f => (a -> Int32) -> f a -> Int32 Source # Source # MethodssumWith :: Foldable f => (a -> Int64) -> f a -> Int64 Source # Source # MethodssumWith :: Foldable f => (a -> Integer) -> f a -> Integer Source # Source # MethodssumWith :: Foldable f => (a -> Word) -> f a -> Word Source # Source # MethodssumWith :: Foldable f => (a -> Word8) -> f a -> Word8 Source # Source # MethodssumWith :: Foldable f => (a -> Word16) -> f a -> Word16 Source # Source # MethodssumWith :: Foldable f => (a -> Word32) -> f a -> Word32 Source # Source # MethodssumWith :: Foldable f => (a -> Word64) -> f a -> Word64 Source # Monoidal () Source # Methodszero :: () Source #sinnum :: Natural -> () -> () Source #sumWith :: Foldable f => (a -> ()) -> f a -> () Source # Source # MethodssumWith :: Foldable f => (a -> Natural) -> f a -> Natural Source # Source # MethodssumWith :: Foldable f => (a -> Euclidean) -> f a -> Euclidean Source # GCDDomain d => Monoidal (Fraction d) Source # Methodssinnum :: Natural -> Fraction d -> Fraction d Source #sumWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d Source # Monoidal r => Monoidal (Complex r) Source # Methodssinnum :: Natural -> Complex r -> Complex r Source #sumWith :: Foldable f => (a -> Complex r) -> f a -> Complex r Source # Monoidal r => Monoidal (Dual r) Source # Methodssinnum :: Natural -> Dual r -> Dual r Source #sumWith :: Foldable f => (a -> Dual r) -> f a -> Dual r Source # Monoidal r => Monoidal (Hyper' r) Source # Methodssinnum :: Natural -> Hyper' r -> Hyper' r Source #sumWith :: Foldable f => (a -> Hyper' r) -> f a -> Hyper' r Source # Monoidal r => Monoidal (Quaternion r) Source # MethodssumWith :: Foldable f => (a -> Quaternion r) -> f a -> Quaternion r Source # Monoidal r => Monoidal (Dual' r) Source # Methodssinnum :: Natural -> Dual' r -> Dual' r Source #sumWith :: Foldable f => (a -> Dual' r) -> f a -> Dual' r Source # Source # MethodssumWith :: Foldable f => (a -> BasisCoblade m) -> f a -> BasisCoblade m Source # Monoidal r => Monoidal (Hyper r) Source # Methodssinnum :: Natural -> Hyper r -> Hyper r Source #sumWith :: Foldable f => (a -> Hyper r) -> f a -> Hyper r Source # Monoidal r => Monoidal (Quaternion' r) Source # MethodssumWith :: Foldable f => (a -> Quaternion' r) -> f a -> Quaternion' r Source # Monoidal r => Monoidal (Trig r) Source # Methodssinnum :: Natural -> Trig r -> Trig r Source #sumWith :: Foldable f => (a -> Trig r) -> f a -> Trig r Source # Unital r => Monoidal (Log r) Source # Methodssinnum :: Natural -> Log r -> Log r Source #sumWith :: Foldable f => (a -> Log r) -> f a -> Log r Source # Monoidal r => Monoidal (End r) Source # Methodssinnum :: Natural -> End r -> End r Source #sumWith :: Foldable f => (a -> End r) -> f a -> End r Source # Monoidal r => Monoidal (Opposite r) Source # Methodssinnum :: Natural -> Opposite r -> Opposite r Source #sumWith :: Foldable f => (a -> Opposite r) -> f a -> Opposite r Source # (Abelian r, Monoidal r) => Monoidal (RngRing r) Source # Methodssinnum :: Natural -> RngRing r -> RngRing r Source #sumWith :: Foldable f => (a -> RngRing r) -> f a -> RngRing r Source # Monoidal r => Monoidal (ZeroRng r) Source # Methodssinnum :: Natural -> ZeroRng r -> ZeroRng r Source #sumWith :: Foldable f => (a -> ZeroRng r) -> f a -> ZeroRng r Source # Monoidal r => Monoidal (e -> r) Source # Methodszero :: e -> r Source #sinnum :: Natural -> (e -> r) -> e -> r Source #sumWith :: Foldable f => (a -> e -> r) -> f a -> e -> r Source # (Monoidal a, Monoidal b) => Monoidal (a, b) Source # Methodszero :: (a, b) Source #sinnum :: Natural -> (a, b) -> (a, b) Source #sumWith :: Foldable f => (a -> (a, b)) -> f a -> (a, b) Source # Monoidal s => Monoidal (Covector s a) Source # Methodszero :: Covector s a Source #sinnum :: Natural -> Covector s a -> Covector s a Source #sumWith :: Foldable f => (a -> Covector s a) -> f a -> Covector s a Source # (Monoidal a, Monoidal b, Monoidal c) => Monoidal (a, b, c) Source # Methodszero :: (a, b, c) Source #sinnum :: Natural -> (a, b, c) -> (a, b, c) Source #sumWith :: Foldable f => (a -> (a, b, c)) -> f a -> (a, b, c) Source # Monoidal s => Monoidal (Map s b a) Source # Methodszero :: Map s b a Source #sinnum :: Natural -> Map s b a -> Map s b a Source #sumWith :: Foldable f => (a -> Map s b a) -> f a -> Map s b a Source # (Monoidal a, Monoidal b, Monoidal c, Monoidal d) => Monoidal (a, b, c, d) Source # Methodszero :: (a, b, c, d) Source #sinnum :: Natural -> (a, b, c, d) -> (a, b, c, d) Source #sumWith :: Foldable f => (a -> (a, b, c, d)) -> f a -> (a, b, c, d) Source # (Monoidal a, Monoidal b, Monoidal c, Monoidal d, Monoidal e) => Monoidal (a, b, c, d, e) Source # Methodszero :: (a, b, c, d, e) Source #sinnum :: Natural -> (a, b, c, d, e) -> (a, b, c, d, e) Source #sumWith :: Foldable f => (a -> (a, b, c, d, e)) -> f a -> (a, b, c, d, e) Source #

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

class (LeftModule Integer r, RightModule Integer r, Monoidal r) => Group r where Source #

Methods

(-) :: r -> r -> r infixl 6 Source #

negate :: r -> r Source #

subtract :: r -> r -> r Source #

times :: Integral n => n -> r -> r infixl 7 Source #

Instances

 Source # Methods(-) :: Int -> Int -> Int Source #subtract :: Int -> Int -> Int Source #times :: Integral n => n -> Int -> Int Source # Source # Methods(-) :: Int8 -> Int8 -> Int8 Source #times :: Integral n => n -> Int8 -> Int8 Source # Source # Methodstimes :: Integral n => n -> Int16 -> Int16 Source # Source # Methodstimes :: Integral n => n -> Int32 -> Int32 Source # Source # Methodstimes :: Integral n => n -> Int64 -> Int64 Source # Source # Methodstimes :: Integral n => n -> Integer -> Integer Source # Source # Methods(-) :: Word -> Word -> Word Source #times :: Integral n => n -> Word -> Word Source # Source # Methodstimes :: Integral n => n -> Word8 -> Word8 Source # Source # Methodstimes :: Integral n => n -> Word16 -> Word16 Source # Source # Methodstimes :: Integral n => n -> Word32 -> Word32 Source # Source # Methodstimes :: Integral n => n -> Word64 -> Word64 Source # Group () Source # Methods(-) :: () -> () -> () Source #negate :: () -> () Source #subtract :: () -> () -> () Source #times :: Integral n => n -> () -> () Source # Source # Methodstimes :: Integral n => n -> Euclidean -> Euclidean Source # GCDDomain d => Group (Fraction d) Source # Methods(-) :: Fraction d -> Fraction d -> Fraction d Source #subtract :: Fraction d -> Fraction d -> Fraction d Source #times :: Integral n => n -> Fraction d -> Fraction d Source # Group r => Group (Complex r) Source # Methods(-) :: Complex r -> Complex r -> Complex r Source #negate :: Complex r -> Complex r Source #subtract :: Complex r -> Complex r -> Complex r Source #times :: Integral n => n -> Complex r -> Complex r Source # Group r => Group (Dual r) Source # Methods(-) :: Dual r -> Dual r -> Dual r Source #negate :: Dual r -> Dual r Source #subtract :: Dual r -> Dual r -> Dual r Source #times :: Integral n => n -> Dual r -> Dual r Source # Group r => Group (Hyper' r) Source # Methods(-) :: Hyper' r -> Hyper' r -> Hyper' r Source #negate :: Hyper' r -> Hyper' r Source #subtract :: Hyper' r -> Hyper' r -> Hyper' r Source #times :: Integral n => n -> Hyper' r -> Hyper' r Source # Group r => Group (Quaternion r) Source # Methods(-) :: Quaternion r -> Quaternion r -> Quaternion r Source #times :: Integral n => n -> Quaternion r -> Quaternion r Source # Group r => Group (Dual' r) Source # Methods(-) :: Dual' r -> Dual' r -> Dual' r Source #negate :: Dual' r -> Dual' r Source #subtract :: Dual' r -> Dual' r -> Dual' r Source #times :: Integral n => n -> Dual' r -> Dual' r Source # Group r => Group (Hyper r) Source # Methods(-) :: Hyper r -> Hyper r -> Hyper r Source #negate :: Hyper r -> Hyper r Source #subtract :: Hyper r -> Hyper r -> Hyper r Source #times :: Integral n => n -> Hyper r -> Hyper r Source # Group r => Group (Quaternion' r) Source # Methods(-) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source #times :: Integral n => n -> Quaternion' r -> Quaternion' r Source # Group r => Group (Trig r) Source # Methods(-) :: Trig r -> Trig r -> Trig r Source #negate :: Trig r -> Trig r Source #subtract :: Trig r -> Trig r -> Trig r Source #times :: Integral n => n -> Trig r -> Trig r Source # Division r => Group (Log r) Source # Methods(-) :: Log r -> Log r -> Log r Source #negate :: Log r -> Log r Source #subtract :: Log r -> Log r -> Log r Source #times :: Integral n => n -> Log r -> Log r Source # Group r => Group (End r) Source # Methods(-) :: End r -> End r -> End r Source #negate :: End r -> End r Source #subtract :: End r -> End r -> End r Source #times :: Integral n => n -> End r -> End r Source # Group r => Group (Opposite r) Source # Methods(-) :: Opposite r -> Opposite r -> Opposite r Source #subtract :: Opposite r -> Opposite r -> Opposite r Source #times :: Integral n => n -> Opposite r -> Opposite r Source # (Abelian r, Group r) => Group (RngRing r) Source # Methods(-) :: RngRing r -> RngRing r -> RngRing r Source #negate :: RngRing r -> RngRing r Source #subtract :: RngRing r -> RngRing r -> RngRing r Source #times :: Integral n => n -> RngRing r -> RngRing r Source # Group r => Group (ZeroRng r) Source # Methods(-) :: ZeroRng r -> ZeroRng r -> ZeroRng r Source #negate :: ZeroRng r -> ZeroRng r Source #subtract :: ZeroRng r -> ZeroRng r -> ZeroRng r Source #times :: Integral n => n -> ZeroRng r -> ZeroRng r Source # Group r => Group (e -> r) Source # Methods(-) :: (e -> r) -> (e -> r) -> e -> r Source #negate :: (e -> r) -> e -> r Source #subtract :: (e -> r) -> (e -> r) -> e -> r Source #times :: Integral n => n -> (e -> r) -> e -> r Source # (Group a, Group b) => Group (a, b) Source # Methods(-) :: (a, b) -> (a, b) -> (a, b) Source #negate :: (a, b) -> (a, b) Source #subtract :: (a, b) -> (a, b) -> (a, b) Source #times :: Integral n => n -> (a, b) -> (a, b) Source # Group s => Group (Covector s a) Source # Methods(-) :: Covector s a -> Covector s a -> Covector s a Source #negate :: Covector s a -> Covector s a Source #subtract :: Covector s a -> Covector s a -> Covector s a Source #times :: Integral n => n -> Covector s a -> Covector s a Source # (Group a, Group b, Group c) => Group (a, b, c) Source # Methods(-) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #negate :: (a, b, c) -> (a, b, c) Source #subtract :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #times :: Integral n => n -> (a, b, c) -> (a, b, c) Source # Group s => Group (Map s b a) Source # Methods(-) :: Map s b a -> Map s b a -> Map s b a Source #negate :: Map s b a -> Map s b a Source #subtract :: Map s b a -> Map s b a -> Map s b a Source #times :: Integral n => n -> Map s b a -> Map s b a Source # (Group a, Group b, Group c, Group d) => Group (a, b, c, d) Source # Methods(-) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #negate :: (a, b, c, d) -> (a, b, c, d) Source #subtract :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #times :: Integral n => n -> (a, b, c, d) -> (a, b, c, d) Source # (Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) Source # Methods(-) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #negate :: (a, b, c, d, e) -> (a, b, c, d, e) Source #subtract :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #times :: Integral n => n -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

# Multiplicative

## multiplicative semigroups

class Multiplicative r where Source #

A multiplicative semigroup

Minimal complete definition

(*)

Methods

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

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

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

Instances

 Source # Methods(*) :: Bool -> Bool -> Bool Source #productWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool Source # Source # Methods(*) :: Int -> Int -> Int Source #productWith1 :: Foldable1 f => (a -> Int) -> f a -> Int Source # Source # Methods(*) :: Int8 -> Int8 -> Int8 Source #productWith1 :: Foldable1 f => (a -> Int8) -> f a -> Int8 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Int16) -> f a -> Int16 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer Source # Source # Methods(*) :: Word -> Word -> Word Source #productWith1 :: Foldable1 f => (a -> Word) -> f a -> Word Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Word16) -> f a -> Word16 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 Source # Source # Methods(*) :: () -> () -> () Source #pow1p :: () -> Natural -> () Source #productWith1 :: Foldable1 f => (a -> ()) -> f a -> () Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> Euclidean) -> f a -> Euclidean Source # Source # Methods(*) :: Fraction d -> Fraction d -> Fraction d Source #pow1p :: Fraction d -> Natural -> Fraction d Source #productWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d Source # (Commutative r, Rng r) => Multiplicative (Complex r) Source # Methods(*) :: Complex r -> Complex r -> Complex r Source #pow1p :: Complex r -> Natural -> Complex r Source #productWith1 :: Foldable1 f => (a -> Complex r) -> f a -> Complex r Source # (Commutative r, Rng r) => Multiplicative (Dual r) Source # Methods(*) :: Dual r -> Dual r -> Dual r Source #pow1p :: Dual r -> Natural -> Dual r Source #productWith1 :: Foldable1 f => (a -> Dual r) -> f a -> Dual r Source # (Commutative k, Semiring k) => Multiplicative (Hyper' k) Source # Methods(*) :: Hyper' k -> Hyper' k -> Hyper' k Source #pow1p :: Hyper' k -> Natural -> Hyper' k Source #productWith1 :: Foldable1 f => (a -> Hyper' k) -> f a -> Hyper' k Source # Source # Methods(*) :: Quaternion r -> Quaternion r -> Quaternion r Source #productWith1 :: Foldable1 f => (a -> Quaternion r) -> f a -> Quaternion r Source # (Commutative r, Rng r) => Multiplicative (Dual' r) Source # Methods(*) :: Dual' r -> Dual' r -> Dual' r Source #pow1p :: Dual' r -> Natural -> Dual' r Source #productWith1 :: Foldable1 f => (a -> Dual' r) -> f a -> Dual' r Source # Source # MethodsproductWith1 :: Foldable1 f => (a -> BasisCoblade m) -> f a -> BasisCoblade m Source # (Commutative k, Semiring k) => Multiplicative (Hyper k) Source # Methods(*) :: Hyper k -> Hyper k -> Hyper k Source #pow1p :: Hyper k -> Natural -> Hyper k Source #productWith1 :: Foldable1 f => (a -> Hyper k) -> f a -> Hyper k Source # Source # Methods(*) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source #productWith1 :: Foldable1 f => (a -> Quaternion' r) -> f a -> Quaternion' r Source # (Commutative k, Rng k) => Multiplicative (Trig k) Source # Methods(*) :: Trig k -> Trig k -> Trig k Source #pow1p :: Trig k -> Natural -> Trig k Source #productWith1 :: Foldable1 f => (a -> Trig k) -> f a -> Trig k Source # Additive r => Multiplicative (Exp r) Source # Methods(*) :: Exp r -> Exp r -> Exp r Source #pow1p :: Exp r -> Natural -> Exp r Source #productWith1 :: Foldable1 f => (a -> Exp r) -> f a -> Exp r Source # Source # Methods(*) :: End r -> End r -> End r Source #pow1p :: End r -> Natural -> End r Source #productWith1 :: Foldable1 f => (a -> End r) -> f a -> End r Source # Source # Methods(*) :: Opposite r -> Opposite r -> Opposite r Source #pow1p :: Opposite r -> Natural -> Opposite r Source #productWith1 :: Foldable1 f => (a -> Opposite r) -> f a -> Opposite r Source # Rng r => Multiplicative (RngRing r) Source # Methods(*) :: RngRing r -> RngRing r -> RngRing r Source #pow1p :: RngRing r -> Natural -> RngRing r Source #productWith1 :: Foldable1 f => (a -> RngRing r) -> f a -> RngRing r Source # Source # Methods(*) :: ZeroRng r -> ZeroRng r -> ZeroRng r Source #pow1p :: ZeroRng r -> Natural -> ZeroRng r Source #productWith1 :: Foldable1 f => (a -> ZeroRng r) -> f a -> ZeroRng r Source # Algebra r a => Multiplicative (a -> r) Source # Methods(*) :: (a -> r) -> (a -> r) -> a -> r Source #pow1p :: (a -> r) -> Natural -> a -> r Source #productWith1 :: Foldable1 f => (a -> a -> r) -> f a -> a -> r Source # (Multiplicative a, Multiplicative b) => Multiplicative (a, b) Source # Methods(*) :: (a, b) -> (a, b) -> (a, b) Source #pow1p :: (a, b) -> Natural -> (a, b) Source #productWith1 :: Foldable1 f => (a -> (a, b)) -> f a -> (a, b) Source # Multiplicative (Rect i j) Source # Methods(*) :: Rect i j -> Rect i j -> Rect i j Source #pow1p :: Rect i j -> Natural -> Rect i j Source #productWith1 :: Foldable1 f => (a -> Rect i j) -> f a -> Rect i j Source # Coalgebra r m => Multiplicative (Covector r m) Source # Methods(*) :: Covector r m -> Covector r m -> Covector r m Source #pow1p :: Covector r m -> Natural -> Covector r m Source #productWith1 :: Foldable1 f => (a -> Covector r m) -> f a -> Covector r m Source # (Multiplicative a, Multiplicative b, Multiplicative c) => Multiplicative (a, b, c) Source # Methods(*) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #pow1p :: (a, b, c) -> Natural -> (a, b, c) Source #productWith1 :: Foldable1 f => (a -> (a, b, c)) -> f a -> (a, b, c) Source # Coalgebra r m => Multiplicative (Map r b m) Source # Methods(*) :: Map r b m -> Map r b m -> Map r b m Source #pow1p :: Map r b m -> Natural -> Map r b m Source #productWith1 :: Foldable1 f => (a -> Map r b m) -> f a -> Map r b m Source # (Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d) => Multiplicative (a, b, c, d) Source # Methods(*) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #pow1p :: (a, b, c, d) -> Natural -> (a, b, c, d) Source #productWith1 :: Foldable1 f => (a -> (a, b, c, d)) -> f a -> (a, b, c, d) Source # (Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d, Multiplicative e) => Multiplicative (a, b, c, d, e) Source # Methods(*) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #pow1p :: (a, b, c, d, e) -> Natural -> (a, b, c, d, e) Source #productWith1 :: Foldable1 f => (a -> (a, b, c, d, e)) -> f a -> (a, b, c, d, e) Source #

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

## commutative multiplicative semigroups

class Multiplicative r => Commutative r Source #

A commutative multiplicative semigroup

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # GCDDomain d => Commutative (Fraction d) Source # (TriviallyInvolutive r, Rng r) => Commutative (Complex r) Source # (TriviallyInvolutive r, Rng r) => Commutative (Dual r) Source # (Commutative k, Semiring k) => Commutative (Hyper' k) Source # (TriviallyInvolutive r, Rng r) => Commutative (Dual' r) Source # Source # (Commutative k, Semiring k) => Commutative (Hyper k) Source # (Commutative k, Rng k) => Commutative (Trig k) Source # Abelian r => Commutative (Exp r) Source # (Abelian r, Commutative r) => Commutative (End r) Source # Source # (Commutative r, Rng r) => Commutative (RngRing r) Source # Monoidal r => Commutative (ZeroRng r) Source # CommutativeAlgebra r a => Commutative (a -> r) Source # (Commutative a, Commutative b) => Commutative (a, b) Source # (Commutative m, Coalgebra r m) => Commutative (Covector r m) Source # (Commutative a, Commutative b, Commutative c) => Commutative (a, b, c) Source # (Commutative m, Coalgebra r m) => Commutative (Map r b m) Source # (Commutative a, Commutative b, Commutative c, Commutative d) => Commutative (a, b, c, d) Source # (Commutative a, Commutative b, Commutative c, Commutative d, Commutative e) => Commutative (a, b, c, d, e) Source #

## multiplicative monoids

class Multiplicative r => Unital r where Source #

Minimal complete definition

one

Methods

one :: r Source #

pow :: r -> Natural -> r infixr 8 Source #

productWith :: Foldable f => (a -> r) -> f a -> r Source #

Instances

 Source # MethodsproductWith :: Foldable f => (a -> Bool) -> f a -> Bool Source # Source # Methodspow :: Int -> Natural -> Int Source #productWith :: Foldable f => (a -> Int) -> f a -> Int Source # Source # MethodsproductWith :: Foldable f => (a -> Int8) -> f a -> Int8 Source # Source # MethodsproductWith :: Foldable f => (a -> Int16) -> f a -> Int16 Source # Source # MethodsproductWith :: Foldable f => (a -> Int32) -> f a -> Int32 Source # Source # MethodsproductWith :: Foldable f => (a -> Int64) -> f a -> Int64 Source # Source # MethodsproductWith :: Foldable f => (a -> Integer) -> f a -> Integer Source # Source # MethodsproductWith :: Foldable f => (a -> Word) -> f a -> Word Source # Source # MethodsproductWith :: Foldable f => (a -> Word8) -> f a -> Word8 Source # Source # MethodsproductWith :: Foldable f => (a -> Word16) -> f a -> Word16 Source # Source # MethodsproductWith :: Foldable f => (a -> Word32) -> f a -> Word32 Source # Source # MethodsproductWith :: Foldable f => (a -> Word64) -> f a -> Word64 Source # Unital () Source # Methodsone :: () Source #pow :: () -> Natural -> () Source #productWith :: Foldable f => (a -> ()) -> f a -> () Source # Source # MethodsproductWith :: Foldable f => (a -> Natural) -> f a -> Natural Source # Source # MethodsproductWith :: Foldable f => (a -> Euclidean) -> f a -> Euclidean Source # GCDDomain d => Unital (Fraction d) Source # Methodspow :: Fraction d -> Natural -> Fraction d Source #productWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d Source # (Commutative r, Ring r) => Unital (Complex r) Source # Methodspow :: Complex r -> Natural -> Complex r Source #productWith :: Foldable f => (a -> Complex r) -> f a -> Complex r Source # (Commutative r, Ring r) => Unital (Dual r) Source # Methodspow :: Dual r -> Natural -> Dual r Source #productWith :: Foldable f => (a -> Dual r) -> f a -> Dual r Source # (Commutative k, Rig k) => Unital (Hyper' k) Source # Methodspow :: Hyper' k -> Natural -> Hyper' k Source #productWith :: Foldable f => (a -> Hyper' k) -> f a -> Hyper' k Source # (TriviallyInvolutive r, Ring r) => Unital (Quaternion r) Source # MethodsproductWith :: Foldable f => (a -> Quaternion r) -> f a -> Quaternion r Source # (Commutative r, Ring r) => Unital (Dual' r) Source # Methodspow :: Dual' r -> Natural -> Dual' r Source #productWith :: Foldable f => (a -> Dual' r) -> f a -> Dual' r Source # Source # MethodsproductWith :: Foldable f => (a -> BasisCoblade m) -> f a -> BasisCoblade m Source # (Commutative k, Rig k) => Unital (Hyper k) Source # Methodspow :: Hyper k -> Natural -> Hyper k Source #productWith :: Foldable f => (a -> Hyper k) -> f a -> Hyper k Source # (TriviallyInvolutive r, Ring r) => Unital (Quaternion' r) Source # MethodsproductWith :: Foldable f => (a -> Quaternion' r) -> f a -> Quaternion' r Source # (Commutative k, Ring k) => Unital (Trig k) Source # Methodspow :: Trig k -> Natural -> Trig k Source #productWith :: Foldable f => (a -> Trig k) -> f a -> Trig k Source # Monoidal r => Unital (Exp r) Source # Methodspow :: Exp r -> Natural -> Exp r Source #productWith :: Foldable f => (a -> Exp r) -> f a -> Exp r Source # Unital (End r) Source # Methodspow :: End r -> Natural -> End r Source #productWith :: Foldable f => (a -> End r) -> f a -> End r Source # Unital r => Unital (Opposite r) Source # Methodspow :: Opposite r -> Natural -> Opposite r Source #productWith :: Foldable f => (a -> Opposite r) -> f a -> Opposite r Source # Rng r => Unital (RngRing r) Source # Methodspow :: RngRing r -> Natural -> RngRing r Source #productWith :: Foldable f => (a -> RngRing r) -> f a -> RngRing r Source # (Unital r, UnitalAlgebra r a) => Unital (a -> r) Source # Methodsone :: a -> r Source #pow :: (a -> r) -> Natural -> a -> r Source #productWith :: Foldable f => (a -> a -> r) -> f a -> a -> r Source # (Unital a, Unital b) => Unital (a, b) Source # Methodsone :: (a, b) Source #pow :: (a, b) -> Natural -> (a, b) Source #productWith :: Foldable f => (a -> (a, b)) -> f a -> (a, b) Source # CounitalCoalgebra r m => Unital (Covector r m) Source # Methodsone :: Covector r m Source #pow :: Covector r m -> Natural -> Covector r m Source #productWith :: Foldable f => (a -> Covector r m) -> f a -> Covector r m Source # (Unital a, Unital b, Unital c) => Unital (a, b, c) Source # Methodsone :: (a, b, c) Source #pow :: (a, b, c) -> Natural -> (a, b, c) Source #productWith :: Foldable f => (a -> (a, b, c)) -> f a -> (a, b, c) Source # CounitalCoalgebra r m => Unital (Map r b m) Source # Methodsone :: Map r b m Source #pow :: Map r b m -> Natural -> Map r b m Source #productWith :: Foldable f => (a -> Map r b m) -> f a -> Map r b m Source # (Unital a, Unital b, Unital c, Unital d) => Unital (a, b, c, d) Source # Methodsone :: (a, b, c, d) Source #pow :: (a, b, c, d) -> Natural -> (a, b, c, d) Source #productWith :: Foldable f => (a -> (a, b, c, d)) -> f a -> (a, b, c, d) Source # (Unital a, Unital b, Unital c, Unital d, Unital e) => Unital (a, b, c, d, e) Source # Methodsone :: (a, b, c, d, e) Source #pow :: (a, b, c, d, e) -> Natural -> (a, b, c, d, e) Source #productWith :: Foldable f => (a -> (a, b, c, d, e)) -> f a -> (a, b, c, d, e) Source #

product :: (Foldable f, Unital r) => f r -> r Source #

## idempotent multiplicative semigroups

class Multiplicative r => Band r Source #

An multiplicative semigroup with idempotent multiplication.

a * a = a

Instances

 Source # Band () Source # Idempotent r => Band (Exp r) Source # Band r => Band (Opposite r) Source # (Band a, Band b) => Band (a, b) Source # Band (Rect i j) Source # (Idempotent r, IdempotentCoalgebra r a) => Band (Covector r a) Source # (Band a, Band b, Band c) => Band (a, b, c) Source # (Band a, Band b, Band c, Band d) => Band (a, b, c, d) Source # (Band a, Band b, Band c, Band d, Band e) => Band (a, b, c, d, e) Source #

pow1pBand :: r -> Natural -> r Source #

powBand :: Unital r => r -> Natural -> r Source #

## multiplicative groups

class Unital r => Division r where Source #

Methods

recip :: r -> r Source #

(/) :: r -> r -> r infixl 7 Source #

(\\) :: r -> r -> r infixl 7 Source #

(^) :: Integral n => r -> n -> r infixr 8 Source #

Instances

 Division () Source # Methodsrecip :: () -> () Source #(/) :: () -> () -> () Source #(\\) :: () -> () -> () Source #(^) :: Integral n => () -> n -> () Source # GCDDomain d => Division (Fraction d) Source # Methodsrecip :: Fraction d -> Fraction d Source #(/) :: Fraction d -> Fraction d -> Fraction d Source #(\\) :: Fraction d -> Fraction d -> Fraction d Source #(^) :: Integral n => Fraction d -> n -> Fraction d Source # Source # Methodsrecip :: Complex r -> Complex r Source #(/) :: Complex r -> Complex r -> Complex r Source #(\\) :: Complex r -> Complex r -> Complex r Source #(^) :: Integral n => Complex r -> n -> Complex r Source # Source # Methodsrecip :: Dual r -> Dual r Source #(/) :: Dual r -> Dual r -> Dual r Source #(\\) :: Dual r -> Dual r -> Dual r Source #(^) :: Integral n => Dual r -> n -> Dual r Source # Source # Methodsrecip :: Hyper' r -> Hyper' r Source #(/) :: Hyper' r -> Hyper' r -> Hyper' r Source #(\\) :: Hyper' r -> Hyper' r -> Hyper' r Source #(^) :: Integral n => Hyper' r -> n -> Hyper' r Source # (TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion r) Source # Methods(/) :: Quaternion r -> Quaternion r -> Quaternion r Source #(\\) :: Quaternion r -> Quaternion r -> Quaternion r Source #(^) :: Integral n => Quaternion r -> n -> Quaternion r Source # Source # Methodsrecip :: Dual' r -> Dual' r Source #(/) :: Dual' r -> Dual' r -> Dual' r Source #(\\) :: Dual' r -> Dual' r -> Dual' r Source #(^) :: Integral n => Dual' r -> n -> Dual' r Source # (TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion' r) Source # Methods(/) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source #(\\) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source #(^) :: Integral n => Quaternion' r -> n -> Quaternion' r Source # Group r => Division (Exp r) Source # Methodsrecip :: Exp r -> Exp r Source #(/) :: Exp r -> Exp r -> Exp r Source #(\\) :: Exp r -> Exp r -> Exp r Source #(^) :: Integral n => Exp r -> n -> Exp r Source # Division r => Division (Opposite r) Source # Methodsrecip :: Opposite r -> Opposite r Source #(/) :: Opposite r -> Opposite r -> Opposite r Source #(\\) :: Opposite r -> Opposite r -> Opposite r Source #(^) :: Integral n => Opposite r -> n -> Opposite r Source # (Rng r, Division r) => Division (RngRing r) Source # Methodsrecip :: RngRing r -> RngRing r Source #(/) :: RngRing r -> RngRing r -> RngRing r Source #(\\) :: RngRing r -> RngRing r -> RngRing r Source #(^) :: Integral n => RngRing r -> n -> RngRing r Source # (Unital r, DivisionAlgebra r a) => Division (a -> r) Source # Methodsrecip :: (a -> r) -> a -> r Source #(/) :: (a -> r) -> (a -> r) -> a -> r Source #(\\) :: (a -> r) -> (a -> r) -> a -> r Source #(^) :: Integral n => (a -> r) -> n -> a -> r Source # (Division a, Division b) => Division (a, b) Source # Methodsrecip :: (a, b) -> (a, b) Source #(/) :: (a, b) -> (a, b) -> (a, b) Source #(\\) :: (a, b) -> (a, b) -> (a, b) Source #(^) :: Integral n => (a, b) -> n -> (a, b) Source # (Division a, Division b, Division c) => Division (a, b, c) Source # Methodsrecip :: (a, b, c) -> (a, b, c) Source #(/) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #(\\) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #(^) :: Integral n => (a, b, c) -> n -> (a, b, c) Source # (Division a, Division b, Division c, Division d) => Division (a, b, c, d) Source # Methodsrecip :: (a, b, c, d) -> (a, b, c, d) Source #(/) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #(\\) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #(^) :: Integral n => (a, b, c, d) -> n -> (a, b, c, d) Source # (Division a, Division b, Division c, Division d, Division e) => Division (a, b, c, d, e) Source # Methodsrecip :: (a, b, c, d, e) -> (a, b, c, d, e) Source #(/) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #(\\) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #(^) :: Integral n => (a, b, c, d, e) -> n -> (a, b, c, d, e) Source #

## factorable multiplicative semigroups

class Multiplicative m => Factorable m where Source #

factorWith f c returns a non-empty list containing f a b for all a, b such that a * b = c.

Results of factorWith f 0 are undefined and may result in either an error or an infinite list.

Minimal complete definition

factorWith

Methods

factorWith :: (m -> m -> r) -> m -> NonEmpty r Source #

Instances

 Source # MethodsfactorWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r Source # Source # MethodsfactorWith :: (() -> () -> r) -> () -> NonEmpty r Source # Partitionable r => Factorable (Exp r) Source # MethodsfactorWith :: (Exp r -> Exp r -> r) -> Exp r -> NonEmpty r Source # (Factorable a, Factorable b) => Factorable (a, b) Source # MethodsfactorWith :: ((a, b) -> (a, b) -> r) -> (a, b) -> NonEmpty r Source # (Factorable a, Factorable b, Factorable c) => Factorable (a, b, c) Source # MethodsfactorWith :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> NonEmpty r Source # (Factorable a, Factorable b, Factorable c, Factorable d) => Factorable (a, b, c, d) Source # MethodsfactorWith :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> NonEmpty r Source # (Factorable a, Factorable b, Factorable c, Factorable d, Factorable e) => Factorable (a, b, c, d, e) Source # MethodsfactorWith :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> NonEmpty r Source #

## involutive multiplicative semigroups

class Multiplicative r => InvolutiveMultiplication r where Source #

An semigroup with involution

adjoint a * adjoint b = adjoint (b * a)

Minimal complete definition

Methods

adjoint :: r -> r Source #

Instances

 Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methodsadjoint :: () -> () Source # Source # Methods Source # Methods Source # Methodsadjoint :: Complex r -> Complex r Source # Source # Methodsadjoint :: Dual r -> Dual r Source # Source # Methodsadjoint :: Hyper' r -> Hyper' r Source # Source # Methods Source # Methodsadjoint :: Dual' r -> Dual' r Source # Source # Methodsadjoint :: Hyper r -> Hyper r Source # Source # Methods Source # Methodsadjoint :: Trig r -> Trig r Source # InvolutiveAlgebra r h => InvolutiveMultiplication (h -> r) Source # Methodsadjoint :: (h -> r) -> h -> r Source # Source # Methodsadjoint :: (a, b) -> (a, b) Source # Source # Methodsadjoint :: (a, b, c) -> (a, b, c) Source # Source # Methodsadjoint :: (a, b, c, d) -> (a, b, c, d) Source # Source # Methodsadjoint :: (a, b, c, d, e) -> (a, b, c, d, e) Source #
adjoint = id

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # (TriviallyInvolutive r, TriviallyInvolutiveAlgebra r a) => TriviallyInvolutive (a -> r) Source # Source # (TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c) => TriviallyInvolutive (a, b, c) Source # (TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d) => TriviallyInvolutive (a, b, c, d) Source # (TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d, TriviallyInvolutive e) => TriviallyInvolutive (a, b, c, d, e) Source #

# Ring-Structures

## Semirings

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

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.

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Semiring () Source # Source # Source # GCDDomain d => Semiring (Fraction d) Source # (Commutative r, Rng r) => Semiring (Complex r) Source # (Commutative r, Rng r) => Semiring (Dual r) Source # (Commutative k, Semiring k) => Semiring (Hyper' k) Source # (TriviallyInvolutive r, Rng r) => Semiring (Quaternion r) Source # (Commutative r, Rng r) => Semiring (Dual' r) Source # Source # (Commutative k, Semiring k) => Semiring (Hyper k) Source # Source # (Commutative k, Rng k) => Semiring (Trig k) Source # (Abelian r, Monoidal r) => Semiring (End r) Source # Semiring r => Semiring (Opposite r) Source # Rng r => Semiring (RngRing r) Source # (Monoidal r, Abelian r) => Semiring (ZeroRng r) Source # Algebra r a => Semiring (a -> r) Source # (Semiring a, Semiring b) => Semiring (a, b) Source # Coalgebra r m => Semiring (Covector r m) Source # (Semiring a, Semiring b, Semiring c) => Semiring (a, b, c) Source # Coalgebra r m => Semiring (Map r b m) Source # (Semiring a, Semiring b, Semiring c, Semiring d) => Semiring (a, b, c, d) Source # (Semiring a, Semiring b, Semiring c, Semiring d, Semiring e) => Semiring (a, b, c, d, e) Source #

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # (InvolutiveSemiring a, InvolutiveSemiring b) => InvolutiveSemiring (a, b) Source # (InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c) => InvolutiveSemiring (a, b, c) Source # (InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d) => InvolutiveSemiring (a, b, c, d) Source # (InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d, InvolutiveSemiring e) => InvolutiveSemiring (a, b, c, d, e) Source #

class (Semiring r, Idempotent r) => Dioid r Source #

Instances

 (Semiring r, Idempotent r) => Dioid r Source #

## Rngs

class (Group r, Semiring r) => Rng r Source #

A Ring without an identity.

Instances

 (Group r, Semiring r) => Rng r Source # (Group r, Abelian r) => Rng (ZeroRng r) Source #

## Rigs

class (Semiring r, Unital r, Monoidal r) => Rig r where Source #

A Ring without (n)egation

Methods

Instances

 Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Rig () Source # MethodsfromNatural :: Natural -> () Source # Source # Methods Source # Methods GCDDomain d => Rig (Fraction d) Source # Methods (Commutative r, Ring r) => Rig (Complex r) Source # Methods (Commutative r, Ring r) => Rig (Dual r) Source # Methods (Commutative r, Rig r) => Rig (Hyper' r) Source # Methods (TriviallyInvolutive r, Ring r) => Rig (Quaternion r) Source # Methods (Commutative r, Ring r) => Rig (Dual' r) Source # Methods Source # Methods (Commutative r, Rig r) => Rig (Hyper r) Source # Methods (TriviallyInvolutive r, Ring r) => Rig (Quaternion' r) Source # Methods (Commutative r, Ring r) => Rig (Trig r) Source # Methods (Abelian r, Monoidal r) => Rig (End r) Source # Methods Rig r => Rig (Opposite r) Source # Methods Rng r => Rig (RngRing r) Source # Methods (Rig a, Rig b) => Rig (a, b) Source # MethodsfromNatural :: Natural -> (a, b) Source # (Rig r, CounitalCoalgebra r m) => Rig (Covector r m) Source # Methods (Rig a, Rig b, Rig c) => Rig (a, b, c) Source # MethodsfromNatural :: Natural -> (a, b, c) Source # (Rig r, CounitalCoalgebra r m) => Rig (Map r b m) Source # MethodsfromNatural :: Natural -> Map r b m Source # (Rig a, Rig b, Rig c, Rig d) => Rig (a, b, c, d) Source # MethodsfromNatural :: Natural -> (a, b, c, d) Source # (Rig a, Rig b, Rig c, Rig d, Rig e) => Rig (a, b, c, d, e) Source # MethodsfromNatural :: Natural -> (a, b, c, d, e) Source #

# Rings

class (Rig r, Rng r) => Ring r where Source #

Methods

Instances

 Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Ring () Source # MethodsfromInteger :: Integer -> () Source # Source # Methods GCDDomain d => Ring (Fraction d) Source # Methods (Commutative r, Ring r) => Ring (Complex r) Source # Methods (Commutative r, Ring r) => Ring (Dual r) Source # Methods (Commutative r, Ring r) => Ring (Hyper' r) Source # Methods (TriviallyInvolutive r, Ring r) => Ring (Quaternion r) Source # Methods (Commutative r, Ring r) => Ring (Dual' r) Source # Methods (Commutative r, Ring r) => Ring (Hyper r) Source # Methods (TriviallyInvolutive r, Ring r) => Ring (Quaternion' r) Source # Methods (Commutative r, Ring r) => Ring (Trig r) Source # Methods (Abelian r, Group r) => Ring (End r) Source # Methods Ring r => Ring (Opposite r) Source # Methods Rng r => Ring (RngRing r) Source # Methods (Ring a, Ring b) => Ring (a, b) Source # MethodsfromInteger :: Integer -> (a, b) Source # (Ring r, CounitalCoalgebra r m) => Ring (Covector r m) Source # Methods (Ring a, Ring b, Ring c) => Ring (a, b, c) Source # MethodsfromInteger :: Integer -> (a, b, c) Source # (Ring r, CounitalCoalgebra r m) => Ring (Map r a m) Source # MethodsfromInteger :: Integer -> Map r a m Source # (Ring a, Ring b, Ring c, Ring d) => Ring (a, b, c, d) Source # MethodsfromInteger :: Integer -> (a, b, c, d) Source # (Ring a, Ring b, Ring c, Ring d, Ring e) => Ring (a, b, c, d, e) Source # MethodsfromInteger :: Integer -> (a, b, c, d, e) Source #

## Division Rings

class Ring r => LocalRing r Source #

class (Division r, Ring r) => DivisionRing r Source #

Instances

 (Division r, Ring r) => DivisionRing r Source #

class (Euclidean d, Division d) => Field d Source #

Instances

 (Euclidean d, Division d) => Field d Source #

# Modules

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

Minimal complete definition

(.*)

Methods

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

Instances

 Source # Methods(.*) :: Integer -> Int -> Int Source # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Additive m => LeftModule () m Source # Methods(.*) :: () -> m -> m Source # Semiring r => LeftModule r () Source # Methods(.*) :: r -> () -> () Source # Source # Methods Source # Methods(.*) :: Natural -> Int -> Int Source # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods(.*) :: Integer -> Fraction d -> Fraction d Source # Division r => LeftModule Integer (Log r) Source # Methods(.*) :: Integer -> Log r -> Log r Source # (Abelian r, Group r) => LeftModule Integer (RngRing r) Source # Methods(.*) :: Integer -> RngRing r -> RngRing r Source # Source # Methods(.*) :: Integer -> ZeroRng r -> ZeroRng r Source # LeftModule r s => LeftModule r (Complex s) Source # Methods(.*) :: r -> Complex s -> Complex s Source # LeftModule r s => LeftModule r (Dual s) Source # Methods(.*) :: r -> Dual s -> Dual s Source # LeftModule r s => LeftModule r (Hyper' s) Source # Methods(.*) :: r -> Hyper' s -> Hyper' s Source # LeftModule r s => LeftModule r (Quaternion s) Source # Methods(.*) :: r -> Quaternion s -> Quaternion s Source # LeftModule r s => LeftModule r (Dual' s) Source # Methods(.*) :: r -> Dual' s -> Dual' s Source # LeftModule r s => LeftModule r (Hyper s) Source # Methods(.*) :: r -> Hyper s -> Hyper s Source # LeftModule r s => LeftModule r (Quaternion' s) Source # Methods(.*) :: r -> Quaternion' s -> Quaternion' s Source # LeftModule r s => LeftModule r (Trig s) Source # Methods(.*) :: r -> Trig s -> Trig s Source # LeftModule r m => LeftModule r (End m) Source # Methods(.*) :: r -> End m -> End m Source # RightModule r s => LeftModule r (Opposite s) Source # Methods(.*) :: r -> Opposite s -> Opposite s Source # Source # Methods(.*) :: Natural -> Fraction d -> Fraction d Source # Source # Methods Unital r => LeftModule Natural (Log r) Source # Methods(.*) :: Natural -> Log r -> Log r Source # (Abelian r, Monoidal r) => LeftModule Natural (RngRing r) Source # Methods(.*) :: Natural -> RngRing r -> RngRing r Source # Source # Methods(.*) :: Natural -> ZeroRng r -> ZeroRng r Source # (LeftModule r a, LeftModule r b) => LeftModule r (a, b) Source # Methods(.*) :: r -> (a, b) -> (a, b) Source # LeftModule r m => LeftModule r (e -> m) Source # Methods(.*) :: r -> (e -> m) -> e -> m Source # LeftModule r s => LeftModule r (Covector s m) Source # Methods(.*) :: r -> Covector s m -> Covector s m Source # (LeftModule r a, LeftModule r b, LeftModule r c) => LeftModule r (a, b, c) Source # Methods(.*) :: r -> (a, b, c) -> (a, b, c) Source # LeftModule r s => LeftModule r (Map s b m) Source # Methods(.*) :: r -> Map s b m -> Map s b m Source # (LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d) => LeftModule r (a, b, c, d) Source # Methods(.*) :: r -> (a, b, c, d) -> (a, b, c, d) Source # (LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d, LeftModule r e) => LeftModule r (a, b, c, d, e) Source # Methods(.*) :: r -> (a, b, c, d, e) -> (a, b, c, d, e) Source # (Commutative r, Rng r) => LeftModule (Complex r) (Complex r) Source # Methods(.*) :: Complex r -> Complex r -> Complex r Source # (Commutative r, Rng r) => LeftModule (Dual r) (Dual r) Source # Methods(.*) :: Dual r -> Dual r -> Dual r Source # (Commutative r, Semiring r) => LeftModule (Hyper' r) (Hyper' r) Source # Methods(.*) :: Hyper' r -> Hyper' r -> Hyper' r Source # (TriviallyInvolutive r, Rng r) => LeftModule (Quaternion r) (Quaternion r) Source # Methods(.*) :: Quaternion r -> Quaternion r -> Quaternion r Source # (Commutative r, Rng r) => LeftModule (Dual' r) (Dual' r) Source # Methods(.*) :: Dual' r -> Dual' r -> Dual' r Source # (Commutative r, Semiring r) => LeftModule (Hyper r) (Hyper r) Source # Methods(.*) :: Hyper r -> Hyper r -> Hyper r Source # (TriviallyInvolutive r, Rng r) => LeftModule (Quaternion' r) (Quaternion' r) Source # Methods(.*) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source # (Commutative r, Rng r) => LeftModule (Trig r) (Trig r) Source # Methods(.*) :: Trig r -> Trig r -> Trig r Source # (Monoidal m, Abelian m) => LeftModule (End m) (End m) Source # Methods(.*) :: End m -> End m -> End m Source # Semiring r => LeftModule (Opposite r) (Opposite r) Source # Methods(.*) :: Opposite r -> Opposite r -> Opposite r Source # Rng s => LeftModule (RngRing s) (RngRing s) Source # Methods(.*) :: RngRing s -> RngRing s -> RngRing s Source # Coalgebra r m => LeftModule (Covector r m) (Covector r m) Source # Methods(.*) :: Covector r m -> Covector r m -> Covector r m Source # Coalgebra r m => LeftModule (Map r b m) (Map r b m) Source # Methods(.*) :: Map r b m -> Map r b m -> Map r b m Source #

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

Minimal complete definition

(*.)

Methods

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

Instances

 Source # Methods(*.) :: Int -> Integer -> Int Source # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Additive m => RightModule () m Source # Methods(*.) :: m -> () -> m Source # Semiring r => RightModule r () Source # Methods(*.) :: () -> r -> () Source # Source # Methods Source # Methods(*.) :: Int -> Natural -> Int Source # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods(*.) :: Fraction d -> Integer -> Fraction d Source # Source # Methods(*.) :: Log r -> Integer -> Log r Source # (Abelian r, Group r) => RightModule Integer (RngRing r) Source # Methods(*.) :: RngRing r -> Integer -> RngRing r Source # Source # Methods(*.) :: ZeroRng r -> Integer -> ZeroRng r Source # RightModule r s => RightModule r (Complex s) Source # Methods(*.) :: Complex s -> r -> Complex s Source # RightModule r s => RightModule r (Dual s) Source # Methods(*.) :: Dual s -> r -> Dual s Source # RightModule r s => RightModule r (Hyper' s) Source # Methods(*.) :: Hyper' s -> r -> Hyper' s Source # RightModule r s => RightModule r (Quaternion s) Source # Methods(*.) :: Quaternion s -> r -> Quaternion s Source # RightModule r s => RightModule r (Dual' s) Source # Methods(*.) :: Dual' s -> r -> Dual' s Source # RightModule r s => RightModule r (Hyper s) Source # Methods(*.) :: Hyper s -> r -> Hyper s Source # RightModule r s => RightModule r (Quaternion' s) Source # Methods(*.) :: Quaternion' s -> r -> Quaternion' s Source # RightModule r s => RightModule r (Trig s) Source # Methods(*.) :: Trig s -> r -> Trig s Source # RightModule r m => RightModule r (End m) Source # Methods(*.) :: End m -> r -> End m Source # LeftModule r s => RightModule r (Opposite s) Source # Methods(*.) :: Opposite s -> r -> Opposite s Source # Source # Methods(*.) :: Fraction d -> Natural -> Fraction d Source # Source # Methods Unital r => RightModule Natural (Log r) Source # Methods(*.) :: Log r -> Natural -> Log r Source # (Abelian r, Monoidal r) => RightModule Natural (RngRing r) Source # Methods(*.) :: RngRing r -> Natural -> RngRing r Source # Source # Methods(*.) :: ZeroRng r -> Natural -> ZeroRng r Source # (RightModule r a, RightModule r b) => RightModule r (a, b) Source # Methods(*.) :: (a, b) -> r -> (a, b) Source # RightModule r m => RightModule r (e -> m) Source # Methods(*.) :: (e -> m) -> r -> e -> m Source # RightModule r s => RightModule r (Covector s m) Source # Methods(*.) :: Covector s m -> r -> Covector s m Source # (RightModule r a, RightModule r b, RightModule r c) => RightModule r (a, b, c) Source # Methods(*.) :: (a, b, c) -> r -> (a, b, c) Source # RightModule r s => RightModule r (Map s b m) Source # Methods(*.) :: Map s b m -> r -> Map s b m Source # (RightModule r a, RightModule r b, RightModule r c, RightModule r d) => RightModule r (a, b, c, d) Source # Methods(*.) :: (a, b, c, d) -> r -> (a, b, c, d) Source # (RightModule r a, RightModule r b, RightModule r c, RightModule r d, RightModule r e) => RightModule r (a, b, c, d, e) Source # Methods(*.) :: (a, b, c, d, e) -> r -> (a, b, c, d, e) Source # (Commutative r, Rng r) => RightModule (Complex r) (Complex r) Source # Methods(*.) :: Complex r -> Complex r -> Complex r Source # (Commutative r, Rng r) => RightModule (Dual r) (Dual r) Source # Methods(*.) :: Dual r -> Dual r -> Dual r Source # (Commutative r, Semiring r) => RightModule (Hyper' r) (Hyper' r) Source # Methods(*.) :: Hyper' r -> Hyper' r -> Hyper' r Source # (TriviallyInvolutive r, Rng r) => RightModule (Quaternion r) (Quaternion r) Source # Methods(*.) :: Quaternion r -> Quaternion r -> Quaternion r Source # (Commutative r, Rng r) => RightModule (Dual' r) (Dual' r) Source # Methods(*.) :: Dual' r -> Dual' r -> Dual' r Source # (Commutative r, Semiring r) => RightModule (Hyper r) (Hyper r) Source # Methods(*.) :: Hyper r -> Hyper r -> Hyper r Source # (TriviallyInvolutive r, Rng r) => RightModule (Quaternion' r) (Quaternion' r) Source # Methods(*.) :: Quaternion' r -> Quaternion' r -> Quaternion' r Source # (Commutative r, Rng r) => RightModule (Trig r) (Trig r) Source # Methods(*.) :: Trig r -> Trig r -> Trig r Source # (Monoidal m, Abelian m) => RightModule (End m) (End m) Source # Methods(*.) :: End m -> End m -> End m Source # Semiring r => RightModule (Opposite r) (Opposite r) Source # Methods(*.) :: Opposite r -> Opposite r -> Opposite r Source # Rng s => RightModule (RngRing s) (RngRing s) Source # Methods(*.) :: RngRing s -> RngRing s -> RngRing s Source # Coalgebra r m => RightModule (Covector r m) (Covector r m) Source # Methods(*.) :: Covector r m -> Covector r m -> Covector r m Source # Coalgebra r m => RightModule (Map r b m) (Map r b m) Source # Methods(*.) :: Map r b m -> Map r b m -> Map r b m Source #

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

Instances

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

# Algebras

## associative algebras over (non-commutative) semirings

class Semiring r => Algebra r a where Source #

An associative algebra built with a free module over a semiring

Minimal complete definition

mult

Methods

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

Instances

 Algebra () a Source # Methodsmult :: (a -> a -> ()) -> a -> () Source # Source # Methodsmult :: (IntSet -> IntSet -> r) -> IntSet -> r Source # Semiring r => Algebra r () Source # Methodsmult :: (() -> () -> r) -> () -> r Source # Source # Methodsmult :: (ComplexBasis -> ComplexBasis -> k) -> ComplexBasis -> k Source # Rng k => Algebra k DualBasis Source # Methodsmult :: (DualBasis -> DualBasis -> k) -> DualBasis -> k Source # Source # Methodsmult :: (HyperBasis' -> HyperBasis' -> k) -> HyperBasis' -> k Source # Source # the quaternion algebra Methodsmult :: (QuaternionBasis -> QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodsmult :: (DualBasis' -> DualBasis' -> k) -> DualBasis' -> k Source # Source # the trivial diagonal algebra Methodsmult :: (HyperBasis -> HyperBasis -> k) -> HyperBasis -> k Source # Source # the trivial diagonal algebra Methodsmult :: (QuaternionBasis' -> QuaternionBasis' -> r) -> QuaternionBasis' -> r Source # (Commutative k, Rng k) => Algebra k TrigBasis Source # Methodsmult :: (TrigBasis -> TrigBasis -> k) -> TrigBasis -> k Source # (Semiring r, Ord a) => Algebra r (Set a) Source # Methodsmult :: (Set a -> Set a -> r) -> Set a -> r Source # Semiring r => Algebra r (Seq a) Source # The tensor algebra Methodsmult :: (Seq a -> Seq a -> r) -> Seq a -> r Source # Semiring r => Algebra r [a] Source # The tensor algebra Methodsmult :: ([a] -> [a] -> r) -> [a] -> r Source # (Commutative r, Monoidal r, Semiring r, LocallyFiniteOrder a) => Algebra r (Interval a) Source # Methodsmult :: (Interval a -> Interval a -> r) -> Interval a -> r Source # (Algebra r a, Algebra r b) => Algebra r (a, b) Source # Methodsmult :: ((a, b) -> (a, b) -> r) -> (a, b) -> r Source # (Algebra r a, Algebra r b, Algebra r c) => Algebra r (a, b, c) Source # Methodsmult :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> r Source # (Algebra r a, Algebra r b, Algebra r c, Algebra r d) => Algebra r (a, b, c, d) Source # Methodsmult :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> r Source # (Algebra r a, Algebra r b, Algebra r c, Algebra r d, Algebra r e) => Algebra r (a, b, c, d, e) Source # Methodsmult :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r Source #

class Semiring r => Coalgebra r c where Source #

Minimal complete definition

comult

Methods

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

Instances

 Source # the free commutative band coalgebra over Int Methodscomult :: (IntSet -> r) -> IntSet -> IntSet -> r Source # Semiring r => Coalgebra r () Source # Methodscomult :: (() -> r) -> () -> () -> r Source # Source # Methodscomult :: (ComplexBasis -> k) -> ComplexBasis -> ComplexBasis -> k Source # Source # Methodscomult :: (DualBasis -> k) -> DualBasis -> DualBasis -> k Source # Source # Methodscomult :: (HyperBasis' -> k) -> HyperBasis' -> HyperBasis' -> k Source # Source # the trivial diagonal coalgebra Methodscomult :: (QuaternionBasis -> r) -> QuaternionBasis -> QuaternionBasis -> r Source # Source # Methodscomult :: (DualBasis' -> k) -> DualBasis' -> DualBasis' -> k Source # Source # the hyperbolic trigonometric coalgebra Methodscomult :: (HyperBasis -> k) -> HyperBasis -> HyperBasis -> k Source # Source # dual quaternion comultiplication Methodscomult :: (QuaternionBasis' -> r) -> QuaternionBasis' -> QuaternionBasis' -> r Source # (Commutative k, Rng k) => Coalgebra k TrigBasis Source # Methodscomult :: (TrigBasis -> k) -> TrigBasis -> TrigBasis -> k Source # (Semiring r, Additive b) => Coalgebra r (IntMap b) Source # the free commutative coalgebra over a set and Int Methodscomult :: (IntMap b -> r) -> IntMap b -> IntMap b -> r Source # (Semiring r, Ord a) => Coalgebra r (Set a) Source # the free commutative band coalgebra Methodscomult :: (Set a -> r) -> Set a -> Set a -> r Source # Semiring r => Coalgebra r (Seq a) Source # The tensor Hopf algebra Methodscomult :: (Seq a -> r) -> Seq a -> Seq a -> r Source # Semiring r => Coalgebra r [a] Source # The tensor Hopf algebra Methodscomult :: ([a] -> r) -> [a] -> [a] -> r Source # (Commutative r, Monoidal r, Semiring r, PartialSemigroup a) => Coalgebra r (Morphism a) Source # Methodscomult :: (Morphism a -> r) -> Morphism a -> Morphism a -> r Source # (Eq a, Commutative r, Monoidal r, Semiring r) => Coalgebra r (Interval' a) Source # Methodscomult :: (Interval' a -> r) -> Interval' a -> Interval' a -> r Source # Eigenmetric r m => Coalgebra r (BasisCoblade m) Source # Methodscomult :: (BasisCoblade m -> r) -> BasisCoblade m -> BasisCoblade m -> r Source # (Semiring r, Ord a, Additive b) => Coalgebra r (Map a b) Source # the free commutative coalgebra over a set and a given semigroup Methodscomult :: (Map a b -> r) -> Map a b -> Map a b -> r Source # (Coalgebra r a, Coalgebra r b) => Coalgebra r (a, b) Source # Methodscomult :: ((a, b) -> r) -> (a, b) -> (a, b) -> r Source # Algebra r m => Coalgebra r (m -> r) Source # 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. Methodscomult :: ((m -> r) -> r) -> (m -> r) -> (m -> r) -> r Source # (Coalgebra r a, Coalgebra r b, Coalgebra r c) => Coalgebra r (a, b, c) Source # Methodscomult :: ((a, b, c) -> r) -> (a, b, c) -> (a, b, c) -> r Source # (Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d) => Coalgebra r (a, b, c, d) Source # Methodscomult :: ((a, b, c, d) -> r) -> (a, b, c, d) -> (a, b, c, d) -> r Source # (Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d, Coalgebra r e) => Coalgebra r (a, b, c, d, e) Source # Methodscomult :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> (a, b, c, d, e) -> r Source #

## unital algebras

class Algebra r a => UnitalAlgebra r a where Source #

An associative unital algebra over a semiring, built using a free module

Minimal complete definition

unit

Methods

unit :: r -> a -> r Source #

Instances

 Semiring r => UnitalAlgebra r () Source # Methodsunit :: r -> () -> r Source # Source # Methodsunit :: k -> ComplexBasis -> k Source # Source # Methodsunit :: k -> DualBasis -> k Source # Source # Methodsunit :: k -> HyperBasis' -> k Source # Source # Methodsunit :: r -> QuaternionBasis -> r Source # Source # Methodsunit :: k -> DualBasis' -> k Source # Source # Methodsunit :: k -> HyperBasis -> k Source # Source # Methodsunit :: r -> QuaternionBasis' -> r Source # (Commutative k, Rng k) => UnitalAlgebra k TrigBasis Source # Methodsunit :: k -> TrigBasis -> k Source # (Monoidal r, Semiring r) => UnitalAlgebra r (Seq a) Source # Methodsunit :: r -> Seq a -> r Source # (Monoidal r, Semiring r) => UnitalAlgebra r [a] Source # Methodsunit :: r -> [a] -> r Source # (Commutative r, Monoidal r, Semiring r, LocallyFiniteOrder a) => UnitalAlgebra r (Interval a) Source # Methodsunit :: r -> Interval a -> r Source # (UnitalAlgebra r a, UnitalAlgebra r b) => UnitalAlgebra r (a, b) Source # Methodsunit :: r -> (a, b) -> r Source # (UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c) => UnitalAlgebra r (a, b, c) Source # Methodsunit :: r -> (a, b, c) -> r Source # (UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c, UnitalAlgebra r d) => UnitalAlgebra r (a, b, c, d) Source # Methodsunit :: r -> (a, b, c, d) -> r Source # (UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c, UnitalAlgebra r d, UnitalAlgebra r e) => UnitalAlgebra r (a, b, c, d, e) Source # Methodsunit :: r -> (a, b, c, d, e) -> r Source #

class Coalgebra r c => CounitalCoalgebra r c where Source #

Minimal complete definition

counit

Methods

counit :: (c -> r) -> r Source #

Instances

 Semiring r => CounitalCoalgebra r () Source # Methodscounit :: (() -> r) -> r Source # Source # Methodscounit :: (ComplexBasis -> k) -> k Source # Source # Methodscounit :: (DualBasis -> k) -> k Source # Source # Methodscounit :: (HyperBasis' -> k) -> k Source # Source # Methodscounit :: (QuaternionBasis -> r) -> r Source # Source # Methodscounit :: (DualBasis' -> k) -> k Source # Source # Methodscounit :: (HyperBasis -> k) -> k Source # Source # Methodscounit :: (QuaternionBasis' -> r) -> r Source # Source # Methodscounit :: (TrigBasis -> k) -> k Source # Semiring r => CounitalCoalgebra r (Seq a) Source # Methodscounit :: (Seq a -> r) -> r Source # Semiring r => CounitalCoalgebra r [a] Source # Methodscounit :: ([a] -> r) -> r Source # (Commutative r, Monoidal r, Semiring r, PartialMonoid a) => CounitalCoalgebra r (Morphism a) Source # Methodscounit :: (Morphism a -> r) -> r Source # (Eq a, Bounded a, Commutative r, Monoidal r, Semiring r) => CounitalCoalgebra r (Interval' a) Source # Methodscounit :: (Interval' a -> r) -> r Source # Eigenmetric r m => CounitalCoalgebra r (BasisCoblade m) Source # Methodscounit :: (BasisCoblade m -> r) -> r Source # (CounitalCoalgebra r a, CounitalCoalgebra r b) => CounitalCoalgebra r (a, b) Source # Methodscounit :: ((a, b) -> r) -> r Source # (Unital r, UnitalAlgebra r m) => CounitalCoalgebra r (m -> r) Source # Methodscounit :: ((m -> r) -> r) -> r Source # (CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c) => CounitalCoalgebra r (a, b, c) Source # Methodscounit :: ((a, b, c) -> r) -> r Source # (CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c, CounitalCoalgebra r d) => CounitalCoalgebra r (a, b, c, d) Source # Methodscounit :: ((a, b, c, d) -> r) -> r Source # (CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c, CounitalCoalgebra r d, CounitalCoalgebra r e) => CounitalCoalgebra r (a, b, c, d, e) Source # Methodscounit :: ((a, b, c, d, e) -> r) -> r Source #

class (UnitalAlgebra r a, CounitalCoalgebra r a) => Bialgebra r a Source #

A bialgebra is both a unital algebra and counital coalgebra where the mult and unit are compatible in some sense with the comult and counit. That is to say that mult and unit are a coalgebra homomorphisms or (equivalently) that comult and counit are an algebra homomorphisms.

Instances

 Semiring r => Bialgebra r () Source # Source # Source # Source # Source # Source # Source # Source # (Commutative k, Rng k) => Bialgebra k TrigBasis Source # (Monoidal r, Semiring r) => Bialgebra r (Seq a) Source # (Monoidal r, Semiring r) => Bialgebra r [a] Source # (Bialgebra r a, Bialgebra r b) => Bialgebra r (a, b) Source # (Bialgebra r a, Bialgebra r b, Bialgebra r c) => Bialgebra r (a, b, c) Source # (Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d) => Bialgebra r (a, b, c, d) Source # (Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d, Bialgebra r e) => Bialgebra r (a, b, c, d, e) Source #

## involutive algebras

class (InvolutiveSemiring r, Algebra r a) => InvolutiveAlgebra r a where Source #

Minimal complete definition

inv

Methods

inv :: (a -> r) -> a -> r Source #

Instances

 Source # Methodsinv :: (() -> r) -> () -> r Source # Source # Methodsinv :: (ComplexBasis -> k) -> ComplexBasis -> k Source # Source # Methodsinv :: (DualBasis -> k) -> DualBasis -> k Source # Source # Methodsinv :: (HyperBasis' -> k) -> HyperBasis' -> k Source # Source # Methodsinv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodsinv :: (DualBasis' -> k) -> DualBasis' -> k Source # Source # Methodsinv :: (HyperBasis -> k) -> HyperBasis -> k Source # Source # Methodsinv :: (QuaternionBasis' -> r) -> QuaternionBasis' -> r Source # Source # Methodsinv :: (TrigBasis -> k) -> TrigBasis -> k Source # (InvolutiveAlgebra r a, InvolutiveAlgebra r b) => InvolutiveAlgebra r (a, b) Source # Methodsinv :: ((a, b) -> r) -> (a, b) -> r Source # (InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c) => InvolutiveAlgebra r (a, b, c) Source # Methodsinv :: ((a, b, c) -> r) -> (a, b, c) -> r Source # (InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d) => InvolutiveAlgebra r (a, b, c, d) Source # Methodsinv :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r Source # (InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d, InvolutiveAlgebra r e) => InvolutiveAlgebra r (a, b, c, d, e) Source # Methodsinv :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r Source #

class (InvolutiveSemiring r, Coalgebra r c) => InvolutiveCoalgebra r c where Source #

Minimal complete definition

coinv

Methods

coinv :: (c -> r) -> c -> r Source #

Instances

 Source # Methodscoinv :: (() -> r) -> () -> r Source # Source # Methodscoinv :: (ComplexBasis -> k) -> ComplexBasis -> k Source # Source # Methodscoinv :: (DualBasis -> k) -> DualBasis -> k Source # Source # Methodscoinv :: (HyperBasis' -> k) -> HyperBasis' -> k Source # Source # Methodscoinv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodscoinv :: (DualBasis' -> k) -> DualBasis' -> k Source # Source # Methodscoinv :: (HyperBasis -> k) -> HyperBasis -> k Source # Source # Methodscoinv :: (QuaternionBasis' -> r) -> QuaternionBasis' -> r Source # Source # Methodscoinv :: (TrigBasis -> k) -> TrigBasis -> k Source # (InvolutiveCoalgebra r a, InvolutiveCoalgebra r b) => InvolutiveCoalgebra r (a, b) Source # Methodscoinv :: ((a, b) -> r) -> (a, b) -> r Source # (InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c) => InvolutiveCoalgebra r (a, b, c) Source # Methodscoinv :: ((a, b, c) -> r) -> (a, b, c) -> r Source # (InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d) => InvolutiveCoalgebra r (a, b, c, d) Source # Methodscoinv :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r Source # (InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d, InvolutiveCoalgebra r e) => InvolutiveCoalgebra r (a, b, c, d, e) Source # Methodscoinv :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r Source #

class (Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h Source #

Instances

 (Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h Source #

class (CommutativeAlgebra r a, TriviallyInvolutive r, InvolutiveAlgebra r a) => TriviallyInvolutiveAlgebra r a Source #

Instances

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

Instances

 Source # Source # Source # Source # Source #

Instances

 Source #

## idempotent algebras

class Algebra r a => IdempotentAlgebra r a Source #

Instances

 (Semiring r, Band r) => IdempotentAlgebra r () Source # (Semiring r, Band r) => IdempotentAlgebra r IntSet Source # (Semiring r, Band r, Ord a) => IdempotentAlgebra r (Set a) Source # (IdempotentAlgebra r a, IdempotentAlgebra r b) => IdempotentAlgebra r (a, b) Source # (IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c) => IdempotentAlgebra r (a, b, c) Source # (IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c, IdempotentAlgebra r d) => IdempotentAlgebra r (a, b, c, d) Source # (IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c, IdempotentAlgebra r d, IdempotentAlgebra r e) => IdempotentAlgebra r (a, b, c, d, e) Source #

class (Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h Source #

Instances

 (Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h Source #

## commutative algebras

class Algebra r a => CommutativeAlgebra r a Source #

Instances

 Source # (Commutative r, Semiring r) => CommutativeAlgebra r () Source # (Commutative r, Semiring r, Ord a) => CommutativeAlgebra r (Set a) Source # (CommutativeAlgebra r a, CommutativeAlgebra r b) => CommutativeAlgebra r (a, b) Source # (CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c) => CommutativeAlgebra r (a, b, c) Source # (CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d) => CommutativeAlgebra r (a, b, c, d) Source # (CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d, CommutativeAlgebra r e) => CommutativeAlgebra r (a, b, c, d, e) Source #

class (Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h Source #

Instances

 (Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h Source #

class Coalgebra r c => CocommutativeCoalgebra r c Source #

Instances

 Source # (Commutative r, Semiring r) => CocommutativeCoalgebra r () Source # (Commutative r, Semiring r, Abelian b) => CocommutativeCoalgebra r (IntMap b) Source # (Commutative r, Semiring r, Ord a) => CocommutativeCoalgebra r (Set a) Source # (Commutative r, Semiring r, Ord a, Abelian b) => CocommutativeCoalgebra r (Map a b) Source # (CocommutativeCoalgebra r a, CocommutativeCoalgebra r b) => CocommutativeCoalgebra r (a, b) Source # CommutativeAlgebra r m => CocommutativeCoalgebra r (m -> r) Source # (CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c) => CocommutativeCoalgebra r (a, b, c) Source # (CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d) => CocommutativeCoalgebra r (a, b, c, d) Source # (CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d, CocommutativeCoalgebra r e) => CocommutativeCoalgebra r (a, b, c, d, e) Source #

## division algebras

class UnitalAlgebra r a => DivisionAlgebra r a where Source #

Minimal complete definition

recipriocal

Methods

recipriocal :: (a -> r) -> a -> r Source #

## Hopf alegebras

class Bialgebra r h => HopfAlgebra r h where Source #

A HopfAlgebra algebra on a semiring, where the module is free.

When antipode . antipode = id and antipode is an antihomomorphism then we are an InvolutiveBialgebra with inv = antipode as well

Minimal complete definition

antipode

Methods

antipode :: (h -> r) -> h -> r Source #

Instances

 Source # Methodsantipode :: (ComplexBasis -> k) -> ComplexBasis -> k Source # Source # Methodsantipode :: (DualBasis -> k) -> DualBasis -> k Source # Source # Methodsantipode :: (HyperBasis' -> k) -> HyperBasis' -> k Source # Source # Methodsantipode :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodsantipode :: (DualBasis' -> k) -> DualBasis' -> k Source # Source # Methodsantipode :: (HyperBasis -> k) -> HyperBasis -> k Source # Source # Methodsantipode :: (QuaternionBasis' -> r) -> QuaternionBasis' -> r Source # Source # Methodsantipode :: (TrigBasis -> k) -> TrigBasis -> k Source # (HopfAlgebra r a, HopfAlgebra r b) => HopfAlgebra r (a, b) Source # Methodsantipode :: ((a, b) -> r) -> (a, b) -> r Source # (HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c) => HopfAlgebra r (a, b, c) Source # Methodsantipode :: ((a, b, c) -> r) -> (a, b, c) -> r Source # (HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d) => HopfAlgebra r (a, b, c, d) Source # Methodsantipode :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r Source # (HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d, HopfAlgebra r e) => HopfAlgebra r (a, b, c, d, e) Source # Methodsantipode :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r Source #

# Ring Properties

## Characteristic

class Rig r => Characteristic r where Source #

Minimal complete definition

char

Methods

char :: proxy r -> Natural Source #

Instances

 Source # NB: we're using the boolean semiring, not the boolean ring Methodschar :: proxy Bool -> Natural Source # Source # Methodschar :: proxy Int -> Natural Source # Source # Methodschar :: proxy Int8 -> Natural Source # Source # Methodschar :: proxy Int16 -> Natural Source # Source # Methodschar :: proxy Int32 -> Natural Source # Source # Methodschar :: proxy Int64 -> Natural Source # Source # Methodschar :: proxy Integer -> Natural Source # Source # Methodschar :: proxy Word -> Natural Source # Source # Methodschar :: proxy Word8 -> Natural Source # Source # Methodschar :: proxy Word16 -> Natural Source # Source # Methodschar :: proxy Word32 -> Natural Source # Source # Methodschar :: proxy Word64 -> Natural Source # Source # Methodschar :: proxy () -> Natural Source # Source # Methodschar :: proxy Natural -> Natural Source # Source # Methodschar :: proxy (Fraction d) -> Natural Source # (Characteristic a, Characteristic b) => Characteristic (a, b) Source # Methodschar :: proxy (a, b) -> Natural Source # (Characteristic a, Characteristic b, Characteristic c) => Characteristic (a, b, c) Source # Methodschar :: proxy (a, b, c) -> Natural Source # (Characteristic a, Characteristic b, Characteristic c, Characteristic d) => Characteristic (a, b, c, d) Source # Methodschar :: proxy (a, b, c, d) -> Natural Source # (Characteristic a, Characteristic b, Characteristic c, Characteristic d, Characteristic e) => Characteristic (a, b, c, d, e) Source # Methodschar :: proxy (a, b, c, d, e) -> Natural Source #

charInt :: (Integral s, Bounded s) => proxy s -> Natural Source #

charWord :: (Integral s, Bounded s) => proxy s -> Natural Source #

## Order

class Order a where Source #

Methods

(<~) :: a -> a -> Bool Source #

(<) :: a -> a -> Bool Source #

(>~) :: a -> a -> Bool Source #

(>) :: a -> a -> Bool Source #

(~~) :: a -> a -> Bool Source #

(/~) :: a -> a -> Bool Source #

order :: a -> a -> Maybe Ordering Source #

comparable :: a -> a -> Bool Source #

Instances

 Source # Methods(<~) :: Bool -> Bool -> Bool Source #(<) :: Bool -> Bool -> Bool Source #(>~) :: Bool -> Bool -> Bool Source #(>) :: Bool -> Bool -> Bool Source #(~~) :: Bool -> Bool -> Bool Source #(/~) :: Bool -> Bool -> Bool Source # Source # Methods(<~) :: Int -> Int -> Bool Source #(<) :: Int -> Int -> Bool Source #(>~) :: Int -> Int -> Bool Source #(>) :: Int -> Int -> Bool Source #(~~) :: Int -> Int -> Bool Source #(/~) :: Int -> Int -> Bool Source # Source # Methods(<~) :: Int8 -> Int8 -> Bool Source #(<) :: Int8 -> Int8 -> Bool Source #(>~) :: Int8 -> Int8 -> Bool Source #(>) :: Int8 -> Int8 -> Bool Source #(~~) :: Int8 -> Int8 -> Bool Source #(/~) :: Int8 -> Int8 -> Bool Source # Source # Methods(<) :: Int16 -> Int16 -> Bool Source #(>) :: Int16 -> Int16 -> Bool Source # Source # Methods(<) :: Int32 -> Int32 -> Bool Source #(>) :: Int32 -> Int32 -> Bool Source # Source # Methods(<) :: Int64 -> Int64 -> Bool Source #(>) :: Int64 -> Int64 -> Bool Source # Source # Methods