algebra-3.1: Constructive abstract algebra

Safe Haskell | None

Numeric.Algebra

Contents

- Additive
  - additive semigroups
  - additive Abelian semigroups
  - additive idempotent semigroups
  - partitionable additive semigroups
  - additive monoids
  - additive groups
- Multiplicative
  - multiplicative semigroups
  - commutative multiplicative semigroups
  - multiplicative monoids
  - idempotent multiplicative semigroups
  - multiplicative groups
  - factorable multiplicative semigroups
  - involutive multiplicative semigroups
- Ring-Structures
  - Semirings
  - Rngs
  - Rigs
- Rings
  - Division Rings
- Modules
- Algebras
  - associative algebras over (non-commutative) semirings
  - unital algebras
  - involutive algebras
  - idempotent algebras
  - commutative algebras
  - division algebras
  - Hopf alegebras
- Ring Properties
  - Characteristic
  - Order
- Natural numbers
- Representable Additive
- Representable Monoidal
- Representable Group
- Representable Multiplicative (via Algebra)
- Representable Unital (via UnitalAlgebra)
- Representable Rig (via Algebra)
- Representable Ring (via Algebra)
- Norm
- Covectors
  - Covectors as linear functionals

Synopsis

- class Additive r where
  - (+) :: r -> r -> r
  - sinnum1p :: Whole n => n -> r -> r
  - sumWith1 :: Foldable1 f => (a -> r) -> f a -> r
- sum1 :: (Foldable1 f, Additive r) => f r -> r
- class Additive r => Abelian r
- class Additive r => Idempotent r
- sinnum1pIdempotent :: Natural -> r -> r
- sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r
- class Additive m => Partitionable m where
  - partitionWith :: (m -> m -> r) -> m -> NonEmpty r
- class (LeftModule Natural m, RightModule Natural m) => Monoidal m where
  - zero :: m
  - sinnum :: Whole n => n -> m -> m
  - sumWith :: Foldable f => (a -> m) -> f a -> m
- sum :: (Foldable f, Monoidal m) => f m -> m
- class (LeftModule Integer r, RightModule Integer r, Monoidal r) => Group r where
  - (-) :: r -> r -> r
  - negate :: r -> r
  - subtract :: r -> r -> r
  - times :: Integral n => n -> r -> r
- class Multiplicative r where
  - (*) :: r -> r -> r
  - pow1p :: Whole n => r -> n -> r
  - productWith1 :: Foldable1 f => (a -> r) -> f a -> r
- product1 :: (Foldable1 f, Multiplicative r) => f r -> r
- class Multiplicative r => Commutative r
- class Multiplicative r => Unital r where
  - one :: r
  - pow :: Whole n => r -> n -> r
  - productWith :: Foldable f => (a -> r) -> f a -> r
- product :: (Foldable f, Unital r) => f r -> r
- class Multiplicative r => Band r
- pow1pBand :: Whole n => r -> n -> r
- powBand :: (Unital r, Whole n) => r -> n -> r
- class Unital r => Division r where
  - recip :: r -> r
  - (/) :: r -> r -> r
  - (\\) :: r -> r -> r
  - (^) :: Integral n => r -> n -> r
- class Multiplicative m => Factorable m where
  - factorWith :: (m -> m -> r) -> m -> NonEmpty r
- class Multiplicative r => InvolutiveMultiplication r where
  - adjoint :: r -> r
- class (Commutative r, InvolutiveMultiplication r) => TriviallyInvolutive r
- class (Additive r, Abelian r, Multiplicative r) => Semiring r
- class (Semiring r, InvolutiveMultiplication r) => InvolutiveSemiring r
- class (Semiring r, Idempotent r) => Dioid r
- class (Group r, Semiring r) => Rng r
- class (Semiring r, Unital r, Monoidal r) => Rig r where
  - fromNatural :: Natural -> r
- class (Rig r, Rng r) => Ring r where
  - fromInteger :: Integer -> r
- class Ring r => LocalRing r
- class (Division r, Ring r) => DivisionRing r
- class (Commutative r, DivisionRing r) => Field r
- class (Semiring r, Additive m) => LeftModule r m where
  - (.*) :: r -> m -> m
- class (Semiring r, Additive m) => RightModule r m where
  - (*.) :: m -> r -> m
- class (LeftModule r m, RightModule r m) => Module r m
- class Semiring r => Algebra r a where
  - mult :: (a -> a -> r) -> a -> r
- class Semiring r => Coalgebra r c where
  - comult :: (c -> r) -> c -> c -> r
- class Algebra r a => UnitalAlgebra r a where
  - unit :: r -> a -> r
- class Coalgebra r c => CounitalCoalgebra r c where
  - counit :: (c -> r) -> r
- class (UnitalAlgebra r a, CounitalCoalgebra r a) => Bialgebra r a
- class (InvolutiveSemiring r, Algebra r a) => InvolutiveAlgebra r a where
  - inv :: (a -> r) -> a -> r
- class (InvolutiveSemiring r, Coalgebra r c) => InvolutiveCoalgebra r c where
  - coinv :: (c -> r) -> c -> r
- class (Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h
- class (CommutativeAlgebra r a, TriviallyInvolutive r, InvolutiveAlgebra r a) => TriviallyInvolutiveAlgebra r a
- class (CocommutativeCoalgebra r a, TriviallyInvolutive r, InvolutiveCoalgebra r a) => TriviallyInvolutiveCoalgebra r a
- class (InvolutiveBialgebra r h, TriviallyInvolutiveAlgebra r h, TriviallyInvolutiveCoalgebra r h) => TriviallyInvolutiveBialgebra r h
- class Algebra r a => IdempotentAlgebra r a
- class (Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h
- class Algebra r a => CommutativeAlgebra r a
- class (Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h
- class Coalgebra r c => CocommutativeCoalgebra r c
- class UnitalAlgebra r a => DivisionAlgebra r a where
  - recipriocal :: (a -> r) -> a -> r
- class Bialgebra r h => HopfAlgebra r h where
  - antipode :: (h -> r) -> h -> r
- class Rig r => Characteristic r where
  - char :: proxy r -> Natural
- charInt :: (Integral s, Bounded s) => proxy s -> Natural
- charWord :: (Whole s, Bounded s) => proxy s -> Natural
- class Order a where
  - (<~) :: a -> a -> Bool
  - (<) :: a -> a -> Bool
  - (>~) :: a -> a -> Bool
  - (>) :: a -> a -> Bool
  - (~~) :: a -> a -> Bool
  - (/~) :: a -> a -> Bool
  - order :: a -> a -> Maybe Ordering
  - comparable :: a -> a -> Bool
- class (AdditiveOrder r, Rig r) => OrderedRig r
- class (Additive r, Order r) => AdditiveOrder r
- class Order a => LocallyFiniteOrder a
- class Monoidal r => DecidableZero r
- class Unital r => DecidableUnits r
- class Unital r => DecidableAssociates r
- data Natural
- class Integral n => Whole n where
  - toNatural :: n -> Natural
- addRep :: (Zip m, Additive r) => m r -> m r -> m r
- sinnum1pRep :: (Whole n, Functor m, Additive r) => n -> m r -> m r
- zeroRep :: (Applicative m, Monoidal r) => m r
- sinnumRep :: (Whole n, Functor m, Monoidal r) => n -> m r -> m r
- negateRep :: (Functor m, Group r) => m r -> m r
- minusRep :: (Zip m, Group r) => m r -> m r -> m r
- subtractRep :: (Zip m, Group r) => m r -> m r -> m r
- timesRep :: (Integral n, Functor m, Group r) => n -> m r -> m r
- mulRep :: (Representable m, Algebra r (Key m)) => m r -> m r -> m r
- oneRep :: (Representable m, Unital r, UnitalAlgebra r (Key m)) => m r
- fromNaturalRep :: (UnitalAlgebra r (Key m), Representable m, Rig r) => Natural -> m r
- fromIntegerRep :: (UnitalAlgebra r (Key m), Representable m, Ring r) => Integer -> m r
- class Additive r => Quadrance r m where
  - quadrance :: m -> r
- newtype Covector r a = Covector ((a -> r) -> r)
- counitM :: UnitalAlgebra r a => a -> Covector r ()
- unitM :: CounitalCoalgebra r c => Covector r c
- comultM :: Algebra r a => a -> Covector r (a, a)
- multM :: Coalgebra r c => c -> c -> Covector r c
- invM :: InvolutiveAlgebra r h => h -> Covector r h
- coinvM :: InvolutiveCoalgebra r h => h -> Covector r h
- antipodeM :: HopfAlgebra r h => h -> Covector r h
- convolveM :: (Algebra r c, Coalgebra r a) => (c -> Covector r a) -> (c -> Covector r a) -> c -> Covector r a
- memoM :: HasTrie a => a -> Covector s a

# Additive

## additive semigroups

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

Methods

(+) :: r -> r -> rSource

sinnum1p :: Whole n => n -> r -> rSource

sinnum1p n r = sinnum (1 + n) r

sumWith1 :: Foldable1 f => (a -> r) -> f a -> rSource

Instances

Additive Bool |
Additive Int |
Additive Int8 |
Additive Int16 |
Additive Int32 |
Additive Int64 |
Additive Integer |
Additive Word |
Additive Word8 |
Additive Word16 |
Additive Word32 |
Additive Word64 |
Additive () |
Additive Natural |
Additive Euclidean |
Additive r => Additive (Complex r) |
Additive r => Additive (Quaternion r) |
Additive r => Additive (Dual r) |
Additive r => Additive (Hyper' r) |
Additive r => Additive (Hyper r) |
Additive r => Additive (Dual' r) |
Additive (BasisCoblade m) |
Additive r => Additive (Quaternion' r) |
Additive r => Additive (Trig r) |
Multiplicative r => Additive (Log r) |
Additive r => Additive (End r) |
Additive r => Additive (Opposite r) |
Abelian r => Additive (RngRing r) |
Additive r => Additive (ZeroRng r) |
Additive r => Additive (b -> r) |
(Additive a, Additive b) => Additive (a, b) |
(HasTrie b, Additive r) => Additive (:->: b r) |
Additive r => Additive (Covector r a) |
(Additive a, Additive b, Additive c) => Additive (a, b, c) |
Additive r => Additive (Map r b a) |
(Additive a, Additive b, Additive c, Additive d) => Additive (a, b, c, d) |
(Additive a, Additive b, Additive c, Additive d, Additive e) => Additive (a, b, c, d, e) |

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

## additive Abelian semigroups

class Additive r => Abelian r Source

an additive abelian semigroup

a + b = b + a

Instances

Abelian Bool |
Abelian Int |
Abelian Int8 |
Abelian Int16 |
Abelian Int32 |
Abelian Int64 |
Abelian Integer |
Abelian Word |
Abelian Word8 |
Abelian Word16 |
Abelian Word32 |
Abelian Word64 |
Abelian () |
Abelian Natural |
Abelian Euclidean |
Abelian r => Abelian (Complex r) |
Abelian r => Abelian (Quaternion r) |
Abelian r => Abelian (Dual r) |
Abelian r => Abelian (Hyper' r) |
Abelian r => Abelian (Hyper r) |
Abelian r => Abelian (Dual' r) |
Abelian (BasisCoblade m) |
Abelian r => Abelian (Quaternion' r) |
Abelian r => Abelian (Trig r) |
Commutative r => Abelian (Log r) |
Abelian r => Abelian (End r) |
Abelian r => Abelian (Opposite r) |
Abelian r => Abelian (RngRing r) |
Abelian r => Abelian (ZeroRng r) |
Abelian r => Abelian (e -> r) |
(Abelian a, Abelian b) => Abelian (a, b) |
(HasTrie e, Abelian r) => Abelian (:->: e r) |
Abelian s => Abelian (Covector s a) |
(Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) |
Abelian s => Abelian (Map s b a) |
(Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) |
(Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) |

## additive idempotent semigroups

class Additive r => Idempotent r Source

An additive semigroup with idempotent addition.

     a + a = a

Instances

Idempotent Bool |
Idempotent () |
Idempotent r => Idempotent (Complex r) |
Idempotent r => Idempotent (Quaternion r) |
Idempotent r => Idempotent (Dual r) |
Idempotent r => Idempotent (Hyper' r) |
Idempotent r => Idempotent (Hyper r) |
Idempotent r => Idempotent (Dual' r) |
Idempotent r => Idempotent (Quaternion' r) |
Idempotent r => Idempotent (Trig r) |
Band r => Idempotent (Log r) |
Idempotent r => Idempotent (Opposite r) |
Idempotent r => Idempotent (ZeroRng r) |
Idempotent r => Idempotent (e -> r) |
(Idempotent a, Idempotent b) => Idempotent (a, b) |
(HasTrie e, Idempotent r) => Idempotent (:->: e r) |
Idempotent r => Idempotent (Covector r a) |
(Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) |
(Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) |
(Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) |

sinnum1pIdempotent :: Natural -> r -> rSource

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

## partitionable additive semigroups

class Additive m => Partitionable m where Source

Methods

partitionWith :: (m -> m -> r) -> m -> NonEmpty rSource

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

Instances

Partitionable Bool |
Partitionable () |
Partitionable Natural |
Partitionable r => Partitionable (Complex r) |
Partitionable r => Partitionable (Quaternion r) |
Partitionable r => Partitionable (Dual r) |
Partitionable r => Partitionable (Hyper' r) |
Partitionable r => Partitionable (Hyper r) |
Partitionable r => Partitionable (Dual' r) |
Partitionable r => Partitionable (Quaternion' r) |
Partitionable r => Partitionable (Trig r) |
Factorable r => Partitionable (Log r) |
(Partitionable a, Partitionable b) => Partitionable (a, b) |
(Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) |
(Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) |
(Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) |

## additive monoids

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

An additive monoid

     zero + a = a = a + zero

Methods

zero :: mSource

sinnum :: Whole n => n -> m -> mSource

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

Instances

Monoidal Bool |
Monoidal Int |
Monoidal Int8 |
Monoidal Int16 |
Monoidal Int32 |
Monoidal Int64 |
Monoidal Integer |
Monoidal Word |
Monoidal Word8 |
Monoidal Word16 |
Monoidal Word32 |
Monoidal Word64 |
Monoidal () |
Monoidal Natural |
Monoidal Euclidean |
Monoidal r => Monoidal (Complex r) |
Monoidal r => Monoidal (Quaternion r) |
Monoidal r => Monoidal (Dual r) |
Monoidal r => Monoidal (Hyper' r) |
Monoidal r => Monoidal (Hyper r) |
Monoidal r => Monoidal (Dual' r) |
Monoidal (BasisCoblade m) |
Monoidal r => Monoidal (Quaternion' r) |
Monoidal r => Monoidal (Trig r) |
Unital r => Monoidal (Log r) |
Monoidal r => Monoidal (End r) |
Monoidal r => Monoidal (Opposite r) |
(Abelian r, Monoidal r) => Monoidal (RngRing r) |
Monoidal r => Monoidal (ZeroRng r) |
Monoidal r => Monoidal (e -> r) |
(Monoidal a, Monoidal b) => Monoidal (a, b) |
(HasTrie e, Monoidal r) => Monoidal (:->: e r) |
Monoidal s => Monoidal (Covector s a) |
(Monoidal a, Monoidal b, Monoidal c) => Monoidal (a, b, c) |
Monoidal s => Monoidal (Map s b a) |
(Monoidal a, Monoidal b, Monoidal c, Monoidal d) => Monoidal (a, b, c, d) |
(Monoidal a, Monoidal b, Monoidal c, Monoidal d, Monoidal e) => Monoidal (a, b, c, d, e) |

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

## additive groups

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

Methods

(-) :: r -> r -> rSource

negate :: r -> rSource

subtract :: r -> r -> rSource

times :: Integral n => n -> r -> rSource

Instances

Group Int |
Group Int8 |
Group Int16 |
Group Int32 |
Group Int64 |
Group Integer |
Group Word |
Group Word8 |
Group Word16 |
Group Word32 |
Group Word64 |
Group () |
Group Euclidean |
Group r => Group (Complex r) |
Group r => Group (Quaternion r) |
Group r => Group (Dual r) |
Group r => Group (Hyper' r) |
Group r => Group (Hyper r) |
Group r => Group (Dual' r) |
Group r => Group (Quaternion' r) |
Group r => Group (Trig r) |
Division r => Group (Log r) |
Group r => Group (End r) |
Group r => Group (Opposite r) |
(Abelian r, Group r) => Group (RngRing r) |
Group r => Group (ZeroRng r) |
Group r => Group (e -> r) |
(Group a, Group b) => Group (a, b) |
(HasTrie e, Group r) => Group (:->: e r) |
Group s => Group (Covector s a) |
(Group a, Group b, Group c) => Group (a, b, c) |
Group s => Group (Map s b a) |
(Group a, Group b, Group c, Group d) => Group (a, b, c, d) |
(Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) |

# Multiplicative

## multiplicative semigroups

class Multiplicative r where Source

A multiplicative semigroup

Methods

(*) :: r -> r -> rSource

pow1p :: Whole n => r -> n -> rSource

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

Instances

Multiplicative Bool |
Multiplicative Int |
Multiplicative Int8 |
Multiplicative Int16 |
Multiplicative Int32 |
Multiplicative Int64 |
Multiplicative Integer |
Multiplicative Word |
Multiplicative Word8 |
Multiplicative Word16 |
Multiplicative Word32 |
Multiplicative Word64 |
Multiplicative () |
Multiplicative Natural |
Multiplicative Euclidean |
(Commutative r, Rng r) => Multiplicative (Complex r) |
(TriviallyInvolutive r, Rng r) => Multiplicative (Quaternion r) |
(Commutative r, Rng r) => Multiplicative (Dual r) |
(Commutative k, Semiring k) => Multiplicative (Hyper' k) |
(Commutative k, Semiring k) => Multiplicative (Hyper k) |
(Commutative r, Rng r) => Multiplicative (Dual' r) |
Multiplicative (BasisCoblade m) |
(TriviallyInvolutive r, Semiring r) => Multiplicative (Quaternion' r) |
(Commutative k, Rng k) => Multiplicative (Trig k) |
Additive r => Multiplicative (Exp r) |
Multiplicative (End r) |
Multiplicative r => Multiplicative (Opposite r) |
Rng r => Multiplicative (RngRing r) |
Monoidal r => Multiplicative (ZeroRng r) |
Algebra r a => Multiplicative (a -> r) |
(Multiplicative a, Multiplicative b) => Multiplicative (a, b) |
(HasTrie a, Algebra r a) => Multiplicative (:->: a r) |
Multiplicative (Rect i j) |
Coalgebra r m => Multiplicative (Covector r m) |
(Multiplicative a, Multiplicative b, Multiplicative c) => Multiplicative (a, b, c) |
Coalgebra r m => Multiplicative (Map r b m) |
(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d) => Multiplicative (a, b, c, d) |
(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d, Multiplicative e) => Multiplicative (a, b, c, d, e) |

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

## commutative multiplicative semigroups

class Multiplicative r => Commutative r Source

A commutative multiplicative semigroup

Instances

Commutative Bool |
Commutative Int |
Commutative Int8 |
Commutative Int16 |
Commutative Int32 |
Commutative Int64 |
Commutative Integer |
Commutative Word |
Commutative Word8 |
Commutative Word16 |
Commutative Word32 |
Commutative Word64 |
Commutative () |
Commutative Natural |
Commutative Euclidean |
(TriviallyInvolutive r, Rng r) => Commutative (Complex r) |
(TriviallyInvolutive r, Rng r) => Commutative (Dual r) |
(Commutative k, Semiring k) => Commutative (Hyper' k) |
(Commutative k, Semiring k) => Commutative (Hyper k) |
(TriviallyInvolutive r, Rng r) => Commutative (Dual' r) |
Commutative (BasisCoblade m) |
(Commutative k, Rng k) => Commutative (Trig k) |
Abelian r => Commutative (Exp r) |
(Abelian r, Commutative r) => Commutative (End r) |
Commutative r => Commutative (Opposite r) |
(Commutative r, Rng r) => Commutative (RngRing r) |
Monoidal r => Commutative (ZeroRng r) |
CommutativeAlgebra r a => Commutative (a -> r) |
(Commutative a, Commutative b) => Commutative (a, b) |
(HasTrie a, CommutativeAlgebra r a) => Commutative (:->: a r) |
(Commutative m, Coalgebra r m) => Commutative (Covector r m) |
(Commutative a, Commutative b, Commutative c) => Commutative (a, b, c) |
(Commutative m, Coalgebra r m) => Commutative (Map r b m) |
(Commutative a, Commutative b, Commutative c, Commutative d) => Commutative (a, b, c, d) |
(Commutative a, Commutative b, Commutative c, Commutative d, Commutative e) => Commutative (a, b, c, d, e) |

## multiplicative monoids

class Multiplicative r => Unital r where Source

Methods

one :: rSource

pow :: Whole n => r -> n -> rSource

productWith :: Foldable f => (a -> r) -> f a -> rSource

Instances

Unital Bool |
Unital Int |
Unital Int8 |
Unital Int16 |
Unital Int32 |
Unital Int64 |
Unital Integer |
Unital Word |
Unital Word8 |
Unital Word16 |
Unital Word32 |
Unital Word64 |
Unital () |
Unital Natural |
Unital Euclidean |
(Commutative r, Ring r) => Unital (Complex r) |
(TriviallyInvolutive r, Ring r) => Unital (Quaternion r) |
(Commutative r, Ring r) => Unital (Dual r) |
(Commutative k, Rig k) => Unital (Hyper' k) |
(Commutative k, Rig k) => Unital (Hyper k) |
(Commutative r, Ring r) => Unital (Dual' r) |
Unital (BasisCoblade m) |
(TriviallyInvolutive r, Ring r) => Unital (Quaternion' r) |
(Commutative k, Ring k) => Unital (Trig k) |
Monoidal r => Unital (Exp r) |
Unital (End r) |
Unital r => Unital (Opposite r) |
Rng r => Unital (RngRing r) |
(Unital r, UnitalAlgebra r a) => Unital (a -> r) |
(Unital a, Unital b) => Unital (a, b) |
CounitalCoalgebra r m => Unital (Covector r m) |
(Unital a, Unital b, Unital c) => Unital (a, b, c) |
CounitalCoalgebra r m => Unital (Map r b m) |
(Unital a, Unital b, Unital c, Unital d) => Unital (a, b, c, d) |
(Unital a, Unital b, Unital c, Unital d, Unital e) => Unital (a, b, c, d, e) |

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

## idempotent multiplicative semigroups

class Multiplicative r => Band r Source

An multiplicative semigroup with idempotent multiplication.

     a * a = a

Instances

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

pow1pBand :: Whole n => r -> n -> rSource

powBand :: (Unital r, Whole n) => r -> n -> rSource

## multiplicative groups

class Unital r => Division r where Source

Methods

recip :: r -> rSource

(/) :: r -> r -> rSource

(\\) :: r -> r -> rSource

(^) :: Integral n => r -> n -> rSource

Instances

Division () |
(Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Complex r) |
(TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion r) |
(Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Dual r) |
(Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Hyper' r) |
(Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Dual' r) |
(TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion' r) |
Group r => Division (Exp r) |
Division r => Division (Opposite r) |
(Rng r, Division r) => Division (RngRing r) |
(Unital r, DivisionAlgebra r a) => Division (a -> r) |
(Division a, Division b) => Division (a, b) |
(Division a, Division b, Division c) => Division (a, b, c) |
(Division a, Division b, Division c, Division d) => Division (a, b, c, d) |
(Division a, Division b, Division c, Division d, Division e) => Division (a, b, c, d, e) |

## 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.

Methods

factorWith :: (m -> m -> r) -> m -> NonEmpty rSource

Instances

Factorable Bool |
Factorable () |
Partitionable r => Factorable (Exp r) |
(Factorable a, Factorable b) => Factorable (a, b) |
(Factorable a, Factorable b, Factorable c) => Factorable (a, b, c) |
(Factorable a, Factorable b, Factorable c, Factorable d) => Factorable (a, b, c, d) |
(Factorable a, Factorable b, Factorable c, Factorable d, Factorable e) => Factorable (a, b, c, d, e) |

## involutive multiplicative semigroups

class Multiplicative r => InvolutiveMultiplication r where Source

An semigroup with involution

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

Methods

adjoint :: r -> rSource

Instances

InvolutiveMultiplication Bool |
InvolutiveMultiplication Int |
InvolutiveMultiplication Int8 |
InvolutiveMultiplication Int16 |
InvolutiveMultiplication Int32 |
InvolutiveMultiplication Int64 |
InvolutiveMultiplication Integer |
InvolutiveMultiplication Word |
InvolutiveMultiplication Word8 |
InvolutiveMultiplication Word16 |
InvolutiveMultiplication Word32 |
InvolutiveMultiplication Word64 |
InvolutiveMultiplication () |
InvolutiveMultiplication Natural |
InvolutiveMultiplication Euclidean |
(Commutative r, Rng r, InvolutiveMultiplication r) => InvolutiveMultiplication (Complex r) |
(TriviallyInvolutive r, Rng r) => InvolutiveMultiplication (Quaternion r) |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveMultiplication (Dual r) |
(Commutative r, InvolutiveSemiring r, Rng r) => InvolutiveMultiplication (Hyper' r) |
(Commutative r, Group r, InvolutiveSemiring r) => InvolutiveMultiplication (Hyper r) |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveMultiplication (Dual' r) |
(TriviallyInvolutive r, Rng r) => InvolutiveMultiplication (Quaternion' r) |
(Commutative r, Rng r, InvolutiveMultiplication r) => InvolutiveMultiplication (Trig r) |
InvolutiveAlgebra r h => InvolutiveMultiplication (h -> r) |
(InvolutiveMultiplication a, InvolutiveMultiplication b) => InvolutiveMultiplication (a, b) |
(HasTrie h, InvolutiveAlgebra r h) => InvolutiveMultiplication (:->: h r) |
(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c) => InvolutiveMultiplication (a, b, c) |
(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c, InvolutiveMultiplication d) => InvolutiveMultiplication (a, b, c, d) |
(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c, InvolutiveMultiplication d, InvolutiveMultiplication e) => InvolutiveMultiplication (a, b, c, d, e) |

class (Commutative r, InvolutiveMultiplication r) => TriviallyInvolutive r Source

     adjoint = id

Instances

TriviallyInvolutive Bool |
TriviallyInvolutive Int |
TriviallyInvolutive Int8 |
TriviallyInvolutive Int16 |
TriviallyInvolutive Int32 |
TriviallyInvolutive Int64 |
TriviallyInvolutive Integer |
TriviallyInvolutive Word |
TriviallyInvolutive Word8 |
TriviallyInvolutive Word16 |
TriviallyInvolutive Word32 |
TriviallyInvolutive Word64 |
TriviallyInvolutive () |
TriviallyInvolutive Natural |
TriviallyInvolutive Euclidean |
(TriviallyInvolutive r, TriviallyInvolutiveAlgebra r a) => TriviallyInvolutive (a -> r) |
(TriviallyInvolutive a, TriviallyInvolutive b) => TriviallyInvolutive (a, b) |
(HasTrie a, TriviallyInvolutive r, TriviallyInvolutiveAlgebra r a) => TriviallyInvolutive (:->: a r) |
(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c) => TriviallyInvolutive (a, b, c) |
(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d) => TriviallyInvolutive (a, b, c, d) |
(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d, TriviallyInvolutive e) => TriviallyInvolutive (a, b, c, d, e) |

# 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

Semiring Bool |
Semiring Int |
Semiring Int8 |
Semiring Int16 |
Semiring Int32 |
Semiring Int64 |
Semiring Integer |
Semiring Word |
Semiring Word8 |
Semiring Word16 |
Semiring Word32 |
Semiring Word64 |
Semiring () |
Semiring Natural |
Semiring Euclidean |
(Commutative r, Rng r) => Semiring (Complex r) |
(TriviallyInvolutive r, Rng r) => Semiring (Quaternion r) |
(Commutative r, Rng r) => Semiring (Dual r) |
(Commutative k, Semiring k) => Semiring (Hyper' k) |
(Commutative k, Semiring k) => Semiring (Hyper k) |
(Commutative r, Rng r) => Semiring (Dual' r) |
Semiring (BasisCoblade m) |
(TriviallyInvolutive r, Semiring r) => Semiring (Quaternion' r) |
(Commutative k, Rng k) => Semiring (Trig k) |
(Abelian r, Monoidal r) => Semiring (End r) |
Semiring r => Semiring (Opposite r) |
Rng r => Semiring (RngRing r) |
(Monoidal r, Abelian r) => Semiring (ZeroRng r) |
Algebra r a => Semiring (a -> r) |
(Semiring a, Semiring b) => Semiring (a, b) |
(HasTrie a, Algebra r a) => Semiring (:->: a r) |
Coalgebra r m => Semiring (Covector r m) |
(Semiring a, Semiring b, Semiring c) => Semiring (a, b, c) |
Coalgebra r m => Semiring (Map r b m) |
(Semiring a, Semiring b, Semiring c, Semiring d) => Semiring (a, b, c, d) |
(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e) => Semiring (a, b, c, d, e) |

class (Semiring r, InvolutiveMultiplication r) => InvolutiveSemiring r Source

adjoint (x + y) = adjoint x + adjoint y

Instances

InvolutiveSemiring Bool |
InvolutiveSemiring Int |
InvolutiveSemiring Int8 |
InvolutiveSemiring Int16 |
InvolutiveSemiring Int32 |
InvolutiveSemiring Int64 |
InvolutiveSemiring Integer |
InvolutiveSemiring Word |
InvolutiveSemiring Word8 |
InvolutiveSemiring Word16 |
InvolutiveSemiring Word32 |
InvolutiveSemiring Word64 |
InvolutiveSemiring () |
InvolutiveSemiring Natural |
InvolutiveSemiring Euclidean |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveSemiring (Complex r) |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveSemiring (Dual r) |
(Commutative r, InvolutiveSemiring r, Rng r) => InvolutiveSemiring (Hyper' r) |
(Commutative r, Group r, InvolutiveSemiring r) => InvolutiveSemiring (Hyper r) |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveSemiring (Dual' r) |
(Commutative r, Rng r, InvolutiveSemiring r) => InvolutiveSemiring (Trig r) |
(InvolutiveSemiring a, InvolutiveSemiring b) => InvolutiveSemiring (a, b) |
(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c) => InvolutiveSemiring (a, b, c) |
(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d) => InvolutiveSemiring (a, b, c, d) |
(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d, InvolutiveSemiring e) => InvolutiveSemiring (a, b, c, d, e) |

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

Instances

(Semiring r, Idempotent r) => Dioid r |

## Rngs

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

A Ring without an identity.

Instances

(Group r, Semiring r) => Rng r |
(Group r, Abelian r) => Rng (ZeroRng r) |

## Rigs

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

A Ring without (n)egation

Methods

fromNatural :: Natural -> rSource

Instances

Rig Bool |
Rig Int |
Rig Int8 |
Rig Int16 |
Rig Int32 |
Rig Int64 |
Rig Integer |
Rig Word |
Rig Word8 |
Rig Word16 |
Rig Word32 |
Rig Word64 |
Rig () |
Rig Natural |
Rig Euclidean |
(Commutative r, Ring r) => Rig (Complex r) |
(TriviallyInvolutive r, Ring r) => Rig (Quaternion r) |
(Commutative r, Ring r) => Rig (Dual r) |
(Commutative r, Rig r) => Rig (Hyper' r) |
(Commutative r, Rig r) => Rig (Hyper r) |
(Commutative r, Ring r) => Rig (Dual' r) |
Rig (BasisCoblade m) |
(TriviallyInvolutive r, Ring r) => Rig (Quaternion' r) |
(Commutative r, Ring r) => Rig (Trig r) |
(Abelian r, Monoidal r) => Rig (End r) |
Rig r => Rig (Opposite r) |
Rng r => Rig (RngRing r) |
(Rig a, Rig b) => Rig (a, b) |
(Rig r, CounitalCoalgebra r m) => Rig (Covector r m) |
(Rig a, Rig b, Rig c) => Rig (a, b, c) |
(Rig r, CounitalCoalgebra r m) => Rig (Map r b m) |
(Rig a, Rig b, Rig c, Rig d) => Rig (a, b, c, d) |
(Rig a, Rig b, Rig c, Rig d, Rig e) => Rig (a, b, c, d, e) |

# Rings

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

Methods

fromInteger :: Integer -> rSource

Instances

Ring Int |
Ring Int8 |
Ring Int16 |
Ring Int32 |
Ring Int64 |
Ring Integer |
Ring Word |
Ring Word8 |
Ring Word16 |
Ring Word32 |
Ring Word64 |
Ring () |
Ring Euclidean |
(Commutative r, Ring r) => Ring (Complex r) |
(TriviallyInvolutive r, Ring r) => Ring (Quaternion r) |
(Commutative r, Ring r) => Ring (Dual r) |
(Commutative r, Ring r) => Ring (Hyper' r) |
(Commutative r, Ring r) => Ring (Hyper r) |
(Commutative r, Ring r) => Ring (Dual' r) |
(TriviallyInvolutive r, Ring r) => Ring (Quaternion' r) |
(Commutative r, Ring r) => Ring (Trig r) |
(Abelian r, Group r) => Ring (End r) |
Ring r => Ring (Opposite r) |
Rng r => Ring (RngRing r) |
(Ring a, Ring b) => Ring (a, b) |
(Ring r, CounitalCoalgebra r m) => Ring (Covector r m) |
(Ring a, Ring b, Ring c) => Ring (a, b, c) |
(Ring r, CounitalCoalgebra r m) => Ring (Map r a m) |
(Ring a, Ring b, Ring c, Ring d) => Ring (a, b, c, d) |
(Ring a, Ring b, Ring c, Ring d, Ring e) => Ring (a, b, c, d, e) |

## Division Rings

class Ring r => LocalRing r Source

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

Instances

(Division r, Ring r) => DivisionRing r |

class (Commutative r, DivisionRing r) => Field r Source

Instances

(Commutative r, DivisionRing r) => Field r |

# Modules

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

Methods

(.*) :: r -> m -> mSource

Instances

LeftModule Integer Int |
LeftModule Integer Int8 |
LeftModule Integer Int16 |
LeftModule Integer Int32 |
LeftModule Integer Int64 |
LeftModule Integer Integer |
LeftModule Integer Word |
LeftModule Integer Word8 |
LeftModule Integer Word16 |
LeftModule Integer Word32 |
LeftModule Integer Word64 |
LeftModule Integer Euclidean |
Additive m => LeftModule () m |
Semiring r => LeftModule r () |
LeftModule Natural Bool |
LeftModule Natural Int |
LeftModule Natural Int8 |
LeftModule Natural Int16 |
LeftModule Natural Int32 |
LeftModule Natural Int64 |
LeftModule Natural Integer |
LeftModule Natural Word |
LeftModule Natural Word8 |
LeftModule Natural Word16 |
LeftModule Natural Word32 |
LeftModule Natural Word64 |
LeftModule Natural Natural |
LeftModule Natural Euclidean |
Division r => LeftModule Integer (Log r) |
(Abelian r, Group r) => LeftModule Integer (RngRing r) |
Group r => LeftModule Integer (ZeroRng r) |
LeftModule r s => LeftModule r (Complex s) |
LeftModule r s => LeftModule r (Quaternion s) |
LeftModule r s => LeftModule r (Dual s) |
LeftModule r s => LeftModule r (Hyper' s) |
LeftModule r s => LeftModule r (Hyper s) |
LeftModule r s => LeftModule r (Dual' s) |
LeftModule r s => LeftModule r (Quaternion' s) |
LeftModule r s => LeftModule r (Trig s) |
LeftModule r m => LeftModule r (End m) |
RightModule r s => LeftModule r (Opposite s) |
LeftModule Natural (BasisCoblade m) |
Unital r => LeftModule Natural (Log r) |
(Abelian r, Monoidal r) => LeftModule Natural (RngRing r) |
Monoidal r => LeftModule Natural (ZeroRng r) |
(LeftModule r a, LeftModule r b) => LeftModule r (a, b) |
(HasTrie e, LeftModule r m) => LeftModule r (:->: e m) |
LeftModule r m => LeftModule r (e -> m) |
LeftModule r s => LeftModule r (Covector s m) |
(LeftModule r a, LeftModule r b, LeftModule r c) => LeftModule r (a, b, c) |
LeftModule r s => LeftModule r (Map s b m) |
(LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d) => LeftModule r (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) |
(Commutative r, Rng r) => LeftModule (Complex r) (Complex r) |
(TriviallyInvolutive r, Rng r) => LeftModule (Quaternion r) (Quaternion r) |
(Commutative r, Rng r) => LeftModule (Dual r) (Dual r) |
(Commutative r, Semiring r) => LeftModule (Hyper' r) (Hyper' r) |
(Commutative r, Semiring r) => LeftModule (Hyper r) (Hyper r) |
(Commutative r, Rng r) => LeftModule (Dual' r) (Dual' r) |
(TriviallyInvolutive r, Rng r) => LeftModule (Quaternion' r) (Quaternion' r) |
(Commutative r, Rng r) => LeftModule (Trig r) (Trig r) |
(Monoidal m, Abelian m) => LeftModule (End m) (End m) |
Semiring r => LeftModule (Opposite r) (Opposite r) |
Rng s => LeftModule (RngRing s) (RngRing s) |
Coalgebra r m => LeftModule (Covector r m) (Covector r m) |
Coalgebra r m => LeftModule (Map r b m) (Map r b m) |

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

Methods

(*.) :: m -> r -> mSource

Instances

RightModule Integer Int |
RightModule Integer Int8 |
RightModule Integer Int16 |
RightModule Integer Int32 |
RightModule Integer Int64 |
RightModule Integer Integer |
RightModule Integer Word |
RightModule Integer Word8 |
RightModule Integer Word16 |
RightModule Integer Word32 |
RightModule Integer Word64 |
RightModule Integer Euclidean |
Additive m => RightModule () m |
Semiring r => RightModule r () |
RightModule Natural Bool |
RightModule Natural Int |
RightModule Natural Int8 |
RightModule Natural Int16 |
RightModule Natural Int32 |
RightModule Natural Int64 |
RightModule Natural Integer |
RightModule Natural Word |
RightModule Natural Word8 |
RightModule Natural Word16 |
RightModule Natural Word32 |
RightModule Natural Word64 |
RightModule Natural Natural |
RightModule Natural Euclidean |
Division r => RightModule Integer (Log r) |
(Abelian r, Group r) => RightModule Integer (RngRing r) |
Group r => RightModule Integer (ZeroRng r) |
RightModule r s => RightModule r (Complex s) |
RightModule r s => RightModule r (Quaternion s) |
RightModule r s => RightModule r (Dual s) |
RightModule r s => RightModule r (Hyper' s) |
RightModule r s => RightModule r (Hyper s) |
RightModule r s => RightModule r (Dual' s) |
RightModule r s => RightModule r (Quaternion' s) |
RightModule r s => RightModule r (Trig s) |
RightModule r m => RightModule r (End m) |
LeftModule r s => RightModule r (Opposite s) |
RightModule Natural (BasisCoblade m) |
Unital r => RightModule Natural (Log r) |
(Abelian r, Monoidal r) => RightModule Natural (RngRing r) |
Monoidal r => RightModule Natural (ZeroRng r) |
(RightModule r a, RightModule r b) => RightModule r (a, b) |
(HasTrie e, RightModule r m) => RightModule r (:->: e m) |
RightModule r m => RightModule r (e -> m) |
RightModule r s => RightModule r (Covector s m) |
(RightModule r a, RightModule r b, RightModule r c) => RightModule r (a, b, c) |
RightModule r s => RightModule r (Map s b m) |
(RightModule r a, RightModule r b, RightModule r c, RightModule r d) => RightModule 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) |
(Commutative r, Rng r) => RightModule (Complex r) (Complex r) |
(TriviallyInvolutive r, Rng r) => RightModule (Quaternion r) (Quaternion r) |
(Commutative r, Rng r) => RightModule (Dual r) (Dual r) |
(Commutative r, Semiring r) => RightModule (Hyper' r) (Hyper' r) |
(Commutative r, Semiring r) => RightModule (Hyper r) (Hyper r) |
(Commutative r, Rng r) => RightModule (Dual' r) (Dual' r) |
(TriviallyInvolutive r, Rng r) => RightModule (Quaternion' r) (Quaternion' r) |
(Commutative r, Rng r) => RightModule (Trig r) (Trig r) |
(Monoidal m, Abelian m) => RightModule (End m) (End m) |
Semiring r => RightModule (Opposite r) (Opposite r) |
Rng s => RightModule (RngRing s) (RngRing s) |
Coalgebra r m => RightModule (Covector r m) (Covector r m) |
Coalgebra r m => RightModule (Map r b m) (Map r b m) |

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

Instances

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

# 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

Methods

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

Instances

Algebra () a |
Semiring r => Algebra r IntSet |
Semiring r => Algebra r () |
Rng k => Algebra k ComplexBasis |
(TriviallyInvolutive r, Rng r) => Algebra r QuaternionBasis | the quaternion algebra
Rng k => Algebra k DualBasis |
(Commutative k, Semiring k) => Algebra k HyperBasis' |
Semiring k => Algebra k HyperBasis | the trivial diagonal algebra
Semiring k => Algebra k DualBasis' |
(TriviallyInvolutive r, Semiring r) => Algebra r QuaternionBasis' | the trivial diagonal algebra
(Commutative k, Rng k) => Algebra k TrigBasis |
(Semiring r, Monoidal r, Partitionable a) => Algebra r (IntMap a) |
(Semiring r, Ord a) => Algebra r (Set a) |
Semiring r => Algebra r (Seq a) | The tensor algebra
Semiring r => Algebra r [a] | The tensor algebra
(Commutative r, Monoidal r, Semiring r, LocallyFiniteOrder a) => Algebra r (Interval a) |
(Algebra r a, Algebra r b) => Algebra r (a, b) |
(Semiring r, Monoidal r, Ord a, Partitionable b) => Algebra r (Map a b) |
(Algebra r a, Algebra r b, Algebra r c) => Algebra r (a, b, c) |
(Algebra r a, Algebra r b, Algebra r c, Algebra r d) => Algebra r (a, b, c, d) |
(Algebra r a, Algebra r b, Algebra r c, Algebra r d, Algebra r e) => Algebra r (a, b, c, d, e) |

class Semiring r => Coalgebra r c where Source

Methods

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

Instances

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

## unital algebras

class Algebra r a => UnitalAlgebra r a where Source

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

Methods

unit :: r -> a -> rSource

Instances

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

class Coalgebra r c => CounitalCoalgebra r c where Source

Methods

counit :: (c -> r) -> rSource

Instances

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

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 () |
Rng k => Bialgebra k ComplexBasis |
(TriviallyInvolutive r, Rng r) => Bialgebra r QuaternionBasis |
Rng k => Bialgebra k DualBasis |
(Commutative k, Monoidal k, Semiring k) => Bialgebra k HyperBasis' |
(Commutative k, Semiring k) => Bialgebra k HyperBasis |
Rng k => Bialgebra k DualBasis' |
(TriviallyInvolutive r, Rng r) => Bialgebra r QuaternionBasis' |
(Commutative k, Rng k) => Bialgebra k TrigBasis |
(Monoidal r, Semiring r) => Bialgebra r (Seq a) |
(Monoidal r, Semiring r) => Bialgebra r [a] |
(Bialgebra r a, Bialgebra r b) => Bialgebra r (a, b) |
(Bialgebra r a, Bialgebra r b, Bialgebra r c) => Bialgebra r (a, b, c) |
(Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d) => Bialgebra r (a, b, c, d) |
(Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d, Bialgebra r e) => Bialgebra r (a, b, c, d, e) |

## involutive algebras

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

Methods

inv :: (a -> r) -> a -> rSource

Instances

InvolutiveSemiring r => InvolutiveAlgebra r () |
(InvolutiveSemiring k, Rng k) => InvolutiveAlgebra k ComplexBasis |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveAlgebra r QuaternionBasis |
(InvolutiveSemiring k, Rng k) => InvolutiveAlgebra k DualBasis |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveAlgebra k HyperBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveAlgebra k HyperBasis |
(InvolutiveSemiring k, Rng k) => InvolutiveAlgebra k DualBasis' |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveAlgebra r QuaternionBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveAlgebra k TrigBasis |
(InvolutiveAlgebra r a, InvolutiveAlgebra r b) => InvolutiveAlgebra r (a, b) |
(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c) => InvolutiveAlgebra r (a, b, c) |
(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d) => InvolutiveAlgebra r (a, b, c, d) |
(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d, InvolutiveAlgebra r e) => InvolutiveAlgebra r (a, b, c, d, e) |

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

Methods

coinv :: (c -> r) -> c -> rSource

Instances

InvolutiveSemiring r => InvolutiveCoalgebra r () |
(InvolutiveSemiring k, Rng k) => InvolutiveCoalgebra k ComplexBasis |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveCoalgebra r QuaternionBasis |
(InvolutiveSemiring k, Rng k) => InvolutiveCoalgebra k DualBasis |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveCoalgebra k HyperBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveCoalgebra k HyperBasis |
(InvolutiveSemiring k, Rng k) => InvolutiveCoalgebra k DualBasis' |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => InvolutiveCoalgebra r QuaternionBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => InvolutiveCoalgebra k TrigBasis |
(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b) => InvolutiveCoalgebra r (a, b) |
(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c) => InvolutiveCoalgebra r (a, b, c) |
(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d) => InvolutiveCoalgebra r (a, b, c, d) |
(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d, InvolutiveCoalgebra r e) => InvolutiveCoalgebra r (a, b, c, d, e) |

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 |

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

Instances

(TriviallyInvolutive r, InvolutiveSemiring r) => TriviallyInvolutiveAlgebra r () |
(TriviallyInvolutiveAlgebra r a, TriviallyInvolutiveAlgebra r b) => TriviallyInvolutiveAlgebra r (a, b) |
(TriviallyInvolutiveAlgebra r a, TriviallyInvolutiveAlgebra r b, TriviallyInvolutiveAlgebra r c) => TriviallyInvolutiveAlgebra r (a, b, c) |
(TriviallyInvolutiveAlgebra r a, TriviallyInvolutiveAlgebra r b, TriviallyInvolutiveAlgebra r c, TriviallyInvolutiveAlgebra r d) => TriviallyInvolutiveAlgebra r (a, b, c, d) |
(TriviallyInvolutiveAlgebra r a, TriviallyInvolutiveAlgebra r b, TriviallyInvolutiveAlgebra r c, TriviallyInvolutiveAlgebra r d, TriviallyInvolutiveAlgebra r e) => TriviallyInvolutiveAlgebra r (a, b, c, d, e) |

class (CocommutativeCoalgebra r a, TriviallyInvolutive r, InvolutiveCoalgebra r a) => TriviallyInvolutiveCoalgebra r a Source

Instances

(TriviallyInvolutive r, InvolutiveSemiring r) => TriviallyInvolutiveCoalgebra r () |
(TriviallyInvolutiveCoalgebra r a, TriviallyInvolutiveCoalgebra r b) => TriviallyInvolutiveCoalgebra r (a, b) |
(TriviallyInvolutiveCoalgebra r a, TriviallyInvolutiveCoalgebra r b, TriviallyInvolutiveCoalgebra r c) => TriviallyInvolutiveCoalgebra r (a, b, c) |
(TriviallyInvolutiveCoalgebra r a, TriviallyInvolutiveCoalgebra r b, TriviallyInvolutiveCoalgebra r c, TriviallyInvolutiveCoalgebra r d) => TriviallyInvolutiveCoalgebra r (a, b, c, d) |
(TriviallyInvolutiveCoalgebra r a, TriviallyInvolutiveCoalgebra r b, TriviallyInvolutiveCoalgebra r c, TriviallyInvolutiveCoalgebra r d, TriviallyInvolutiveCoalgebra r e) => TriviallyInvolutiveCoalgebra r (a, b, c, d, e) |

class (InvolutiveBialgebra r h, TriviallyInvolutiveAlgebra r h, TriviallyInvolutiveCoalgebra r h) => TriviallyInvolutiveBialgebra r h Source

Instances

(InvolutiveBialgebra r h, TriviallyInvolutiveAlgebra r h, TriviallyInvolutiveCoalgebra r h) => TriviallyInvolutiveBialgebra r h |

## idempotent algebras

class Algebra r a => IdempotentAlgebra r a Source

Instances

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

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 |

## commutative algebras

class Algebra r a => CommutativeAlgebra r a Source

Instances

(Commutative r, Semiring r) => CommutativeAlgebra r IntSet |
(Commutative r, Semiring r) => CommutativeAlgebra r () |
(Commutative r, Monoidal r, Semiring r, Abelian b, Partitionable b) => CommutativeAlgebra r (IntMap b) |
(Commutative r, Semiring r, Ord a) => CommutativeAlgebra r (Set a) |
(Commutative r, Monoidal r, Semiring r, Ord a, Abelian b, Partitionable b) => CommutativeAlgebra r (Map a b) |
(CommutativeAlgebra r a, CommutativeAlgebra r b) => CommutativeAlgebra r (a, b) |
(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c) => CommutativeAlgebra r (a, b, c) |
(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d) => CommutativeAlgebra r (a, b, c, d) |
(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d, CommutativeAlgebra r e) => CommutativeAlgebra r (a, b, c, d, e) |

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 |

class Coalgebra r c => CocommutativeCoalgebra r c Source

Instances

(Commutative r, Semiring r) => CocommutativeCoalgebra r IntSet |
(Commutative r, Semiring r) => CocommutativeCoalgebra r () |
(Commutative r, Semiring r, Abelian b) => CocommutativeCoalgebra r (IntMap b) |
(Commutative r, Semiring r, Ord a) => CocommutativeCoalgebra r (Set a) |
(Commutative r, Semiring r, Ord a, Abelian b) => CocommutativeCoalgebra r (Map a b) |
(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b) => CocommutativeCoalgebra r (a, b) |
(HasTrie m, CommutativeAlgebra r m) => CocommutativeCoalgebra r (:->: m r) |
CommutativeAlgebra r m => CocommutativeCoalgebra r (m -> r) |
(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c) => CocommutativeCoalgebra r (a, b, c) |
(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d) => CocommutativeCoalgebra r (a, b, c, d) |
(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d, CocommutativeCoalgebra r e) => CocommutativeCoalgebra r (a, b, c, d, e) |

## division algebras

class UnitalAlgebra r a => DivisionAlgebra r a where Source

Methods

recipriocal :: (a -> r) -> a -> rSource

## 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

Methods

antipode :: (h -> r) -> h -> rSource

Instances

(InvolutiveSemiring k, Rng k) => HopfAlgebra k ComplexBasis |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => HopfAlgebra r QuaternionBasis |
(InvolutiveSemiring k, Rng k) => HopfAlgebra k DualBasis |
(Commutative k, Group k, InvolutiveSemiring k) => HopfAlgebra k HyperBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => HopfAlgebra k HyperBasis |
(InvolutiveSemiring k, Rng k) => HopfAlgebra k DualBasis' |
(TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => HopfAlgebra r QuaternionBasis' |
(Commutative k, Group k, InvolutiveSemiring k) => HopfAlgebra k TrigBasis |
(HopfAlgebra r a, HopfAlgebra r b) => HopfAlgebra r (a, b) |
(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c) => HopfAlgebra r (a, b, c) |
(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d) => HopfAlgebra r (a, b, c, d) |
(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d, HopfAlgebra r e) => HopfAlgebra r (a, b, c, d, e) |

# Ring Properties

## Characteristic

class Rig r => Characteristic r where Source

Methods

char :: proxy r -> Natural Source

Instances

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

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

charWord :: (Whole 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

Order Bool |
Order Int |
Order Int8 |
Order Int16 |
Order Int32 |
Order Int64 |
Order Integer |
Order Word |
Order Word8 |
Order Word16 |
Order Word32 |
Order Word64 |
Order () |
Order Natural |
Ord a => Order (Set a) |
(Order a, Order b) => Order (a, b) |
(Order a, Order b, Order c) => Order (a, b, c) |
(Order a, Order b, Order c, Order d) => Order (a, b, c, d) |
(Order a, Order b, Order c, Order d, Order e) => Order (a, b, c, d, e) |

class (AdditiveOrder r, Rig r) => OrderedRig r Source

Instances

OrderedRig Bool |
OrderedRig Integer |
OrderedRig () |
OrderedRig Natural |
(OrderedRig a, OrderedRig b) => OrderedRig (a, b) |
(OrderedRig a, OrderedRig b, OrderedRig c) => OrderedRig (a, b, c) |
(OrderedRig a, OrderedRig b, OrderedRig c, OrderedRig d) => OrderedRig (a, b, c, d) |
(OrderedRig a, OrderedRig b, OrderedRig c, OrderedRig d, OrderedRig e) => OrderedRig (a, b, c, d, e) |

class (Additive r, Order r) => AdditiveOrder r Source

z + x <= z + y = x <= y = x + z <= y + z

Instances

AdditiveOrder Bool |
AdditiveOrder Integer |
AdditiveOrder () |
AdditiveOrder Natural |
(AdditiveOrder a, AdditiveOrder b) => AdditiveOrder (a, b) |
(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c) => AdditiveOrder (a, b, c) |
(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c, AdditiveOrder d) => AdditiveOrder (a, b, c, d) |
(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c, AdditiveOrder d, AdditiveOrder e) => AdditiveOrder (a, b, c, d, e) |

class Order a => LocallyFiniteOrder a Source

Instances

LocallyFiniteOrder Bool |
LocallyFiniteOrder Int |
LocallyFiniteOrder Int8 |
LocallyFiniteOrder Int16 |
LocallyFiniteOrder Int32 |
LocallyFiniteOrder Int64 |
LocallyFiniteOrder Integer |
LocallyFiniteOrder Word |
LocallyFiniteOrder Word8 |
LocallyFiniteOrder Word16 |
LocallyFiniteOrder Word32 |
LocallyFiniteOrder Word64 |
LocallyFiniteOrder () |
LocallyFiniteOrder Natural |
Ord a => LocallyFiniteOrder (Set a) |
(LocallyFiniteOrder a, LocallyFiniteOrder b) => LocallyFiniteOrder (a, b) |
(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c) => LocallyFiniteOrder (a, b, c) |
(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c, LocallyFiniteOrder d) => LocallyFiniteOrder (a, b, c, d) |
(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c, LocallyFiniteOrder d, LocallyFiniteOrder e) => LocallyFiniteOrder (a, b, c, d, e) |

class Monoidal r => DecidableZero r Source

Instances

DecidableZero Bool |
DecidableZero Int |
DecidableZero Int8 |
DecidableZero Int16 |
DecidableZero Int32 |
DecidableZero Int64 |
DecidableZero Integer |
DecidableZero Word |
DecidableZero Word8 |
DecidableZero Word16 |
DecidableZero Word32 |
DecidableZero Word64 |
DecidableZero () |
DecidableZero Natural |
DecidableZero (BasisCoblade m) |
DecidableZero r => DecidableZero (Opposite r) |
(DecidableZero a, DecidableZero b) => DecidableZero (a, b) |
(DecidableZero a, DecidableZero b, DecidableZero c) => DecidableZero (a, b, c) |
(DecidableZero a, DecidableZero b, DecidableZero c, DecidableZero d) => DecidableZero (a, b, c, d) |
(DecidableZero a, DecidableZero b, DecidableZero c, DecidableZero d, DecidableZero e) => DecidableZero (a, b, c, d, e) |

class Unital r => DecidableUnits r Source

Instances

DecidableUnits Bool |
DecidableUnits Int |
DecidableUnits Int8 |
DecidableUnits Int16 |
DecidableUnits Int32 |
DecidableUnits Int64 |
DecidableUnits Integer |
DecidableUnits Word |
DecidableUnits Word8 |
DecidableUnits Word16 |
DecidableUnits Word32 |
DecidableUnits Word64 |
DecidableUnits () |
DecidableUnits Natural |
DecidableUnits (BasisCoblade m) |
DecidableUnits r => DecidableUnits (Opposite r) |
(DecidableUnits a, DecidableUnits b) => DecidableUnits (a, b) |
(DecidableUnits a, DecidableUnits b, DecidableUnits c) => DecidableUnits (a, b, c) |
(DecidableUnits a, DecidableUnits b, DecidableUnits c, DecidableUnits d) => DecidableUnits (a, b, c, d) |
(DecidableUnits a, DecidableUnits b, DecidableUnits c, DecidableUnits d, DecidableUnits e) => DecidableUnits (a, b, c, d, e) |

class Unital r => DecidableAssociates r Source

Instances

DecidableAssociates Bool |
DecidableAssociates Int |
DecidableAssociates Int8 |
DecidableAssociates Int16 |
DecidableAssociates Int32 |
DecidableAssociates Int64 |
DecidableAssociates Integer |
DecidableAssociates Word |
DecidableAssociates Word8 |
DecidableAssociates Word16 |
DecidableAssociates Word32 |
DecidableAssociates Word64 |
DecidableAssociates () |
DecidableAssociates Natural |
DecidableAssociates (BasisCoblade m) |
DecidableAssociates r => DecidableAssociates (Opposite r) |
(DecidableAssociates a, DecidableAssociates b) => DecidableAssociates (a, b) |
(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c) => DecidableAssociates (a, b, c) |
(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c, DecidableAssociates d) => DecidableAssociates (a, b, c, d) |
(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c, DecidableAssociates d, DecidableAssociates e) => DecidableAssociates (a, b, c, d, e) |

# Natural numbers

data Natural

Instances

Enum Natural |
Eq Natural |
Integral Natural |
Num Natural |
Ord Natural |
Read Natural |
Real Natural |
Show Natural |
Ix Natural |
Typeable Natural |
Bits Natural |
Whole Natural |
PartialSemigroup Natural |
PartialMonoid Natural |
PartialGroup Natural |
Order Natural |
Abelian Natural |
Partitionable Natural |
Additive Natural |
Monoidal Natural |
Semiring Natural |
Multiplicative Natural |
Unital Natural |
DecidableAssociates Natural |
DecidableUnits Natural |
DecidableZero Natural |
Rig Natural |
Characteristic Natural |
IntegralSemiring Natural |
Commutative Natural |
TriviallyInvolutive Natural |
InvolutiveSemiring Natural |
InvolutiveMultiplication Natural |
AdditiveOrder Natural |
OrderedRig Natural |
LocallyFiniteOrder Natural |
RightModule Natural Bool |
RightModule Natural Int |
RightModule Natural Int8 |
RightModule Natural Int16 |
RightModule Natural Int32 |
RightModule Natural Int64 |
RightModule Natural Integer |
RightModule Natural Word |
RightModule Natural Word8 |
RightModule Natural Word16 |
RightModule Natural Word32 |
RightModule Natural Word64 |
RightModule Natural Natural |
RightModule Natural Euclidean |
LeftModule Natural Bool |
LeftModule Natural Int |
LeftModule Natural Int8 |
LeftModule Natural Int16 |
LeftModule Natural Int32 |
LeftModule Natural Int64 |
LeftModule Natural Integer |
LeftModule Natural Word |
LeftModule Natural Word8 |
LeftModule Natural Word16 |
LeftModule Natural Word32 |
LeftModule Natural Word64 |
LeftModule Natural Natural |
LeftModule Natural Euclidean |
Rig r => Quadrance r Natural |
RightModule Natural (BasisCoblade m) |
Unital r => RightModule Natural (Log r) |
(Abelian r, Monoidal r) => RightModule Natural (RngRing r) |
Monoidal r => RightModule Natural (ZeroRng r) |
LeftModule Natural (BasisCoblade m) |
Unital r => LeftModule Natural (Log r) |
(Abelian r, Monoidal r) => LeftModule Natural (RngRing r) |
Monoidal r => LeftModule Natural (ZeroRng r) |

class Integral n => Whole n where

Methods

toNatural :: n -> Natural

Instances

Whole Word |
Whole Word8 |
Whole Word16 |
Whole Word32 |
Whole Word64 |
Whole Natural |

# Representable Additive

addRep :: (Zip m, Additive r) => m r -> m r -> m rSource

`Additive.(+)` default definition

sinnum1pRep :: (Whole n, Functor m, Additive r) => n -> m r -> m rSource

`sinnum1p` default definition

# Representable Monoidal

zeroRep :: (Applicative m, Monoidal r) => m rSource

`zero` default definition

sinnumRep :: (Whole n, Functor m, Monoidal r) => n -> m r -> m rSource

`sinnum` default definition

# Representable Group

negateRep :: (Functor m, Group r) => m r -> m rSource

`negate` default definition

minusRep :: (Zip m, Group r) => m r -> m r -> m rSource

`Group.(-)` default definition

subtractRep :: (Zip m, Group r) => m r -> m r -> m rSource

`subtract` default definition

timesRep :: (Integral n, Functor m, Group r) => n -> m r -> m rSource

`times` default definition

# Representable Multiplicative (via Algebra)

mulRep :: (Representable m, Algebra r (Key m)) => m r -> m r -> m rSource

`Multiplicative.(*)` default definition

# Representable Unital (via UnitalAlgebra)

oneRep :: (Representable m, Unital r, UnitalAlgebra r (Key m)) => m rSource

`one` default definition

# Representable Rig (via Algebra)

fromNaturalRep :: (UnitalAlgebra r (Key m), Representable m, Rig r) => Natural -> m rSource

`fromNatural` default definition

# Representable Ring (via Algebra)

fromIntegerRep :: (UnitalAlgebra r (Key m), Representable m, Ring r) => Integer -> m rSource

`fromInteger` default definition

# Norm

class Additive r => Quadrance r m where Source

Methods

quadrance :: m -> rSource

Instances

Quadrance () a |
Rig r => Quadrance r Word64 |
Rig r => Quadrance r Word32 |
Rig r => Quadrance r Word16 |
Rig r => Quadrance r Word8 |
Rig r => Quadrance r Int64 |
Rig r => Quadrance r Int32 |
Rig r => Quadrance r Int16 |
Rig r => Quadrance r Int8 |
Rig r => Quadrance r Integer |
Rig r => Quadrance r Natural |
Rig r => Quadrance r Word |
Rig r => Quadrance r Int |
Rig r => Quadrance r Bool |
Monoidal r => Quadrance r () |
(Commutative r, Rng r, InvolutiveSemiring r) => Quadrance r (Complex r) |
(TriviallyInvolutive r, Rng r) => Quadrance r (Quaternion r) |
(Commutative r, Rng r, InvolutiveSemiring r) => Quadrance r (Dual r) |
(Commutative r, InvolutiveSemiring r, Rng r) => Quadrance r (Hyper' r) |
(Commutative r, Rng r, InvolutiveSemiring r) => Quadrance r (Dual' r) |
(TriviallyInvolutive r, Rng r) => Quadrance r (Quaternion' r) |
(Quadrance r a, Quadrance r b) => Quadrance r (a, b) |
(Quadrance r a, Quadrance r b, Quadrance r c) => Quadrance r (a, b, c) |
(Quadrance r a, Quadrance r b, Quadrance r c, Quadrance r d) => Quadrance r (a, b, c, d) |
(Quadrance r a, Quadrance r b, Quadrance r c, Quadrance r d, Quadrance r e) => Quadrance r (a, b, c, d, e) |

# Covectors

newtype Covector r a Source

Linear functionals from elements of an (infinite) free module to a scalar

Constructors

Covector ((a -> r) -> r) |

Instances

RightModule r s => RightModule r (Covector s m) |
LeftModule r s => LeftModule r (Covector s m) |
Monad (Covector r) |
Functor (Covector r) |
Monoidal r => MonadPlus (Covector r) |
Applicative (Covector r) |
Monoidal r => Alternative (Covector r) |
Monoidal r => Plus (Covector r) |
Additive r => Alt (Covector r) |
Apply (Covector r) |
Bind (Covector r) |
Idempotent r => Idempotent (Covector r a) |
Abelian s => Abelian (Covector s a) |
Additive r => Additive (Covector r a) |
Monoidal s => Monoidal (Covector s a) |
Coalgebra r m => Semiring (Covector r m) |
Coalgebra r m => Multiplicative (Covector r m) |
Group s => Group (Covector s a) |
CounitalCoalgebra r m => Unital (Covector r m) |
(Idempotent r, IdempotentCoalgebra r a) => Band (Covector r a) |
(Rig r, CounitalCoalgebra r m) => Rig (Covector r m) |
(Ring r, CounitalCoalgebra r m) => Ring (Covector r m) |
(Commutative m, Coalgebra r m) => Commutative (Covector r m) |
Distinguished a => Distinguished (Covector r a) |
Complicated a => Complicated (Covector r a) |
Hamiltonian a => Hamiltonian (Covector r a) |
Infinitesimal a => Infinitesimal (Covector r a) |
Hyperbolic a => Hyperbolic (Covector r a) |
Trigonometric a => Trigonometric (Covector r a) |
Coalgebra r m => RightModule (Covector r m) (Covector r m) |
Coalgebra r m => LeftModule (Covector r m) (Covector r m) |

## Covectors as linear functionals

counitM :: UnitalAlgebra r a => a -> Covector r ()Source

unitM :: CounitalCoalgebra r c => Covector r cSource

comultM :: Algebra r a => a -> Covector r (a, a)Source

multM :: Coalgebra r c => c -> c -> Covector r cSource

invM :: InvolutiveAlgebra r h => h -> Covector r hSource

coinvM :: InvolutiveCoalgebra r h => h -> Covector r hSource

antipodeM :: HopfAlgebra r h => h -> Covector r hSource

convolveM antipodeM return = convolveM return antipodeM = comultM >=> uncurry joinM

convolveM :: (Algebra r c, Coalgebra r a) => (c -> Covector r a) -> (c -> Covector r a) -> c -> Covector r aSource

memoM :: HasTrie a => a -> Covector s aSource