| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Numeric.Algebra
Contents
- Additive
- Multiplicative
- Ring-Structures
- Rings
- Modules
- Algebras
- Ring Properties
- 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
- class Additive r where
- 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
- class (LeftModule Natural m, RightModule Natural m) => Monoidal m where
- sum :: (Foldable f, Monoidal m) => f m -> m
- class (LeftModule Integer r, RightModule Integer r, Monoidal r) => Group r where
- class Multiplicative r where
- product1 :: (Foldable1 f, Multiplicative r) => f r -> r
- class Multiplicative r => Commutative r
- class Multiplicative r => Unital r where
- product :: (Foldable f, Unital r) => f r -> r
- class Multiplicative r => Band r
- pow1pBand :: r -> Natural -> r
- powBand :: Unital r => r -> Natural -> r
- class Unital r => Division r where
- class Multiplicative m => Factorable m where
- class Multiplicative r => InvolutiveMultiplication r where
- 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
- class (Rig r, Rng r) => Ring r where
- class Ring r => LocalRing r
- class (Division r, Ring r) => DivisionRing r
- class (Euclidean d, Division d) => Field d
- 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 Semiring r => Algebra r a where
- class Semiring r => Coalgebra r c where
- class Algebra r a => UnitalAlgebra r a where
- class Coalgebra r c => CounitalCoalgebra r c where
- class (UnitalAlgebra r a, CounitalCoalgebra r a) => Bialgebra r a
- class (InvolutiveSemiring r, Algebra r a) => InvolutiveAlgebra r a where
- class (InvolutiveSemiring r, Coalgebra r c) => InvolutiveCoalgebra r c where
- 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
- class Bialgebra r h => HopfAlgebra r h where
- class Rig r => Characteristic r where
- charInt :: (Integral s, Bounded s) => proxy s -> Natural
- charWord :: (Integral s, Bounded s) => proxy s -> Natural
- class Order a where
- 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 :: *
- addRep :: (Applicative m, Additive r) => m r -> m r -> m r
- sinnum1pRep :: (Functor m, Additive r) => Natural -> m r -> m r
- zeroRep :: (Applicative m, Monoidal r) => m r
- sinnumRep :: (Functor m, Monoidal r) => Natural -> m r -> m r
- negateRep :: (Functor m, Group r) => m r -> m r
- minusRep :: (Applicative m, Group r) => m r -> m r -> m r
- subtractRep :: (Applicative 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 (Rep m)) => m r -> m r -> m r
- oneRep :: (Representable m, Unital r, UnitalAlgebra r (Rep m)) => m r
- fromNaturalRep :: (UnitalAlgebra r (Rep m), Representable m, Rig r) => Natural -> m r
- fromIntegerRep :: (UnitalAlgebra r (Rep m), Representable m, Ring r) => Integer -> m r
- class Additive r => Quadrance r m where
- 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
Additive
additive semigroups
(a + b) + c = a + (b + c) sinnum 1 a = a sinnum (2 * n) a = sinnum n a + sinnum n a sinnum (2 * n + 1) a = sinnum n a + sinnum n a + a
Minimal complete definition
Instances
additive Abelian semigroups
class Additive r => Abelian r #
an additive abelian semigroup
a + b = b + a
Instances
additive idempotent semigroups
class Additive r => Idempotent r #
An additive semigroup with idempotent addition.
a + a = a
Instances
| Idempotent Bool # | |
| Idempotent () # | |
| Idempotent r => Idempotent (ZeroRng r) # | |
| Idempotent r => Idempotent (Opposite r) # | |
| Band r => Idempotent (Log r) # | |
| Idempotent r => Idempotent (Trig r) # | |
| Idempotent r => Idempotent (Quaternion' r) # | |
| Idempotent r => Idempotent (Hyper r) # | |
| Idempotent r => Idempotent (Dual' r) # | |
| Idempotent r => Idempotent (Quaternion r) # | |
| Idempotent r => Idempotent (Hyper' r) # | |
| Idempotent r => Idempotent (Dual r) # | |
| Idempotent r => Idempotent (Complex r) # | |
| Idempotent r => Idempotent (e -> r) # | |
| (Idempotent a, Idempotent b) => Idempotent (a, b) # | |
| 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 -> r #
sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r #
partitionable additive semigroups
class Additive m => Partitionable m where #
Minimal complete definition
Methods
partitionWith :: (m -> m -> r) -> m -> NonEmpty r #
partitionWith f c returns a list containing f a b for each a b such that a + b = c,
Instances
| Partitionable Bool # | |
| Partitionable Natural # | |
| Partitionable () # | |
| Factorable r => Partitionable (Log r) # | |
| Partitionable r => Partitionable (Trig r) # | |
| Partitionable r => Partitionable (Quaternion' r) # | |
| Partitionable r => Partitionable (Hyper r) # | |
| Partitionable r => Partitionable (Dual' r) # | |
| Partitionable r => Partitionable (Quaternion r) # | |
| Partitionable r => Partitionable (Hyper' r) # | |
| Partitionable r => Partitionable (Dual r) # | |
| Partitionable r => Partitionable (Complex 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 #
An additive monoid
zero + a = a = a + zero
Minimal complete definition
Instances
additive groups
class (LeftModule Integer r, RightModule Integer r, Monoidal r) => Group r where #
Methods
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 (ZeroRng r) # | |
| (Abelian r, Group r) => Group (RngRing r) # | |
| Group r => Group (Opposite r) # | |
| Group r => Group (End r) # | |
| Division r => Group (Log r) # | |
| Group r => Group (Trig r) # | |
| Group r => Group (Quaternion' r) # | |
| Group r => Group (Hyper r) # | |
| Group r => Group (Dual' r) # | |
| Group r => Group (Quaternion r) # | |
| Group r => Group (Hyper' r) # | |
| Group r => Group (Dual r) # | |
| Group r => Group (Complex r) # | |
| GCDDomain d => Group (Fraction d) # | |
| Group r => Group (e -> r) # | |
| (Group a, Group b) => Group (a, b) # | |
| 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 #
A multiplicative semigroup
Minimal complete definition
Instances
product1 :: (Foldable1 f, Multiplicative r) => f r -> r #
commutative multiplicative semigroups
class Multiplicative r => Commutative r #
A commutative multiplicative semigroup
Instances
multiplicative monoids
class Multiplicative r => Unital r where #
Minimal complete definition
Instances
idempotent multiplicative semigroups
class Multiplicative r => Band r #
An multiplicative semigroup with idempotent multiplication.
a * a = a
Instances
| Band Bool # | |
| Band () # | |
| Band r => Band (Opposite r) # | |
| Idempotent r => Band (Exp 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) # | |
multiplicative groups
class Unital r => Division r where #
Instances
| Division () # | |
| (Rng r, Division r) => Division (RngRing r) # | |
| Division r => Division (Opposite r) # | |
| Group r => Division (Exp r) # | |
| (TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion' r) # | |
| (Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Dual' r) # | |
| (TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion r) # | |
| (Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Hyper' r) # | |
| (Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Dual r) # | |
| (Commutative r, InvolutiveSemiring r, DivisionRing r) => Division (Complex r) # | |
| GCDDomain d => Division (Fraction d) # | |
| (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 #
`factorWith f c` returns a non-empty list containing `f a b` for all `a, b` such that `a * b = c`.
Results of factorWith f 0 are undefined and may result in either an error or an infinite list.
Minimal complete definition
Methods
factorWith :: (m -> m -> r) -> m -> NonEmpty r #
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 #
An semigroup with involution
adjoint a * adjoint b = adjoint (b * a)
Minimal complete definition
Instances
class (Commutative r, InvolutiveMultiplication r) => TriviallyInvolutive r #
adjoint = id
Instances
| TriviallyInvolutive Bool # | |
| TriviallyInvolutive Int # | |
| TriviallyInvolutive Int8 # | |
| TriviallyInvolutive Int16 # | |
| TriviallyInvolutive Int32 # | |
| TriviallyInvolutive Int64 # | |
| TriviallyInvolutive Integer # | |
| TriviallyInvolutive Natural # | |
| TriviallyInvolutive Word # | |
| TriviallyInvolutive Word8 # | |
| TriviallyInvolutive Word16 # | |
| TriviallyInvolutive Word32 # | |
| TriviallyInvolutive Word64 # | |
| TriviallyInvolutive () # | |
| TriviallyInvolutive Euclidean # | |
| (TriviallyInvolutive r, TriviallyInvolutiveAlgebra r a) => TriviallyInvolutive (a -> r) # | |
| (TriviallyInvolutive a, TriviallyInvolutive b) => TriviallyInvolutive (a, b) # | |
| (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 #
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
class (Semiring r, InvolutiveMultiplication r) => InvolutiveSemiring r #
adjoint (x + y) = adjoint x + adjoint y
Instances
class (Semiring r, Idempotent r) => Dioid r #
Instances
| (Semiring r, Idempotent r) => Dioid r # | |
Rngs
Rigs
class (Semiring r, Unital r, Monoidal r) => Rig r where #
A Ring without (n)egation
Methods
fromNatural :: Natural -> r #
Instances
| Rig Bool # | |
| Rig Int # | |
| Rig Int8 # | |
| Rig Int16 # | |
| Rig Int32 # | |
| Rig Int64 # | |
| Rig Integer # | |
| Rig Natural # | |
| Rig Word # | |
| Rig Word8 # | |
| Rig Word16 # | |
| Rig Word32 # | |
| Rig Word64 # | |
| Rig () # | |
| Rig Euclidean # | |
| Rng r => Rig (RngRing r) # | |
| Rig r => Rig (Opposite r) # | |
| (Abelian r, Monoidal r) => Rig (End r) # | |
| (Commutative r, Ring r) => Rig (Trig r) # | |
| (TriviallyInvolutive r, Ring r) => Rig (Quaternion' r) # | |
| (Commutative r, Rig r) => Rig (Hyper r) # | |
| Rig (BasisCoblade m) # | |
| (Commutative r, Ring r) => Rig (Dual' r) # | |
| (TriviallyInvolutive r, Ring r) => Rig (Quaternion r) # | |
| (Commutative r, Rig r) => Rig (Hyper' r) # | |
| (Commutative r, Ring r) => Rig (Dual r) # | |
| (Commutative r, Ring r) => Rig (Complex r) # | |
| GCDDomain d => Rig (Fraction d) # | |
| (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 #
Methods
fromInteger :: Integer -> r #
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 # | |
| Rng r => Ring (RngRing r) # | |
| Ring r => Ring (Opposite r) # | |
| (Abelian r, Group r) => Ring (End r) # | |
| (Commutative r, Ring r) => Ring (Trig r) # | |
| (TriviallyInvolutive r, Ring r) => Ring (Quaternion' 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 (Hyper' r) # | |
| (Commutative r, Ring r) => Ring (Dual r) # | |
| (Commutative r, Ring r) => Ring (Complex r) # | |
| GCDDomain d => Ring (Fraction d) # | |
| (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 (Division r, Ring r) => DivisionRing r #
Instances
| (Division r, Ring r) => DivisionRing r # | |
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 # | |
Algebras
associative algebras over (non-commutative) semirings
class Semiring r => Algebra r a where #
An associative algebra built with a free module over a semiring
Minimal complete definition
Instances
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) # | |
unital algebras
class Algebra r a => UnitalAlgebra r a where #
An associative unital algebra over a semiring, built using a free module
Minimal complete definition
Instances
class Coalgebra r c => CounitalCoalgebra r c where #
Minimal complete definition
Instances
class (UnitalAlgebra r a, CounitalCoalgebra r a) => Bialgebra r a #
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 () # | |
| (Commutative k, Rng k) => Bialgebra k TrigBasis # | |
| (TriviallyInvolutive r, Rng r) => Bialgebra r QuaternionBasis' # | |
| (Commutative k, Semiring k) => Bialgebra k HyperBasis # | |
| Rng k => Bialgebra k DualBasis' # | |
| (TriviallyInvolutive r, Rng r) => Bialgebra r QuaternionBasis # | |
| (Commutative k, Monoidal k, Semiring k) => Bialgebra k HyperBasis' # | |
| Rng k => Bialgebra k DualBasis # | |
| Rng k => Bialgebra k ComplexBasis # | |
| (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 #
Minimal complete definition
Instances
class (InvolutiveSemiring r, Coalgebra r c) => InvolutiveCoalgebra r c where #
Minimal complete definition
Instances
class (Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h #
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 #
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 #
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 #
Instances
| (InvolutiveBialgebra r h, TriviallyInvolutiveAlgebra r h, TriviallyInvolutiveCoalgebra r h) => TriviallyInvolutiveBialgebra r h # | |
idempotent algebras
class Algebra r a => IdempotentAlgebra r a #
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 #
Instances
| (Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h # | |
commutative algebras
class Algebra r a => CommutativeAlgebra r a #
Instances
| (Commutative r, Semiring r) => CommutativeAlgebra r IntSet # | |
| (Commutative r, Semiring r) => CommutativeAlgebra r () # | |
| (Commutative r, Semiring r, Ord a) => CommutativeAlgebra r (Set a) # | |
| (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 #
Instances
| (Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h # | |
class Coalgebra r c => CocommutativeCoalgebra r c #
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) # | |
| 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 #
Minimal complete definition
Methods
recipriocal :: (a -> r) -> a -> r #
Hopf alegebras
class Bialgebra r h => HopfAlgebra r h where #
A HopfAlgebra algebra on a semiring, where the module is free.
When antipode . antipode = id and antipode is an antihomomorphism then we are an InvolutiveBialgebra with inv = antipode as well
Minimal complete definition
Instances
| (Commutative k, Group k, InvolutiveSemiring k) => HopfAlgebra k TrigBasis # | |
| (TriviallyInvolutive r, InvolutiveSemiring r, Rng r) => HopfAlgebra r QuaternionBasis' # | |
| (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 HyperBasis' # | |
| (InvolutiveSemiring k, Rng k) => HopfAlgebra k DualBasis # | |
| (InvolutiveSemiring k, Rng k) => HopfAlgebra k ComplexBasis # | |
| (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 #
Minimal complete definition
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 Natural # | |
| Characteristic Word # | |
| Characteristic Word8 # | |
| Characteristic Word16 # | |
| Characteristic Word32 # | |
| Characteristic Word64 # | |
| Characteristic () # | |
| (Characteristic d, GCDDomain d) => Characteristic (Fraction d) # | |
| (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) # | |
Order
Instances
| Order Bool # | |
| Order Int # | |
| Order Int8 # | |
| Order Int16 # | |
| Order Int32 # | |
| Order Int64 # | |
| Order Integer # | |
| Order Natural # | |
| Order Word # | |
| Order Word8 # | |
| Order Word16 # | |
| Order Word32 # | |
| Order Word64 # | |
| Order () # | |
| 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 #
Instances
| OrderedRig Bool # | |
| OrderedRig Integer # | |
| OrderedRig Natural # | |
| OrderedRig () # | |
| (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 #
z + x <= z + y = x <= y = x + z <= y + z
Instances
| AdditiveOrder Bool # | |
| AdditiveOrder Integer # | |
| AdditiveOrder Natural # | |
| AdditiveOrder () # | |
| (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 #
Instances
| LocallyFiniteOrder Bool # | |
| LocallyFiniteOrder Int # | |
| LocallyFiniteOrder Int8 # | |
| LocallyFiniteOrder Int16 # | |
| LocallyFiniteOrder Int32 # | |
| LocallyFiniteOrder Int64 # | |
| LocallyFiniteOrder Integer # | |
| LocallyFiniteOrder Natural # | |
| LocallyFiniteOrder Word # | |
| LocallyFiniteOrder Word8 # | |
| LocallyFiniteOrder Word16 # | |
| LocallyFiniteOrder Word32 # | |
| LocallyFiniteOrder Word64 # | |
| LocallyFiniteOrder () # | |
| 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 #
Minimal complete definition
Instances
| DecidableZero Bool # | |
| DecidableZero Int # | |
| DecidableZero Int8 # | |
| DecidableZero Int16 # | |
| DecidableZero Int32 # | |
| DecidableZero Int64 # | |
| DecidableZero Integer # | |
| DecidableZero Natural # | |
| DecidableZero Word # | |
| DecidableZero Word8 # | |
| DecidableZero Word16 # | |
| DecidableZero Word32 # | |
| DecidableZero Word64 # | |
| DecidableZero () # | |
| DecidableZero r => DecidableZero (Opposite r) # | |
| DecidableZero (BasisCoblade m) # | |
| GCDDomain d => DecidableZero (Fraction d) # | |
| (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 #
Minimal complete definition
Instances
| DecidableUnits Bool # | |
| DecidableUnits Int # | |
| DecidableUnits Int8 # | |
| DecidableUnits Int16 # | |
| DecidableUnits Int32 # | |
| DecidableUnits Int64 # | |
| DecidableUnits Integer # | |
| DecidableUnits Natural # | |
| DecidableUnits Word # | |
| DecidableUnits Word8 # | |
| DecidableUnits Word16 # | |
| DecidableUnits Word32 # | |
| DecidableUnits Word64 # | |
| DecidableUnits () # | |
| DecidableUnits r => DecidableUnits (Opposite r) # | |
| DecidableUnits (BasisCoblade m) # | |
| GCDDomain d => DecidableUnits (Fraction d) # | |
| (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 #
Minimal complete definition
Instances
Natural numbers
Type representing arbitrary-precision non-negative integers.
Operations whose result would be negative
.throw (Underflow :: ArithException)
Since: 4.8.0.0
Instances
Representable Additive
addRep :: (Applicative m, Additive r) => m r -> m r -> m r #
`Additive.(+)` default definition
Representable Monoidal
zeroRep :: (Applicative m, Monoidal r) => m r #
zero default definition
Representable Group
minusRep :: (Applicative m, Group r) => m r -> m r -> m r #
`Group.(-)` default definition
subtractRep :: (Applicative m, Group r) => m r -> m r -> m r #
subtract default definition
Representable Multiplicative (via Algebra)
mulRep :: (Representable m, Algebra r (Rep m)) => m r -> m r -> m r #
`Multiplicative.(*)` default definition
Representable Unital (via UnitalAlgebra)
oneRep :: (Representable m, Unital r, UnitalAlgebra r (Rep m)) => m r #
one default definition
Representable Rig (via Algebra)
fromNaturalRep :: (UnitalAlgebra r (Rep m), Representable m, Rig r) => Natural -> m r #
fromNatural default definition
Representable Ring (via Algebra)
fromIntegerRep :: (UnitalAlgebra r (Rep m), Representable m, Ring r) => Integer -> m r #
fromInteger default definition
Norm
class Additive r => Quadrance r m where #
Minimal complete definition
Instances
Covectors
Linear functionals from elements of an (infinite) free module to a scalar
Instances
Covectors as linear functionals
counitM :: UnitalAlgebra r a => a -> Covector r () #
unitM :: CounitalCoalgebra r 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 antipodeM return = convolveM return antipodeM = comultM >=> uncurry joinM