Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Algebra for Representable numbers
- class Additive a => AdditiveModule r a where
- class (AdditiveGroup a, AdditiveModule r a) => AdditiveGroupModule r a where
- class Multiplicative a => MultiplicativeModule r a where
- class (MultiplicativeGroup a, MultiplicativeModule r a) => MultiplicativeGroupModule r a where
- class (ExpField a, Normed (r a) a, MultiplicativeGroupModule r a) => Banach r a where
- class Semiring a => Hilbert r a where
- type family (a :: k1) >< (b :: k2) :: *
- class TensorProduct a where
Documentation
class Additive a => AdditiveModule r a where Source #
Additive Module Laws
(a + b) .+ c == a + (b .+ c) (a + b) .+ c == (a .+ c) + b a .+ zero == a a .+ b == b +. a
class (AdditiveGroup a, AdditiveModule r a) => AdditiveGroupModule r a where Source #
Subtraction Module Laws
(a + b) .- c == a + (b .- c) (a + b) .- c == (a .- c) + b a .- zero == a a .- b == negate b +. a
class Multiplicative a => MultiplicativeModule r a where Source #
Multiplicative Module Laws
a .* one == a (a + b) .* c == (a .* c) + (b .* c) c *. (a + b) == (c *. a) + (c *. b) a .* zero == zero a .* b == b *. a
class (MultiplicativeGroup a, MultiplicativeModule r a) => MultiplicativeGroupModule r a where Source #
Division Module Laws
nearZero a || a ./ one == a b == zero || a ./ b == recip b *. a
class (ExpField a, Normed (r a) a, MultiplicativeGroupModule r a) => Banach r a where Source #
Banach (with Norm) laws form rules around size and direction of a number, with a potential crossing into another codomain.
a == singleton zero || normalize a *. size a == a
class Semiring a => Hilbert r a where Source #
the inner product of a representable over a semiring
a <.> b == b <.> a a <.> (b +c) == a <.> b + a <.> c a <.> (s *. b + c) == s * (a <.> b) + a <.> c
class TensorProduct a where Source #
generalised outer product
a><b + c><b == (a+c) >< b a><b + a><c == a >< (b+c)
todo: work out why these laws down't apply > a *. (b>== (a<b) .* c > (a>.* c == a *. (b<c)