Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Index b c = forall a. Tran a b c
- newtype Tran a b c = Tran {
- runTran :: (c -> a) -> b -> a
- app :: Basis b f => Basis c g => Tran a b c -> g a -> f a
- invmap :: (a1 -> a2) -> (a2 -> a1) -> Tran a1 b c -> Tran a2 b c
- type Endo a b = Tran a b b
- rows :: Free f => Free g => g a -> f (g a)
- cols :: Free f => Free g => f a -> f (g a)
- projl :: Free f => Free g => Product f g a -> f a
- projr :: Free f => Free g => Product f g a -> g a
- compl :: Basis b f1 => Basis c f2 => Free g => Index b c -> f2 (g a) -> f1 (g a)
- compr :: Basis b g1 => Basis c g2 => Free f => Index b c -> f (g2 a) -> f (g1 a)
- complr :: Basis b1 f1 => Basis c1 f2 => Basis b2 g1 => Basis c2 g2 => Index b1 c1 -> Index b2 c2 -> f2 (g2 a) -> f1 (g1 a)
- transpose :: Free f => Free g => f (g a) -> g (f a)
- arr :: (b -> c) -> Index b c
- in1 :: Index (a, b) b
- in2 :: Index (a, b) a
- exl :: Index a (a + b)
- exr :: Index b (a + b)
- braid :: Index (a, b) (b, a)
- ebraid :: Index (a + b) (b + a)
- first :: Index b c -> Index (b, d) (c, d)
- second :: Index b c -> Index (d, b) (d, c)
- left :: Index b c -> Index (b + d) (c + d)
- right :: Index b c -> Index (d + b) (d + c)
- (***) :: Index a1 b1 -> Index a2 b2 -> Index (a1, a2) (b1, b2)
- (+++) :: Index a1 b1 -> Index a2 b2 -> Index (a1 + a2) (b1 + b2)
- (&&&) :: Index a b1 -> Index a b2 -> Index a (b1, b2)
- (|||) :: Index a1 b -> Index a2 b -> Index (a1 + a2) b
- ($$$) :: Index a (b -> c) -> Index a b -> Index a c
- adivide :: (a -> (a1, a2)) -> Index a1 b -> Index a2 b -> Index a b
- adivide' :: Index a b -> Index a b -> Index a b
- adivided :: Index a1 b -> Index a2 b -> Index (a1, a2) b
- aselect :: ((b1 + b2) -> b) -> Index a b1 -> Index a b2 -> Index a b
- aselect' :: Index a b -> Index a b -> Index a b
- aselected :: Index a b1 -> Index a b2 -> Index a (b1 + b2)
Documentation
type Index b c = forall a. Tran a b c Source #
A binary relation between two basis indices.
relations correspond to (compositions of)
permutation, projection, and embedding transformations.Index
b c
A general linear transformation between free semimodules indexed with bases b and c.
invmap :: (a1 -> a2) -> (a2 -> a1) -> Tran a1 b c -> Tran a2 b c Source #
Tran a b c is an invariant functor on a.
rows :: Free f => Free g => g a -> f (g a) Source #
Obtain a matrix by stacking rows.
>>>
rows (V2 1 2) :: M22 Int
V2 (V2 1 2) (V2 1 2)
cols :: Free f => Free g => f a -> f (g a) Source #
Obtain a matrix by stacking columns.
>>>
cols (V2 1 2) :: M22 Int
V2 (V2 1 1) (V2 2 2)
compl :: Basis b f1 => Basis c f2 => Free g => Index b c -> f2 (g a) -> f1 (g a) Source #
Left (post) composition with a linear transformation.
compr :: Basis b g1 => Basis c g2 => Free f => Index b c -> f (g2 a) -> f (g1 a) Source #
Right (pre) composition with a linear transformation.
complr :: Basis b1 f1 => Basis c1 f2 => Basis b2 g1 => Basis c2 g2 => Index b1 c1 -> Index b2 c2 -> f2 (g2 a) -> f1 (g1 a) Source #
Left and right composition with a linear transformation.
'complr f g' = 'compl f' . 'compr g'
When f . g = id this induces a similarity transformation:
>>>
perm1 = arr (+ I32)
>>>
perm2 = arr (+ I33)
>>>
m = m33 1 2 3 4 5 6 7 8 9 :: M33 Int
>>>
conjugate perm1 perm2 m :: M33 Int
V3 (V3 5 6 4) (V3 8 9 7) (V3 2 3 1)
See also https://en.wikipedia.org/wiki/Matrix_similarity & https://en.wikipedia.org/wiki/Conjugacy_class.