| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Numeric.Algebra.Class
Contents
- class Multiplicative r where
- pow1pIntegral :: (Integral r, Integral n) => r -> n -> r
- product1 :: (Foldable1 f, Multiplicative r) => f r -> r
- class (Additive r, Abelian r, Multiplicative r) => Semiring r
- class (Semiring r, Additive m) => LeftModule r m where
- class (Semiring r, Additive m) => RightModule r m where
- class (LeftModule r m, RightModule r m) => Module r m
- class (LeftModule Natural m, RightModule Natural m) => Monoidal m where
- sum :: (Foldable f, Monoidal m) => f m -> m
- sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r
- class Semiring r => Algebra r a where
- class Semiring r => Coalgebra r c where
Multiplicative Semigroups
class Multiplicative r where #
A multiplicative semigroup
Minimal complete definition
Instances
pow1pIntegral :: (Integral r, Integral n) => r -> n -> r #
product1 :: (Foldable1 f, Multiplicative r) => f r -> r #
Semirings
class (Additive r, Abelian r, Multiplicative r) => Semiring r #
A pair of an additive abelian semigroup, and a multiplicative semigroup, with the distributive laws:
a(b + c) = ab + ac -- left distribution (we are a LeftNearSemiring) (a + b)c = ac + bc -- right distribution (we are a [Right]NearSemiring)
Common notation includes the laws for additive and multiplicative identity in semiring.
If you want that, look at Rig instead.
Ideally we'd use the cyclic definition:
class (LeftModule r r, RightModule r r, Additive r, Abelian r, Multiplicative r) => Semiring r
to enforce that every semiring r is an r-module over itself, but Haskell doesn't like that.
Instances
Left and Right Modules
class (Semiring r, Additive m) => LeftModule r m where #
Minimal complete definition
Instances
class (Semiring r, Additive m) => RightModule r m where #
Minimal complete definition
Instances
class (LeftModule r m, RightModule r m) => Module r m #
Instances
| (LeftModule r m, RightModule r m) => Module r m # | |
Additive Monoids
class (LeftModule Natural m, RightModule Natural m) => Monoidal m where #
An additive monoid
zero + a = a = a + zero
Minimal complete definition
Instances
sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r #
Associative algebras
class Semiring r => Algebra r a where #
An associative algebra built with a free module over a semiring
Minimal complete definition
Instances
Coassociative coalgebras
class Semiring r => Coalgebra r c where #
Minimal complete definition
Instances
| Semiring r => Coalgebra r IntSet # | the free commutative band coalgebra over Int |
| Semiring r => Coalgebra r () # | |
| (Commutative k, Rng k) => Coalgebra k TrigBasis # | |
| (TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis' # | dual quaternion comultiplication |
| (Commutative k, Semiring k) => Coalgebra k HyperBasis # | the hyperbolic trigonometric coalgebra |
| Rng k => Coalgebra k DualBasis' # | |
| (TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis # | the trivial diagonal coalgebra |
| (Commutative k, Monoidal k, Semiring k) => Coalgebra k HyperBasis' # | |
| Rng k => Coalgebra k DualBasis # | |
| Rng k => Coalgebra k ComplexBasis # | |
| (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) # | |
| 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) # | |