rings-0.0.3: Ring-like objects.

Safe HaskellSafe
LanguageHaskell2010

Data.Semimodule.Index

Synopsis

Documentation

rgt :: (a -> b) -> (a + b) -> b Source #

rgt' :: (Void + b) -> b Source #

lft :: (b -> a) -> (a + b) -> a Source #

lft' :: (a + Void) -> a Source #

eswap :: (a1 + a2) -> a2 + a1 Source #

fork :: a -> (a, a) Source #

join :: (a + a) -> a Source #

eval :: (a, a -> b) -> b Source #

apply :: (b -> a, b) -> a Source #

type Index b c = forall a. Trans a b c Source #

A binary relation between two basis indices.

Index b c relations correspond to permutations, projections, and embedding transformations, as well as combinations thereof.

See also https://en.wikipedia.org/wiki/Logical_matrix.

type Endo a b = Trans a b b Source #

An endomorphism over a free semimodule.

newtype Trans a b c Source #

A general linear transformation between free semimodules indexed with bases b and c.

Constructors

Trans 

Fields

Instances
Profunctor (Trans a) Source # 
Instance details

Defined in Data.Semimodule.Index

Methods

dimap :: (a0 -> b) -> (c -> d) -> Trans a b c -> Trans a a0 d #

lmap :: (a0 -> b) -> Trans a b c -> Trans a a0 c #

rmap :: (b -> c) -> Trans a a0 b -> Trans a a0 c #

(#.) :: Coercible c b => q b c -> Trans a a0 b -> Trans a a0 c #

(.#) :: Coercible b a0 => Trans a b c -> q a0 b -> Trans a a0 c #

Category (Trans a :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Semimodule.Index

Methods

id :: Trans a a0 a0 #

(.) :: Trans a b c -> Trans a a0 b -> Trans a a0 c #

Functor (Trans a b) Source # 
Instance details

Defined in Data.Semimodule.Index

Methods

fmap :: (a0 -> b0) -> Trans a b a0 -> Trans a b b0 #

(<$) :: a0 -> Trans a b b0 -> Trans a b a0 #

arr :: (b -> c) -> Index b c Source #

app :: Basis b f => Basis c g => Trans a b c -> g a -> f a Source #

in1 :: Index (a, b) b Source #

in2 :: Index (a, b) a Source #

exl :: Index a (a + b) Source #

exr :: Index b (a + b) Source #

braid :: Index (a, b) (b, a) Source #

ebraid :: Index (a + b) (b + a) Source #

first :: Index b c -> Index (b, d) (c, d) Source #

second :: Index b c -> Index (d, b) (d, c) Source #

left :: Index b c -> Index (b + d) (c + d) Source #

right :: Index b c -> Index (d + b) (d + c) Source #

(***) :: Index a1 b1 -> Index a2 b2 -> Index (a1, a2) (b1, b2) infixr 3 Source #

(+++) :: Index a1 b1 -> Index a2 b2 -> Index (a1 + a2) (b1 + b2) infixr 2 Source #

(&&&) :: Index a b1 -> Index a b2 -> Index a (b1, b2) infixr 3 Source #

(|||) :: Index a1 b -> Index a2 b -> Index (a1 + a2) b infixr 2 Source #

($$$) :: Index a (b -> c) -> Index a b -> Index a c infixr 0 Source #

adivide :: (a -> (a1, a2)) -> Index a1 b -> Index a2 b -> Index a b Source #

adivide' :: Index a b -> Index a b -> Index a b Source #

adivided :: Index a1 b -> Index a2 b -> Index (a1, a2) b Source #

aselect :: ((b1 + b2) -> b) -> Index a b1 -> Index a b2 -> Index a b Source #

aselect' :: Index a b -> Index a b -> Index a b Source #

aselected :: Index a b1 -> Index a b2 -> Index a (b1 + b2) Source #