-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Combinatorics, group theory, commutative algebra, non-commutative algebra
--
-- A library of maths code in the areas of combinatorics, group theory,
-- commutative algebra, and non-commutative algebra. The library is
-- mainly intended for educational purposes, but does have efficient
-- implementations of several fundamental algorithms.
@package HaskellForMaths
@version 0.3.1
-- | A module defining the type and operations of free k-vector spaces over
-- a basis b (for a field k)
module Math.Algebras.VectorSpace
-- | Given a field type k (ie a Fractional instance), Vect k b is the type
-- of the free k-vector space over the basis type b. Elements of Vect k b
-- consist of k-linear combinations of elements of b.
data Vect k b
V :: [(b, k)] -> Vect k b
-- | The zero vector
zero :: Vect k b
-- | Addition of vectors
add :: (Ord b, Num k) => Vect k b -> Vect k b -> Vect k b
-- | Addition of vectors (same as add)
(<+>) :: (Ord b, Num k) => Vect k b -> Vect k b -> Vect k b
-- | Negation of vector
neg :: Num k => Vect k b -> Vect k b
-- | Scalar multiplication (on the left)
smultL :: Num k => k -> Vect k b -> Vect k b
-- | Same as smultL. Mnemonic is multiply through (from the left)
(*>) :: Num k => k -> Vect k b -> Vect k b
-- | Scalar multiplication on the right
smultR :: Num k => Vect k b -> k -> Vect k b
-- | Same as smultR. Mnemonic is multiply through (from the right)
(<*) :: Num k => Vect k b -> k -> Vect k b
-- | Convert an element of Vect k b into normal form. Normal form consists
-- in having the basis elements in ascending order, with no duplicates,
-- and all coefficients non-zero
nf :: (Ord b, Num k) => Vect k b -> Vect k b
linear :: (Ord b, Num k) => (a -> Vect k b) -> Vect k a -> Vect k b
newtype EBasis
E :: Int -> EBasis
instance Eq EBasis
instance Ord EBasis
instance (Eq k, Eq b) => Eq (Vect k b)
instance (Ord k, Ord b) => Ord (Vect k b)
instance Show EBasis
instance Num k => Monad (Vect k)
instance Functor (Vect k)
instance (Num k, Show b) => Show (Vect k b)
-- | A module defining tensor products of vector spaces
module Math.Algebras.TensorProduct
data Tensor a b
T :: a -> b -> Tensor a b
-- | Tensor product of two elements
te :: Num k => Vect k a -> Vect k b -> Vect k (Tensor a b)
-- | Tensor product of two (linear) functions
tf :: (Num k, Ord a', Ord b') => (Vect k a -> Vect k a') -> (Vect k b -> Vect k b') -> Vect k (Tensor a b) -> Vect k (Tensor a' b')
assocL :: Vect k (Tensor u (Tensor v w)) -> Vect k (Tensor (Tensor u v) w)
assocR :: Vect k (Tensor (Tensor u v) w) -> Vect k (Tensor u (Tensor v w))
instance (Eq a, Eq b) => Eq (Tensor a b)
instance (Ord a, Ord b) => Ord (Tensor a b)
instance (Show a, Show b) => Show (Tensor a b)
module Math.Algebras.Structures
-- | Monoid
class Mon m
munit :: Mon m => m
mmult :: Mon m => m -> m -> m
-- | Vect k b is a k-algebra
class Algebra k b
unit :: Algebra k b => k -> Vect k b
mult :: Algebra k b => Vect k (Tensor b b) -> Vect k b
-- | Vect k b is a k-coalgebra
class Coalgebra k b
counit :: Coalgebra k b => Vect k b -> k
comult :: Coalgebra k b => Vect k b -> Vect k (Tensor b b)
-- | A bialgebra is an algebra which is also a coalgebra, subject to some
-- compatibility conditions
class (Algebra k b, Coalgebra k b) => Bialgebra k b
class Bialgebra k b => HopfAlgebra k b
antipode :: HopfAlgebra k b => Vect k b -> Vect k b
type Trivial k = Vect k ()
unit' :: (Num k, Algebra k b) => Trivial k -> Vect k b
counit' :: (Num k, Coalgebra k b) => Vect k b -> Trivial k
newtype SetCoalgebra b
SC :: b -> SetCoalgebra b
newtype MonoidCoalgebra m
MC :: m -> MonoidCoalgebra m
class Algebra k a => Module k a m
action :: Module k a m => Vect k (Tensor a m) -> Vect k m
class Coalgebra k c => Comodule k c n
coaction :: Comodule k c n => Vect k n -> Vect k (Tensor c n)
instance [incoherent] Eq m => Eq (MonoidCoalgebra m)
instance [incoherent] Ord m => Ord (MonoidCoalgebra m)
instance [incoherent] Show m => Show (MonoidCoalgebra m)
instance [incoherent] Eq b => Eq (SetCoalgebra b)
instance [incoherent] Ord b => Ord (SetCoalgebra b)
instance [incoherent] Show b => Show (SetCoalgebra b)
instance [incoherent] (Num k, Ord a, Ord m, Ord n, Bialgebra k a, Comodule k a m, Comodule k a n) => Comodule k a (Tensor m n)
instance [incoherent] (Num k, Ord a, Ord u, Ord v, Bialgebra k a, Module k a u, Module k a v) => Module k a (Tensor u v)
instance [incoherent] (Num k, Ord a, Ord u, Ord v, Algebra k a, Module k a u, Module k a v) => Module k (Tensor a a) (Tensor u v)
instance [incoherent] Coalgebra k c => Comodule k c c
instance [incoherent] Algebra k a => Module k a a
instance [incoherent] (Num k, Ord m, Mon m) => Coalgebra k (MonoidCoalgebra m)
instance [incoherent] Num k => Coalgebra k (SetCoalgebra b)
instance [incoherent] (Num k, Ord a, Ord b, Coalgebra k a, Coalgebra k b) => Coalgebra k (Tensor a b)
instance [incoherent] (Num k, Ord a, Ord b, Algebra k a, Algebra k b) => Algebra k (Tensor a b)
instance [incoherent] Num k => Coalgebra k ()
instance [incoherent] Num k => Algebra k ()
instance [incoherent] (Num k, Eq b, Ord b, Show b, Algebra k b) => Num (Vect k b)
module Math.Algebra.Group.StringRewriting
-- | Given a list of rewrite rules of the form (left,right), and a word,
-- rewrite it by repeatedly replacing any left substring in the word by
-- the corresponding right
rewrite :: Eq a => [([a], [a])] -> [a] -> [a]
-- | Implementation of the Knuth-Bendix algorithm. Given a list of
-- relations, return a confluent rewrite system. The algorithm is not
-- guaranteed to terminate.
knuthBendix :: Ord a => [([a], [a])] -> [([a], [a])]
-- | Given generators and a confluent rewrite system, return (normal forms
-- of) all elements
nfs :: Ord a => ([a], [([a], [a])]) -> [[a]]
-- | Given generators and relations, return (normal forms of) all elements
elts :: Ord a => ([a], [([a], [a])]) -> [[a]]
newtype SGen
S :: Int -> SGen
instance Eq SGen
instance Ord SGen
instance Show SGen
module Math.Common.ListSet
module Math.Algebra.Group.PermutationGroup
-- | A type for permutations, considered as functions or actions which can
-- be performed on an underlying set.
newtype Permutation a
P :: (Map a a) -> Permutation a
-- | x .^ g returns the image of a vertex or point x under the action of
-- the permutation g. The dot is meant to be a mnemonic for point or
-- vertex.
(.^) :: Ord k => k -> Permutation k -> k
-- | b -^ g returns the image of an edge or block b under the action of the
-- permutation g. The dash is meant to be a mnemonic for edge or line or
-- block.
(-^) :: Ord t => [t] -> Permutation t -> [t]
-- | Construct a permutation from a list of cycles. For example, p
-- [[1,2,3],[4,5]] returns the permutation that sends 1 to 2, 2 to 3, 3
-- to 1, 4 to 5, 5 to 4
p :: Ord a => [[a]] -> Permutation a
-- | A trick: g^-1 returns the inverse of g
(^-) :: (Ord k, Show k) => Permutation k -> Int -> Permutation k
-- | g ~^ h returns the conjugate of g by h. The tilde is meant to a
-- mnemonic, because conjugacy is an equivalence relation.
(~^) :: (Ord t, Show t) => Permutation t -> Permutation t -> Permutation t
-- | x .^^ gs returns the orbit of the point or vertex x under the action
-- of the gs
(.^^) :: Ord a => a -> [Permutation a] -> [a]
-- | b -^^ gs returns the orbit of the block or edge b under the action of
-- the gs
(-^^) :: Ord t => [t] -> [Permutation t] -> [[t]]
-- | _C n returns generators for Cn, the cyclic group of order n
_C :: Integral a => a -> [Permutation a]
-- | _S n returns generators for Sn, the symmetric group on [1..n]
_S :: Integral a => a -> [Permutation a]
-- | _A n returns generators for An, the alternating group on [1..n]
_A :: Integral a => a -> [Permutation a]
-- | Given generators for a group, return a (sorted) list of all elements
-- of the group. Implemented using a naive closure algorithm, so only
-- suitable for small groups (|G| < 10000)
elts :: (Num a, Ord a) => [a] -> [a]
-- | Given generators for a group, return the order of the group (the
-- number of elements). Implemented using a naive closure algorithm, so
-- only suitable for small groups (|G| < 10000)
order :: (Num a, Ord a) => [a] -> Int
-- | Given a strong generating set, return the order of the group it
-- generates
orderSGS :: Ord a => [Permutation a] -> Integer
-- | conjClassReps gs returns a conjugacy class representatives and sizes
-- for the group generated by gs. This implementation is only suitable
-- for use with small groups (|G| < 10000).
conjClassReps :: (Ord t, Show t) => [Permutation t] -> [(Permutation t, Int)]
-- | Return the subgroups of a group. Only suitable for use on small groups
-- (eg < 100 elts)
subgps :: (Ord a, Show a) => [Permutation a] -> [[Permutation a]]
-- | isNormal gs ks returns True if <ks> is normal in <gs>.
-- Note, it is caller's responsibility to ensure that <ks> is a
-- subgroup of <gs> (ie that each k is in <gs>).
isNormal :: (Ord a, Show a) => [Permutation a] -> [Permutation a] -> Bool
-- | Return the normal subgroups of a group. Only suitable for use on small
-- groups (eg < 100 elts)
normalSubgps :: (Ord a, Show a) => [Permutation a] -> [[Permutation a]]
-- | quotientGp gs ks returns <gs> / <ks>
quotientGp :: (Ord a, Show a) => [Permutation a] -> [Permutation a] -> [Permutation Int]
-- | Synonym for quotientGp
(//) :: (Ord a, Show a) => [Permutation a] -> [Permutation a] -> [Permutation Int]
instance Eq a => Eq (Permutation a)
instance Ord a => Ord (Permutation a)
instance (Ord a, Show a) => Fractional (Permutation a)
instance (Ord a, Show a) => Num (Permutation a)
instance (Ord a, Show a) => Show (Permutation a)
module Math.Algebra.Group.SchreierSims
-- | Given generators for a permutation group, return a strong generating
-- set. The result is calculated using Schreier-Sims algorithm, and is
-- relative to the base implied by the Ord instance
sgs :: (Ord a, Show a) => [Permutation a] -> [Permutation a]
-- | Given generators for a group, determine whether a permutation is a
-- member of the group, using Schreier-Sims algorithm
isMember :: (Ord t, Show t) => [Permutation t] -> Permutation t -> Bool
-- | Given generators for a group, return a (sorted) list of all elements
-- of the group, using Schreier-Sims algorithm
elts :: (Ord t, Show t) => [Permutation t] -> [Permutation t]
-- | Given generators for a group, return the order of the group (the
-- number of elements), using Schreier-Sims algorithm
order :: (Ord t, Show t) => [Permutation t] -> Integer
module Math.Algebra.Group.RandomSchreierSims
initProdRepl :: (Ord a, Show a) => [Permutation a] -> IO (Int, IOArray Int (Permutation a))
nextProdRepl :: (Ord a, Show a) => (Int, IOArray Int (Permutation a)) -> IO (Maybe (Permutation a))
-- | Given generators for a permutation group, return a strong generating
-- set. The result is calculated using random Schreier-Sims algorithm, so
-- has a small (<10^-6) chance of being incomplete. The sgs is
-- relative to the base implied by the Ord instance.
sgs :: (Ord a, Show a) => [Permutation a] -> [Permutation a]
-- | Given a strong generating set gs, isMemberSGS gs is a membership test
-- for the group
isMemberSGS :: (Ord a, Show a) => [Permutation a] -> Permutation a -> Bool
module Math.Algebra.Group.Subquotients
isTransitive :: Ord t => [Permutation t] -> Bool
-- | Given a group gs and a transitive constituent ys, return the kernel
-- and image of the transitive constituent homomorphism. That is, suppose
-- that gs acts on a set xs, and ys is a subset of xs on which gs acts
-- transitively. Then the transitive constituent homomorphism is the
-- restriction of the action of gs to an action on the ys.
transitiveConstituentHomomorphism :: (Ord a, Show a) => [Permutation a] -> [a] -> ([Permutation a], [Permutation a])
-- | Given a transitive group gs, find all non-trivial block systems. That
-- is, if gs act on xs, find all the ways that the xs can be divided into
-- blocks, such that the gs also have a permutation action on the blocks
blockSystems :: Ord t => [Permutation t] -> [[[t]]]
-- | A more efficient version of blockSystems, if we have an sgs
blockSystemsSGS :: Ord a => [Permutation a] -> [[[a]]]
-- | A permutation group is primitive if it has no non-trivial block
-- systems
isPrimitive :: Ord t => [Permutation t] -> Bool
isPrimitiveSGS :: Ord a => [Permutation a] -> Bool
-- | Given a transitive group gs, and a block system for gs, return the
-- kernel and image of the block homomorphism (the homomorphism onto the
-- action of gs on the blocks)
blockHomomorphism :: (Ord t, Show t) => [Permutation t] -> [[t]] -> ([Permutation t], [Permutation [t]])
-- | A module defining a polymorphic data type for (simple, undirected)
-- graphs, together with constructions of some common families of graphs,
-- new from old constructions, and calculation of simple properties of
-- graphs.
module Math.Combinatorics.Graph
-- | combinationsOf k xs returns the subsets of xs of size k. If xs is in
-- ascending order, then the returned list is in ascending order
combinationsOf :: Integral t => t -> [a] -> [[a]]
-- | Datatype for graphs, represented as a list of vertices and a list of
-- edges. Both the list of vertices and the list of edges, and also the
-- 2-element lists representing the edges, are required to be in
-- ascending order, without duplicates.
data Graph a
G :: [a] -> [[a]] -> Graph a
-- | Safe constructor for graph from lists of vertices and edges. graph
-- (vs,es) checks that vs and es are valid before returning the graph.
graph :: Ord t => ([t], [[t]]) -> Graph t
nullGraph :: Graph Int
-- | c n is the cyclic graph on n vertices
c :: Integral t => t -> Graph t
-- | k n is the complete graph on n vertices
k :: Integral t => t -> Graph t
-- | Given a graph with vertices which are lists of small integers, eg
-- [1,2,3], return a graph with vertices which are the numbers obtained
-- by interpreting these as digits, eg 123. The caller is responsible for
-- ensuring that this makes sense (eg that the small integers are all
-- < 10)
fromDigits :: Integral a => Graph [a] -> Graph a
-- | Given a graph with vertices which are lists of 0s and 1s, return a
-- graph with vertices which are the numbers obtained by interpreting
-- these as binary digits. For example, [1,1,0] -> 6.
fromBinary :: Integral a => Graph [a] -> Graph a
-- | The diameter of a graph is maximum distance between two distinct
-- vertices
diameter :: Ord t => Graph t -> Int
-- | The girth of a graph is the size of the smallest cycle that it
-- contains. Note: If the graph contains no cycles, we return -1,
-- representing infinity.
girth :: Eq t => Graph t -> Int
-- | kneser n k returns the kneser graph KG n,k - whose vertices are the
-- k-element subsets of [1..n], with edges joining disjoint subsets
kneser :: Integral t => t -> t -> Graph [t]
instance Eq a => Eq (Graph a)
instance Ord a => Ord (Graph a)
instance Show a => Show (Graph a)
module Math.Algebra.Group.CayleyGraph
data Digraph a
DG :: [a] -> [(a, a)] -> Digraph a
-- | The Cayley graph (undirected) on the generators (and their inverses),
-- for a group given as permutations
cayleyGraphP :: (Ord a, Show a) => [Permutation a] -> Graph (Permutation a)
-- | The Cayley graph (undirected) on the generators (and their inverses),
-- for a group given as generators and relations
cayleyGraphS :: Ord a => ([a], [([a], [a])]) -> Graph [a]
instance Eq a => Eq (Digraph a)
instance Ord a => Ord (Digraph a)
instance Show a => Show (Digraph a)
module Math.Combinatorics.GraphAuts
-- | Given a graph g, graphAuts g returns a strong generating set for the
-- automorphism group of g.
graphAuts :: Ord a => Graph a -> [Permutation a]
module Math.Projects.Rubik
-- | A module defining classes and example instances of categories and
-- tensor categories
module Math.QuantumAlgebra.TensorCategory
class Category c where { data family Ob c :: *; data family Ar c :: *; }
id_ :: Category c => Ob c -> Ar c
source :: Category c => Ar c -> Ob c
target :: Category c => Ar c -> Ob c
(>>>) :: Category c => Ar c -> Ar c -> Ar c
class Category c => TensorCategory c
tunit :: TensorCategory c => Ob c
tob :: TensorCategory c => Ob c -> Ob c -> Ob c
tar :: TensorCategory c => Ar c -> Ar c -> Ar c
class TensorCategory c => StrictTensorCategory c
class TensorCategory c => WeakTensorCategory c
assoc :: WeakTensorCategory c => Ob c -> Ob c -> Ob c
lunit :: WeakTensorCategory c => Ob c -> Ob c
runit :: WeakTensorCategory c => Ob c -> Ob c
data SymmetricGroupoid
data Braid
data Cob2
instance Eq (Ob Cob2)
instance Ord (Ob Cob2)
instance Show (Ob Cob2)
instance Eq (Ar Cob2)
instance Ord (Ar Cob2)
instance Show (Ar Cob2)
instance Eq (Ob Braid)
instance Ord (Ob Braid)
instance Show (Ob Braid)
instance Eq (Ar Braid)
instance Ord (Ar Braid)
instance Show (Ar Braid)
instance Eq (Ob SymmetricGroupoid)
instance Ord (Ob SymmetricGroupoid)
instance Show (Ob SymmetricGroupoid)
instance Eq (Ar SymmetricGroupoid)
instance Ord (Ar SymmetricGroupoid)
instance Show (Ar SymmetricGroupoid)
instance TensorCategory Cob2
instance Category Cob2
instance TensorCategory Braid
instance Category Braid
instance TensorCategory SymmetricGroupoid
instance Category SymmetricGroupoid
module Math.Common.IntegerAsType
class IntegerAsType a
value :: IntegerAsType a => a -> Integer
data M a b
M :: a -> b -> M a b
data TMinus1
data TZero
data TOne
data T2
data T3
data T5
data T7
data T11
data T13
data T17
data T19
data T23
data T29
data T31
data T37
data T41
data T43
data T47
data T53
data T59
data T61
data T67
data T71
data T73
data T79
data T83
data T89
data T97
instance IntegerAsType T97
instance IntegerAsType T89
instance IntegerAsType T83
instance IntegerAsType T79
instance IntegerAsType T73
instance IntegerAsType T71
instance IntegerAsType T67
instance IntegerAsType T61
instance IntegerAsType T59
instance IntegerAsType T53
instance IntegerAsType T47
instance IntegerAsType T43
instance IntegerAsType T41
instance IntegerAsType T37
instance IntegerAsType T31
instance IntegerAsType T29
instance IntegerAsType T23
instance IntegerAsType T19
instance IntegerAsType T17
instance IntegerAsType T13
instance IntegerAsType T11
instance IntegerAsType T7
instance IntegerAsType T5
instance IntegerAsType T3
instance IntegerAsType T2
instance IntegerAsType TOne
instance IntegerAsType TZero
instance IntegerAsType TMinus1
instance (IntegerAsType a, IntegerAsType b) => IntegerAsType (M a b)
module Math.Algebra.Commutative.Monomial
newtype Monomial ord
Monomial :: (Map String Int) -> Monomial ord
-- | Phantom type representing lex term ordering
data Lex
-- | Phantom type representing glex term ordering
data Glex
-- | Phantom type representing grevlex term ordering
data Grevlex
-- | Phantom type for an elimination term ordering. In the ordering, xis
-- come before yjs come before zks, but within the xis, or yjs, or zks,
-- grevlex ordering is used
data Elim
convertM :: Monomial a -> Monomial b
supportM :: Monomial ord -> [Monomial ord]
instance Eq (Monomial ord)
instance Ord (Monomial Elim)
instance Ord (Monomial Grevlex)
instance Ord (Monomial Glex)
instance Ord (Monomial Lex)
instance Fractional (Monomial ord)
instance Num (Monomial ord)
instance Show (Monomial ord)
module Math.Algebra.Field.Base
-- | Q is just the rationals, but with a better show function than the
-- Prelude version
newtype Q
Q :: Rational -> Q
newtype Fp n
Fp :: Integer -> Fp n
class Fractional fq => FiniteField fq
eltsFq :: FiniteField fq => fq -> [fq]
basisFq :: FiniteField fq => fq -> [fq]
-- | F2 is a type for the finite field with 2 elements
type F2 = Fp T2
-- | f2 lists the elements of F2
f2 :: [F2]
-- | F3 is a type for the finite field with 3 elements
type F3 = Fp T3
-- | f3 lists the elements of F3
f3 :: [F3]
-- | F5 is a type for the finite field with 5 elements
type F5 = Fp T5
-- | f5 lists the elements of F5
f5 :: [F5]
-- | F7 is a type for the finite field with 7 elements
type F7 = Fp T7
-- | f7 lists the elements of F7
f7 :: [F7]
type F11 = Fp T11
type F13 = Fp T13
type F17 = Fp T17
type F19 = Fp T19
type F23 = Fp T23
type F29 = Fp T29
type F31 = Fp T31
type F37 = Fp T37
type F41 = Fp T41
type F43 = Fp T43
type F47 = Fp T47
type F53 = Fp T53
type F59 = Fp T59
type F61 = Fp T61
type F67 = Fp T67
type F71 = Fp T71
type F73 = Fp T73
type F79 = Fp T79
type F83 = Fp T83
type F89 = Fp T89
type F97 = Fp T97
instance Eq (Fp n)
instance Ord (Fp n)
instance Eq Q
instance Ord Q
instance Num Q
instance Fractional Q
instance IntegerAsType p => FiniteField (Fp p)
instance IntegerAsType n => Fractional (Fp n)
instance IntegerAsType n => Num (Fp n)
instance Show (Fp n)
instance Show Q
-- | A module providing a type for (commutative) multivariate polynomials,
-- with support for various term orders.
module Math.Algebra.Commutative.MPoly
-- | Type for multivariate polynomials. ord is a phantom type defining how
-- terms are ordered, r is the type of the ring we are working over. For
-- example, a common choice will be MPoly Grevlex Q, meaning polynomials
-- over Q with the grevlex term ordering
newtype MPoly ord r
MP :: [(Monomial ord, r)] -> MPoly ord r
-- | Create a variable with the supplied name. By convention, variable
-- names should usually be a single letter followed by none, one or two
-- digits.
var :: String -> MPoly Grevlex Q
b :: MPoly Grevlex Q
c :: MPoly Grevlex Q
d :: MPoly Grevlex Q
s :: MPoly Grevlex Q
t :: MPoly Grevlex Q
u :: MPoly Grevlex Q
v :: MPoly Grevlex Q
w :: MPoly Grevlex Q
x :: MPoly Grevlex Q
y :: MPoly Grevlex Q
z :: MPoly Grevlex Q
a :: MPoly Grevlex Q
x1 :: MPoly Grevlex Q
x2 :: MPoly Grevlex Q
x3 :: MPoly Grevlex Q
x0 :: MPoly Grevlex Q
-- | Convert a polynomial to lex term ordering
toLex :: MPoly ord k -> MPoly Lex k
-- | Convert a polynomial to glex term ordering
toGlex :: MPoly ord k -> MPoly Glex k
-- | Convert a polynomial to grevlex term ordering
toGrevlex :: MPoly ord k -> MPoly Grevlex k
toElim :: MPoly ord k -> MPoly Elim k
instance Eq r => Eq (MPoly ord r)
instance (Ord (Monomial ord), Fractional r) => Fractional (MPoly ord r)
instance (Ord (Monomial ord), Num r) => Num (MPoly ord r)
instance (Show r, Num r) => Show (MPoly ord r)
instance (Ord (Monomial ord), Ord r) => Ord (MPoly ord r)
module Math.Algebra.Commutative.GBasis
-- | Given a list of polynomials over a field, return a Groebner basis for
-- the ideal generated by the polynomials
gb :: (Ord (Monomial ord), Fractional k, Ord k) => [MPoly ord k] -> [MPoly ord k]
module Math.Algebra.Field.Extension
newtype UPoly a
UP :: [a] -> UPoly a
quotRemUP :: (Num k, Fractional k) => UPoly k -> UPoly k -> (UPoly k, UPoly k)
class PolynomialAsType k poly
pvalue :: PolynomialAsType k poly => (k, poly) -> UPoly k
data ExtensionField k poly
Ext :: (UPoly k) -> ExtensionField k poly
data ConwayF4
type F4 = ExtensionField F2 ConwayF4
data ConwayF8
type F8 = ExtensionField F2 ConwayF8
data ConwayF9
type F9 = ExtensionField F3 ConwayF9
data ConwayF16
type F16 = ExtensionField F2 ConwayF16
data ConwayF25
type F25 = ExtensionField F5 ConwayF25
data ConwayF27
type F27 = ExtensionField F3 ConwayF27
data ConwayF32
type F32 = ExtensionField F2 ConwayF32
data Sqrt a
Sqrt :: a -> Sqrt a
type QSqrt2 = ExtensionField Q (Sqrt T2)
type QSqrt3 = ExtensionField Q (Sqrt T3)
type QSqrt5 = ExtensionField Q (Sqrt T5)
type QSqrt7 = ExtensionField Q (Sqrt T7)
type QSqrtMinus1 = ExtensionField Q (Sqrt TMinus1)
type QSqrtMinus2 = ExtensionField Q (Sqrt (M TMinus1 T2))
type QSqrtMinus3 = ExtensionField Q (Sqrt (M TMinus1 T3))
type QSqrtMinus5 = ExtensionField Q (Sqrt (M TMinus1 T5))
conjugate :: ExtensionField Q (Sqrt d) -> ExtensionField Q (Sqrt d)
instance Eq k => Eq (ExtensionField k poly)
instance Ord k => Ord (ExtensionField k poly)
instance Eq a => Eq (UPoly a)
instance Ord a => Ord (UPoly a)
instance IntegerAsType n => PolynomialAsType Q (Sqrt n)
instance PolynomialAsType F2 ConwayF32
instance PolynomialAsType F3 ConwayF27
instance PolynomialAsType F5 ConwayF25
instance PolynomialAsType F2 ConwayF16
instance PolynomialAsType F3 ConwayF9
instance PolynomialAsType F2 ConwayF8
instance PolynomialAsType F2 ConwayF4
instance (FiniteField k, PolynomialAsType k poly) => FiniteField (ExtensionField k poly)
instance (Num k, Fractional k, PolynomialAsType k poly) => Fractional (ExtensionField k poly)
instance (Num k, Fractional k, PolynomialAsType k poly) => Num (ExtensionField k poly)
instance Num k => Show (ExtensionField k poly)
instance Num a => Num (UPoly a)
instance (Show a, Num a) => Show (UPoly a)
-- | A module providing a type for non-commutative polynomials.
module Math.Algebra.NonCommutative.NCPoly
newtype Monomial v
M :: [v] -> Monomial v
newtype NPoly r v
NP :: [(Monomial v, r)] -> NPoly r v
data Var
X :: Var
Y :: Var
Z :: Var
-- | Create a non-commutative variable for use in forming non-commutative
-- polynomials. For example, we could define x = var x, y = var
-- y. Then x*y /= y*x.
var :: Num k => v -> NPoly k v
class Invertible a
inv :: Invertible a => a -> a
instance Eq Var
instance Ord Var
instance (Eq r, Eq v) => Eq (NPoly r v)
instance Eq v => Eq (Monomial v)
instance Show Var
instance (Ord v, Show v, Fractional r) => Fractional (NPoly r v)
instance (Ord v, Show v, Num r) => Num (NPoly r v)
instance (Show r, Eq v, Show v) => Show (NPoly r v)
instance (Ord r, Ord v) => Ord (NPoly r v)
instance (Eq v, Show v) => Num (Monomial v)
instance (Eq v, Show v) => Show (Monomial v)
instance Ord v => Ord (Monomial v)
module Math.Algebra.NonCommutative.GSBasis
module Math.Algebra.NonCommutative.TensorAlgebra
data Basis
E :: Int -> Basis
data WeylGens
X :: Int -> WeylGens
D :: Int -> WeylGens
instance Eq WeylGens
instance Ord WeylGens
instance Eq Basis
instance Ord Basis
instance Show WeylGens
instance Show Basis
-- | A module defining the algebra of commutative polynomials over a field
-- k
module Math.Algebras.Commutative
data GlexMonomial v
Glex :: Int -> [(v, Int)] -> GlexMonomial v
type GlexPoly k v = Vect k (GlexMonomial v)
class Monomial m
var :: Monomial m => v -> Vect Q (m v)
powers :: Monomial m => m v -> [(v, Int)]
-- | In effect, we have (Num k, Monomial m) => Monad (v -> Vect k (m
-- v)), with return = var, and (>>=) = bind. However, we can't
-- express this directly in Haskell, firstly because of the Ord b
-- constraint, secondly because Haskell doesn't support type functions.
bind :: (Monomial m, Num k, Ord b, Show b, Algebra k b) => Vect k (m v) -> (v -> Vect k b) -> Vect k b
class DivisionBasis b
dividesB :: DivisionBasis b => b -> b -> Bool
divB :: DivisionBasis b => b -> b -> b
(%%) :: (Fractional k, Ord b, Show b, Algebra k b, DivisionBasis b) => Vect k b -> [Vect k b] -> Vect k b
instance Eq v => Eq (GlexMonomial v)
instance Ord v => DivisionBasis (GlexMonomial v)
instance Monomial GlexMonomial
instance (Num k, Ord v) => Algebra k (GlexMonomial v)
instance Show v => Show (GlexMonomial v)
instance Ord v => Ord (GlexMonomial v)
-- | A module defining the affine plane and its symmetries
module Math.Algebras.AffinePlane
data XY
X :: XY
Y :: XY
data ABCD
A :: ABCD
B :: ABCD
C :: ABCD
D :: ABCD
b :: Monomial m => Vect Q (m ABCD)
c :: Monomial m => Vect Q (m ABCD)
d :: Monomial m => Vect Q (m ABCD)
a :: Monomial m => Vect Q (m ABCD)
newtype SL2 v
SL2 :: (GlexMonomial v) -> SL2 v
instance Eq v => Eq (SL2 v)
instance Ord v => Ord (SL2 v)
instance Eq ABCD
instance Ord ABCD
instance Eq XY
instance Ord XY
instance HopfAlgebra Q (SL2 ABCD)
instance Bialgebra Q (SL2 ABCD)
instance Coalgebra Q (SL2 ABCD)
instance Monomial SL2
instance Algebra Q (SL2 ABCD)
instance Show v => Show (SL2 v)
instance Show ABCD
instance Show XY
module Math.Algebras.GroupAlgebra
type GroupAlgebra k = Vect k (Permutation Int)
ip :: [[Int]] -> GroupAlgebra Q
instance Num k => Module k (Permutation Int) Int
instance Num k => HopfAlgebra k (Permutation Int)
instance Num k => Bialgebra k (Permutation Int)
instance Num k => Coalgebra k (Permutation Int)
instance Num k => Algebra k (Permutation Int)
instance Mon (Permutation Int)
module Math.Algebras.LaurentPoly
data LaurentMonomial
LM :: Int -> [(String, Int)] -> LaurentMonomial
type LaurentPoly k = Vect k LaurentMonomial
instance Eq LaurentMonomial
instance Ord LaurentMonomial
instance Fractional k => Fractional (LaurentPoly k)
instance Num k => Algebra k LaurentMonomial
instance Mon LaurentMonomial
instance Show LaurentMonomial
module Math.Algebras.Matrix
data Mat2
E2 :: Int -> Int -> Mat2
data Mat2'
E2' :: Int -> Int -> Mat2'
data M3
E3 :: Int -> Int -> M3
instance Eq M3
instance Ord M3
instance Show M3
instance Eq Mat2'
instance Ord Mat2'
instance Show Mat2'
instance Eq Mat2
instance Ord Mat2
instance Show Mat2
instance Num k => Algebra k M3
instance Num k => Coalgebra k Mat2'
instance Num k => Module k Mat2 EBasis
instance Num k => Algebra k Mat2
-- | A module defining the algebra of non-commutative polynomials over a
-- field k
module Math.Algebras.NonCommutative
data NonComMonomial v
NCM :: Int -> [v] -> NonComMonomial v
class Monomial m
var :: Monomial m => v -> Vect Q (m v)
powers :: (Monomial m, Eq v) => m v -> [(v, Int)]
type NCPoly v = Vect Q (NonComMonomial v)
class DivisionBasis m
divM :: DivisionBasis m => m -> m -> Maybe (m, m)
instance Eq v => Eq (NonComMonomial v)
instance Eq v => DivisionBasis (NonComMonomial v)
instance Monomial NonComMonomial
instance (Num k, Ord v) => Algebra k (NonComMonomial v)
instance Mon (NonComMonomial v)
instance (Eq v, Show v) => Show (NonComMonomial v)
instance Ord v => Ord (NonComMonomial v)
module Math.Algebras.Quaternions
data HBasis
One :: HBasis
I :: HBasis
J :: HBasis
K :: HBasis
type Quaternion k = Vect k HBasis
j :: Num k => Quaternion k
k :: Num k => Quaternion k
i :: Num k => Quaternion k
instance Eq HBasis
instance Ord HBasis
instance Num k => Coalgebra k HBasis
instance Num k => Algebra k HBasis
instance Show HBasis
-- | A module defining the tensor algebra, symmetric algebra, and exterior
-- (or alternating) algebra
module Math.Algebras.TensorAlgebra
data TensorAlgebra a
TA :: Int -> [a] -> TensorAlgebra a
data SymmetricAlgebra a
Sym :: Int -> [a] -> SymmetricAlgebra a
data ExteriorAlgebra a
Ext :: Int -> [a] -> ExteriorAlgebra a
instance Eq a => Eq (ExteriorAlgebra a)
instance Ord a => Ord (ExteriorAlgebra a)
instance Show a => Show (ExteriorAlgebra a)
instance Eq a => Eq (SymmetricAlgebra a)
instance Ord a => Ord (SymmetricAlgebra a)
instance Show a => Show (SymmetricAlgebra a)
instance Eq a => Eq (TensorAlgebra a)
instance Ord a => Ord (TensorAlgebra a)
instance Show a => Show (TensorAlgebra a)
instance (Num k, Ord a) => Algebra k (ExteriorAlgebra a)
instance (Num k, Ord a) => Algebra k (SymmetricAlgebra a)
instance Ord a => Mon (SymmetricAlgebra a)
instance (Num k, Ord a) => Algebra k (TensorAlgebra a)
instance Mon (TensorAlgebra a)
module Math.Projects.KnotTheory.LaurentMPoly
newtype LaurentMonomial
LM :: (Map String Q) -> LaurentMonomial
newtype LaurentMPoly r
LP :: [(LaurentMonomial, r)] -> LaurentMPoly r
instance Eq r => Eq (LaurentMPoly r)
instance Ord r => Ord (LaurentMPoly r)
instance Eq LaurentMonomial
instance Fractional r => Fractional (LaurentMPoly r)
instance Num r => Num (LaurentMPoly r)
instance Show r => Show (LaurentMPoly r)
instance Fractional LaurentMonomial
instance Num LaurentMonomial
instance Show LaurentMonomial
instance Ord LaurentMonomial
module Math.Projects.KnotTheory.Braid
type LPQ = LaurentMPoly Q
data BraidGens
S :: Int -> BraidGens
instance Eq BraidGens
instance Ord BraidGens
instance Invertible (NPoly LPQ BraidGens)
instance Show BraidGens
instance Invertible LPQ
module Math.Projects.KnotTheory.TemperleyLieb
data TemperleyLiebGens
E :: Int -> TemperleyLiebGens
instance Eq TemperleyLiebGens
instance Ord TemperleyLiebGens
instance Show TemperleyLiebGens
module Math.Projects.KnotTheory.IwahoriHecke
data IwahoriHeckeGens
T :: Int -> IwahoriHeckeGens
instance Eq IwahoriHeckeGens
instance Ord IwahoriHeckeGens
instance Invertible (NPoly LPQ IwahoriHeckeGens)
instance Show IwahoriHeckeGens
module Math.QuantumAlgebra.OrientedTangle
data Oriented
Plus :: Oriented
Minus :: Oriented
data HorizDir
ToL :: HorizDir
ToR :: HorizDir
data OrientedTangle
instance Eq (Ob OrientedTangle)
instance Ord (Ob OrientedTangle)
instance Show (Ob OrientedTangle)
instance Eq (Ar OrientedTangle)
instance Ord (Ar OrientedTangle)
instance Show (Ar OrientedTangle)
instance Eq HorizDir
instance Ord HorizDir
instance Show HorizDir
instance Eq Oriented
instance Ord Oriented
instance Show Oriented
instance TensorCategory OrientedTangle
instance Category OrientedTangle
-- | A module defining the quantum plane and its symmetries
module Math.QuantumAlgebra.QuantumPlane
newtype Aq20 v
Aq20 :: (NonComMonomial v) -> Aq20 v
newtype Aq02 v
Aq02 :: (NonComMonomial v) -> Aq02 v
newtype M2q v
M2q :: (NonComMonomial v) -> M2q v
newtype SL2q v
SL2q :: (NonComMonomial v) -> SL2q v
instance Eq v => Eq (SL2q v)
instance Ord v => Ord (SL2q v)
instance Eq v => Eq (M2q v)
instance Ord v => Ord (M2q v)
instance Eq v => Eq (Aq02 v)
instance Ord v => Ord (Aq02 v)
instance Eq v => Eq (Aq20 v)
instance Ord v => Ord (Aq20 v)
instance HopfAlgebra (LaurentPoly Q) (SL2q String)
instance Bialgebra (LaurentPoly Q) (SL2q String)
instance Coalgebra (LaurentPoly Q) (SL2q String)
instance Algebra (LaurentPoly Q) (SL2q String)
instance Monomial SL2q
instance (Eq v, Show v) => Show (SL2q v)
instance Comodule (LaurentPoly Q) (M2q String) (Aq20 String)
instance Bialgebra (LaurentPoly Q) (M2q String)
instance Coalgebra (LaurentPoly Q) (M2q String)
instance Algebra (LaurentPoly Q) (M2q String)
instance Monomial M2q
instance (Eq v, Show v) => Show (M2q v)
instance Algebra (LaurentPoly Q) (Aq02 String)
instance Monomial Aq02
instance (Eq v, Show v) => Show (Aq02 v)
instance Algebra (LaurentPoly Q) (Aq20 String)
instance Monomial Aq20
instance (Eq v, Show v) => Show (Aq20 v)
-- | A module defining the category of tangles, and representations into
-- the category of vector spaces (specifically, knot invariants).
module Math.QuantumAlgebra.Tangle
data Tangle
data Oriented
Plus :: Oriented
Minus :: Oriented
type TangleRep b = Vect (LaurentPoly Q) b
cap :: [Oriented] -> TangleRep [Oriented]
cup :: [Oriented] -> TangleRep [Oriented]
over :: [Oriented] -> TangleRep [Oriented]
under :: [Oriented] -> TangleRep [Oriented]
kauffman :: Ar Tangle -> TangleRep [Oriented] -> TangleRep [Oriented]
instance Eq (Ob Tangle)
instance Ord (Ob Tangle)
instance Show (Ob Tangle)
instance Eq (Ar Tangle)
instance Ord (Ar Tangle)
instance Show (Ar Tangle)
instance Eq Oriented
instance Ord Oriented
instance Show Oriented
instance TensorCategory Tangle
instance Category Tangle
instance (Num k, Ord a) => Algebra k [a]
instance Mon [a]
-- | A module providing elementary operations involving scalars, vectors,
-- and matrices over a ring or field. Vectors are represented as [a],
-- matrices as [[a]]. (No distinction is made between row and column
-- vectors.) It is the caller's responsibility to ensure that the lists
-- have the correct number of elements.
--
-- The mnemonic for many of the arithmetic operations is that the number
-- of angle brackets on each side indicates the dimension of the argument
-- on that side. For example, v <*>> m is multiplication of a
-- vector on the left by a matrix on the right.
module Math.Algebra.LinearAlgebra
-- | u <+> v returns the sum u+v of vectors
(<+>) :: Num a => [a] -> [a] -> [a]
-- | u <-> v returns the difference u-v of vectors
(<->) :: Num a => [a] -> [a] -> [a]
-- | k *> v returns the product k*v of the scalar k and the vector v
(*>) :: Num a => a -> [a] -> [a]
-- | u <.> v returns the dot product of vectors (also called inner or
-- scalar product)
(<.>) :: Num a => [a] -> [a] -> a
-- | u <*> v returns the tensor product of vectors (also called outer
-- or matrix product)
(<*>) :: Num a => [a] -> [a] -> [[a]]
-- | a <<+>> b returns the sum a+b of matrices
(<<+>>) :: Num a => [[a]] -> [[a]] -> [[a]]
-- | a <<->> b returns the difference a-b of matrices
(<<->>) :: Num a => [[a]] -> [[a]] -> [[a]]
-- | a <<*>> b returns the product a*b of matrices
(<<*>>) :: Num a => [[a]] -> [[a]] -> [[a]]
-- | k *> m returns the product k*m of the scalar k and the matrix m
(*>>) :: Num a => a -> [[a]] -> [[a]]
-- | m <<*> v is multiplication of a vector by a matrix on the
-- left
(<<*>) :: Num a => [[a]] -> [a] -> [a]
-- | v <*>> m is multiplication of a vector by a matrix on the
-- right
(<*>>) :: Num a => [a] -> [[a]] -> [a]
-- | iMx n is the n*n identity matrix
iMx :: Num t => Int -> [[t]]
-- | jMx n is the n*n matrix of all 1s
jMx :: Num t => Int -> [[t]]
-- | zMx n is the n*n matrix of all 0s
zMx :: Num t => Int -> [[t]]
-- | The inverse of a matrix (over a field), if it exists
inverse :: Fractional a => [[a]] -> Maybe [[a]]
reducedRowEchelonForm :: Fractional a => [[a]] -> [[a]]
-- | The determinant of a matrix (over a field)
det :: Fractional a => [[a]] -> a
-- | Constructions of the finite geometries AG(n,Fq) and PG(n,Fq), their
-- points, lines and flats, together with the incidence graphs between
-- points and lines.
module Math.Combinatorics.FiniteGeometry
-- | ptsAG n fq returns the points of the affine geometry AG(n,Fq), where
-- fq are the elements of Fq
ptsAG :: FiniteField a => Int -> [a] -> [[a]]
-- | ptsPG n fq returns the points of the projective geometry PG(n,Fq),
-- where fq are the elements of Fq
ptsPG :: FiniteField a => Int -> [a] -> [[a]]
data ZeroOneStar
Zero :: ZeroOneStar
One :: ZeroOneStar
Star :: ZeroOneStar
-- | flatsPG n fq k returns the k-flats in PG(n,Fq), where fq are the
-- elements of Fq
flatsPG :: FiniteField a => Int -> [a] -> Int -> [[[a]]]
-- | flatsAG n fq k returns the k-flats in AG(n,Fq), where fq are the
-- elements of Fq
flatsAG :: FiniteField a => Int -> [a] -> Int -> [[[a]]]
-- | The lines (1-flats) in PG(n,fq)
linesPG :: FiniteField a => Int -> [a] -> [[[a]]]
-- | The lines (1-flats) in AG(n,fq)
linesAG :: FiniteField a => Int -> [a] -> [[[a]]]
-- | Incidence graph of PG(n,fq), considered as an incidence structure
-- between points and lines
incidenceGraphPG :: (Ord a, FiniteField a) => Int -> [a] -> Graph (Either [a] [[a]])
-- | Incidence graph of AG(n,fq), considered as an incidence structure
-- between points and lines
incidenceGraphAG :: (Ord a, FiniteField a) => Int -> [a] -> Graph (Either [a] [[a]])
instance Eq ZeroOneStar
instance Show ZeroOneStar
module Math.Combinatorics.Design
data Design a
D :: [a] -> [[a]] -> Design a
-- | The incidence matrix of a design, with rows indexed by blocks and
-- columns by points. (Note that in the literature, the opposite
-- convention is sometimes used instead.)
incidenceMatrix :: Eq t => Design t -> [[Int]]
-- | The affine plane AG(2,Fq), a 2-(q^2,q,1) design
ag2 :: (FiniteField k, Ord k) => [k] -> Design [k]
-- | The projective plane PG(2,Fq), a square 2-(q^2+q+1,q+1,1) design
pg2 :: (FiniteField k, Ord k) => [k] -> Design [k]
-- | The dual of a design
dual :: Ord t => Design t -> Design [t]
derivedDesign :: Ord t => Design t -> t -> Design t
pointResidual :: Ord t => Design t -> t -> Design t
blockResidual :: Ord t => Design t -> [t] -> Design t
-- | The incidence graph of a design
incidenceGraph :: Ord a => Design a -> Graph (Either a [a])
-- | Find a strong generating set for the automorphism group of a design
designAuts :: Ord t => Design t -> [Permutation t]
-- | Generators for the Mathieu group M24, a finite simple group of order
-- 244823040
m24 :: [Permutation Integer]
-- | A strong generating set for the Mathieu group M24, a finite simple
-- group of order 244823040
m24sgs :: [Permutation Integer]
-- | A strong generating set for the Mathieu group M23, a finite simple
-- group of order 10200960
m23sgs :: [Permutation Integer]
-- | A strong generating set for the Mathieu group M22, a finite simple
-- group of order 443520
m22sgs :: [Permutation Integer]
-- | The Steiner system S(5,8,24), with 759 blocks, whose automorphism
-- group is M24
s_5_8_24 :: Design Integer
-- | The Steiner system S(4,7,23), with 253 blocks, whose automorphism
-- group is M23
s_4_7_23 :: Design Integer
-- | The Steiner system S(3,6,22), with 77 blocks, whose automorphism group
-- is M22
s_3_6_22 :: Design Integer
-- | The Steiner system S(5,6,12), with 132 blocks, whose automorphism
-- group is M12
s_5_6_12 :: Design Integer
-- | The Steiner system S(4,5,11), with 66 blocks, whose automorphism group
-- is M11
s_4_5_11 :: Design Integer
-- | Generators for the Mathieu group M12, a finite simple group of order
-- 95040
m12 :: [Permutation Integer]
-- | A strong generating set for the Mathieu group M12, a finite simple
-- group of order 95040
m12sgs :: [Permutation Integer]
-- | A strong generating set for the Mathieu group M11, a finite simple
-- group of order 7920
m11sgs :: [Permutation Integer]
instance Eq a => Eq (Design a)
instance Ord a => Ord (Design a)
instance Show a => Show (Design a)
-- | A module defining various strongly regular graphs, including the
-- Clebsch, Hoffman-Singleton, Higman-Sims, and McLaughlin graphs
module Math.Combinatorics.StronglyRegularGraph
data DesignVertex
C :: DesignVertex
P :: Integer -> DesignVertex
B :: [Integer] -> DesignVertex
instance Eq DesignVertex
instance Ord DesignVertex
instance Show DesignVertex
-- | A module defining a type for hypergraphs.
module Math.Combinatorics.Hypergraph
data Hypergraph a
H :: [a] -> [[a]] -> Hypergraph a
-- | Is this hypergraph uniform - meaning that all blocks are of the same
-- size
isUniform :: Ord a => Hypergraph a -> Bool
incidenceGraph :: Ord a => Hypergraph a -> Graph (Either a [a])
isPartialLinearSpace :: Ord a => Hypergraph a -> Bool
-- | Is this hypergraph a projective plane - meaning that any two lines
-- meet in a unique point, and any two points lie on a unique line
isProjectivePlane :: Ord a => Hypergraph a -> Bool
-- | Is this hypergraph a projective plane with a triangle. This is a weak
-- non-degeneracy condition, which eliminates all points on the same
-- line, or all lines through the same point.
isProjectivePlaneTri :: Ord a => Hypergraph a -> Bool
-- | Is this hypergraph a projective plane with a quadrangle. This is a
-- stronger non-degeneracy condition.
isProjectivePlaneQuad :: Ord a => Hypergraph a -> Bool
isGeneralizedQuadrangle :: Ord a => Hypergraph a -> Bool
-- | Is this hypergraph a (projective) configuration.
isConfiguration :: Ord a => Hypergraph a -> Bool
fanoPlane :: Hypergraph Integer
-- | The Heawood graph is the incidence graph of the Fano plane
heawoodGraph :: Graph (Either Integer [Integer])
desarguesConfiguration :: Hypergraph [Integer]
desarguesGraph :: Graph (Either [Integer] [[Integer]])
pappusConfiguration :: Hypergraph Integer
pappusGraph :: Graph (Either Integer [Integer])
coxeterGraph :: Graph [Integer]
-- | The Tutte-Coxeter graph, also called the Tutte 8-cage
tutteCoxeterGraph :: Graph (Either [Integer] [[Integer]])
instance Eq a => Eq (Hypergraph a)
instance Ord a => Ord (Hypergraph a)
instance Show a => Show (Hypergraph a)
module Math.Combinatorics.LatinSquares
findLatinSqs :: Eq a => [a] -> [[[a]]]
isLatinSq :: Ord a => [[a]] -> Bool
-- | Are the two latin squares orthogonal?
isOrthogonal :: (Ord a, Ord b) => [[a]] -> [[b]] -> Bool
-- | Are the latin squares mutually orthogonal (ie each pair is
-- orthogonal)?
isMOLS :: Ord a => [[[a]]] -> Bool
-- | MOLS from a projective plane
fromProjectivePlane :: (Ord k, Num k) => Design [k] -> [[[Int]]]
module Math.Projects.RootSystem
data Type
A :: Type
B :: Type
C :: Type
D :: Type
E :: Type
F :: Type
G :: Type
basisElt :: Int -> Int -> [Q]
module Math.Projects.ChevalleyGroup.Classical
-- | The special linear group SL(n,Fq), generated by elementary
-- transvections, returned as matrices
sl :: FiniteField k => Int -> [k] -> [[[k]]]
-- | The projective special linear group PSL(n,Fq) == A(n,Fq) ==
-- SL(n,Fq)/Z, returned as permutations of the points of PG(n-1,Fq). This
-- is a finite simple group provided n>2 or q>3.
l :: (FiniteField k, Ord k) => Int -> [k] -> [Permutation [k]]
-- | The symplectic group Sp(2n,Fq), returned as matrices
sp2 :: FiniteField k => Int -> [k] -> [[[k]]]
-- | The projective symplectic group PSp(2n,Fq) == Cn(Fq) == Sp(2n,Fq)/Z,
-- returned as permutations of the points of PG(2n-1,Fq). This is a
-- finite simple group for n>1, except for PSp(4,F2).
s2 :: (FiniteField k, Ord k) => Int -> [k] -> [Permutation [k]]
module Math.Projects.MiniquaternionGeometry
data F9
F9 :: F3 -> F3 -> F9
data J9
J9 :: F9 -> J9
instance Eq J9
instance Ord J9
instance Eq F9
instance Ord F9
instance Arbitrary J9
instance Arbitrary F9
instance FiniteField J9
instance Fractional J9
instance Num J9
instance Show J9
instance FiniteField F9
instance Fractional F9
instance Num F9
instance Show F9
module Math.Projects.ChevalleyGroup.Exceptional
newtype Octonion k
O :: [(Int, k)] -> Octonion k
i1 :: Octonion Q
i2 :: Octonion Q
i3 :: Octonion Q
i4 :: Octonion Q
i5 :: Octonion Q
i6 :: Octonion Q
i0 :: Octonion Q
-- | Generators for G2(3), a finite simple group of order 4245696, as a
-- permutation group on the 702 unit imaginary octonions over F3
g2_3 :: [Permutation (Octonion F3)]
instance Eq k => Eq (Octonion k)
instance Ord k => Ord (Octonion k)
instance (Ord k, Num k, Fractional k) => Fractional (Octonion k)
instance (Ord k, Num k) => Num (Octonion k)
instance Show k => Show (Octonion k)