Safe Haskell | None |
---|---|
Language | Haskell2010 |
Algebra for Representable numbers
- class (Representable r, Additive a) => AdditiveModule r a where
- class (Representable r, AdditiveGroup a) => AdditiveGroupModule r a where
- class (Representable r, Multiplicative a) => MultiplicativeModule r a where
- class (Representable r, MultiplicativeGroup a) => MultiplicativeGroupModule r a where
- class (Representable r, ExpField a, Normed (r a) a) => Banach r a where
- class (Semiring a, Foldable r, Representable r) => Hilbert r a where
- inner :: Hilbert r a => r a -> r a -> a
- type family (a :: k1) >< (b :: k2) :: *
- class TensorProduct a where
Documentation
class (Representable r, 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
(Representable r, Additive a) => AdditiveModule r a Source # | |
class (Representable r, AdditiveGroup 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
(Representable r, AdditiveGroup a) => AdditiveGroupModule r a Source # | |
class (Representable r, 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
(Representable r, Multiplicative a) => MultiplicativeModule r a Source # | |
class (Representable r, MultiplicativeGroup a) => MultiplicativeGroupModule r a where Source #
Division Module Laws
nearZero a || a ./ one == a b == zero || a ./ b == recip b *. a
(Representable r, MultiplicativeGroup a) => MultiplicativeGroupModule r a Source # | |
class (Representable r, ExpField a, Normed (r a) 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, Foldable r, Representable r) => 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)
(><) :: a -> a -> a >< a infix 8 Source #
outer :: a -> a -> a >< a Source #
timesleft :: a -> (a >< a) -> a Source #
timesright :: (a >< a) -> a -> a Source #
(Hilbert r a, Multiplicative a) => TensorProduct (r a) Source # | |