braid-0.1.0.0: Types and functions to work with braids and Khovanov homology.

Complex

Description

Longer description to come.

Synopsis

# Documentation

data Generator Source

A `Generator` is a `Set` of `Components` labled with `Sign`s. Strictly speaking, we could make do without components, as `components = Data.Set.fromList . Data.Map.keys \$ signs`. kgrade depends totally on signs, so it should be taken out too.

Constructors

 Generator Fieldsresolution :: Resolution components :: Set Component signs :: Map Component Sign kgrade :: Int

Instances

 Source Source Source

data Sign Source

These stand for v_+ and v_- in Khovanov homology. We could include some more algebra here, but | for now I don't see a reason to.

Constructors

 Plus Minus

Instances

 Source Source Source

newtype AlgGen Source

Stands for sums of generators modulo 2. `wrapGen` wraps a single generator. | Should be a type synonym instead? | This is something like an implementation of mod 2 vector spaces. Could this be done better with vector-spaces or linear?

Constructors

 AlgGen (Set Generator)

Instances

 Source Source Source Source

`Morphisms` is a map from (a linear combination of) `Generator`s to a set of (linear combinations of) `Generator`s.

addMod2 :: (Eq a, Ord a) => a -> Set a -> Set a Source

The next three functions implement mod 2 addition at the level of `Set`s and `Map`s.

addMod2Set :: (Eq a, Ord a) => Set a -> Set a -> Set a Source

addMod2Map :: (Ord a, Ord k) => Map k (Set a) -> Map k (Set a) -> Map k (Set a) Source

addToKey :: (Ord k, Monoid k, Monoid a) => k -> k -> Map k a -> Map k a Source

Adds a x to the key key (but only if key is a key of mors).

fromTo :: Set AlgGen -> Set AlgGen -> [(AlgGen, Set AlgGen)] Source

Generates all arrows from elements of `s` to elements of `s'` with the latter wrapped as singleton `Set`s. This is purely algebraic -- the function doesn't check if their ought to be any such arrows.