algebra-3.1: Constructive abstract algebra

Safe HaskellNone

Numeric.Algebra.Class

Contents

Synopsis

Multiplicative Semigroups

class Multiplicative r whereSource

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) 

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

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 
(Additive (Complex r), Abelian (Complex r), Multiplicative (Complex r), Commutative r, Rng r) => Semiring (Complex r) 
(Additive (Quaternion r), Abelian (Quaternion r), Multiplicative (Quaternion r), TriviallyInvolutive r, Rng r) => Semiring (Quaternion r) 
(Additive (Dual r), Abelian (Dual r), Multiplicative (Dual r), Commutative r, Rng r) => Semiring (Dual r) 
(Additive (Hyper' k), Abelian (Hyper' k), Multiplicative (Hyper' k), Commutative k, Semiring k) => Semiring (Hyper' k) 
(Additive (Hyper k), Abelian (Hyper k), Multiplicative (Hyper k), Commutative k, Semiring k) => Semiring (Hyper k) 
(Additive (Dual' r), Abelian (Dual' r), Multiplicative (Dual' r), Commutative r, Rng r) => Semiring (Dual' r) 
(Additive (BasisCoblade m), Abelian (BasisCoblade m), Multiplicative (BasisCoblade m)) => Semiring (BasisCoblade m) 
(Additive (Quaternion' r), Abelian (Quaternion' r), Multiplicative (Quaternion' r), TriviallyInvolutive r, Semiring r) => Semiring (Quaternion' r) 
(Additive (Trig k), Abelian (Trig k), Multiplicative (Trig k), Commutative k, Rng k) => Semiring (Trig k) 
(Additive (End r), Abelian (End r), Multiplicative (End r), Abelian r, Monoidal r) => Semiring (End r) 
(Additive (Opposite r), Abelian (Opposite r), Multiplicative (Opposite r), Semiring r) => Semiring (Opposite r) 
(Additive (RngRing r), Abelian (RngRing r), Multiplicative (RngRing r), Rng r) => Semiring (RngRing r) 
(Additive (ZeroRng r), Abelian (ZeroRng r), Multiplicative (ZeroRng r), Monoidal r, Abelian r) => Semiring (ZeroRng r) 
(Additive (a -> r), Abelian (a -> r), Multiplicative (a -> r), Algebra r a) => Semiring (a -> r) 
(Additive (a, b), Abelian (a, b), Multiplicative (a, b), Semiring a, Semiring b) => Semiring (a, b) 
(Additive (:->: a r), Abelian (:->: a r), Multiplicative (:->: a r), HasTrie a, Algebra r a) => Semiring (:->: a r) 
(Additive (Covector r m), Abelian (Covector r m), Multiplicative (Covector r m), Coalgebra r m) => Semiring (Covector r m) 
(Additive (a, b, c), Abelian (a, b, c), Multiplicative (a, b, c), Semiring a, Semiring b, Semiring c) => Semiring (a, b, c) 
(Additive (Map r b m), Abelian (Map r b m), Multiplicative (Map r b m), Coalgebra r m) => Semiring (Map r b m) 
(Additive (a, b, c, d), Abelian (a, b, c, d), Multiplicative (a, b, c, d), Semiring a, Semiring b, Semiring c, Semiring d) => Semiring (a, b, c, d) 
(Additive (a, b, c, d, e), Abelian (a, b, c, d, e), Multiplicative (a, b, c, d, e), Semiring a, Semiring b, Semiring c, Semiring d, Semiring e) => Semiring (a, b, c, d, e) 

Left and Right Modules

class (Semiring r, Additive m) => LeftModule r m whereSource

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

class (Semiring r, Additive m) => RightModule r m whereSource

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

Additive Monoids

class (LeftModule Natural m, RightModule Natural m) => Monoidal m whereSource

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 
(LeftModule Natural (Complex r), RightModule Natural (Complex r), Monoidal r) => Monoidal (Complex r) 
(LeftModule Natural (Quaternion r), RightModule Natural (Quaternion r), Monoidal r) => Monoidal (Quaternion r) 
(LeftModule Natural (Dual r), RightModule Natural (Dual r), Monoidal r) => Monoidal (Dual r) 
(LeftModule Natural (Hyper' r), RightModule Natural (Hyper' r), Monoidal r) => Monoidal (Hyper' r) 
(LeftModule Natural (Hyper r), RightModule Natural (Hyper r), Monoidal r) => Monoidal (Hyper r) 
(LeftModule Natural (Dual' r), RightModule Natural (Dual' r), Monoidal r) => Monoidal (Dual' r) 
(LeftModule Natural (BasisCoblade m), RightModule Natural (BasisCoblade m)) => Monoidal (BasisCoblade m) 
(LeftModule Natural (Quaternion' r), RightModule Natural (Quaternion' r), Monoidal r) => Monoidal (Quaternion' r) 
(LeftModule Natural (Trig r), RightModule Natural (Trig r), Monoidal r) => Monoidal (Trig r) 
(LeftModule Natural (Log r), RightModule Natural (Log r), Unital r) => Monoidal (Log r) 
(LeftModule Natural (End r), RightModule Natural (End r), Monoidal r) => Monoidal (End r) 
(LeftModule Natural (Opposite r), RightModule Natural (Opposite r), Monoidal r) => Monoidal (Opposite r) 
(LeftModule Natural (RngRing r), RightModule Natural (RngRing r), Abelian r, Monoidal r) => Monoidal (RngRing r) 
(LeftModule Natural (ZeroRng r), RightModule Natural (ZeroRng r), Monoidal r) => Monoidal (ZeroRng r) 
(LeftModule Natural (e -> r), RightModule Natural (e -> r), Monoidal r) => Monoidal (e -> r) 
(LeftModule Natural (a, b), RightModule Natural (a, b), Monoidal a, Monoidal b) => Monoidal (a, b) 
(LeftModule Natural (:->: e r), RightModule Natural (:->: e r), HasTrie e, Monoidal r) => Monoidal (:->: e r) 
(LeftModule Natural (Covector s a), RightModule Natural (Covector s a), Monoidal s) => Monoidal (Covector s a) 
(LeftModule Natural (a, b, c), RightModule Natural (a, b, c), Monoidal a, Monoidal b, Monoidal c) => Monoidal (a, b, c) 
(LeftModule Natural (Map s b a), RightModule Natural (Map s b a), Monoidal s) => Monoidal (Map s b a) 
(LeftModule Natural (a, b, c, d), RightModule Natural (a, b, c, d), Monoidal a, Monoidal b, Monoidal c, Monoidal d) => Monoidal (a, b, c, d) 
(LeftModule Natural (a, b, c, d, e), RightModule Natural (a, b, c, d, e), Monoidal a, Monoidal b, Monoidal c, Monoidal d, Monoidal e) => Monoidal (a, b, c, d, e) 

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

Associative algebras

class Semiring r => Algebra r a whereSource

An associative algebra built with a free module over a semiring

Methods

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

Instances

Semiring () => Algebra () a 
Semiring r => Algebra r IntSet 
Semiring r => Algebra r () 
(Semiring k, Rng k) => Algebra k ComplexBasis 
(Semiring r, TriviallyInvolutive r, Rng r) => Algebra r QuaternionBasis

the quaternion algebra

(Semiring k, 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

(Semiring k, 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) 
(Semiring r, Algebra r a, Algebra r b) => Algebra r (a, b) 
(Semiring r, Monoidal r, Ord a, Partitionable b) => Algebra r (Map a b) 
(Semiring r, Algebra r a, Algebra r b, Algebra r c) => Algebra r (a, b, c) 
(Semiring r, Algebra r a, Algebra r b, Algebra r c, Algebra r d) => Algebra r (a, b, c, d) 
(Semiring r, Algebra r a, Algebra r b, Algebra r c, Algebra r d, Algebra r e) => Algebra r (a, b, c, d, e) 

Coassociative coalgebras

class Semiring r => Coalgebra r c whereSource

Methods

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

Instances

Semiring r => Coalgebra r IntSet

the free commutative band coalgebra over Int

Semiring r => Coalgebra r () 
(Semiring k, Rng k) => Coalgebra k ComplexBasis 
(Semiring r, TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis

the trivial diagonal coalgebra

(Semiring k, 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

(Semiring k, Rng k) => Coalgebra k DualBasis' 
(Semiring r, TriviallyInvolutive r, Rng r) => Coalgebra r QuaternionBasis'

dual quaternion comultiplication

(Semiring k, 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) 
(Semiring r, 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

(Semiring r, Coalgebra r a, Coalgebra r b) => Coalgebra r (a, b) 
(Semiring r, HasTrie m, Algebra r m) => Coalgebra r (:->: m r) 
(Semiring 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.

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