?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !!!!!!!""""""""##########$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& & & ' ' ''''''''''''((((((( (!("(#($(%(&('((()(*)+),)-).)/)0)1)2)3)4)5)6)7)8*9*:*;*<*=*>*?*@*A*B*C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z,[,\,],^,_,`,a,b,c,d,e,f,g,h,i,j,k,l-m-n-o-p.q.r.s.t.u/v/w/x/y/z/{/|/}/~///////00000000000011111111111111111111111111111111111111111111111111111111111111111111111111112222222223333444455555555558A (lazy) list of the primes eIs this number prime? The algorithm consists of using trial division to test for very small factors, ? followed if necessary by the Miller-Rabin probabilistic test.  Given n,  prevPrime n returns the greatest p, p < n, such that p is prime  Given n,  nextPrime n2 returns the least p, p > n, such that p is prime  1List the prime factors of n (with multiplicity). X The algorithm uses trial division, followed by the elliptic curve method if necessary. S The running time increases with the size of the second largest prime factor of n. ^ It can find 10-digit prime factors in seconds, but can struggle with 20-digit prime factors.            Given a set xs", represented as an ordered list, powersetdfs xs5 returns the list of all subsets of xs, in lex order  Given a set xs", represented as an ordered list, powersetbfs xs: returns the list of all subsets of xs, in shortlex order Given a positive integer k , and a set xs, represented as a list,  combinationsOf k xs& returns all k-element subsets of xs. C The result will be in lex order, relative to the order of the xs.  choose n kE is the number of ways of choosing k distinct elements from an n-set    eA digraph is represented as DG vs es, where vs is the list of vertices, and es is the list of edges. > Edges are directed: an edge (u,v) means an edge from u to v. X A digraph is considered to be in normal form if both es and vs are in ascending order. \ This is the preferred form, and some functions will only work for digraphs in normal form. Are the two DAGs isomorphic? cGiven a directed acyclic graph (DAG), return a canonical representative for its isomorphism class.   isoRepDAG dag is isomorphic to dag. It follows that if  isoRepDAG dagA == isoRepDAG dagB then dagA is isomorphic to dagB.  Conversely,  isoRepDAG dagO is the minimal element in the isomorphism class, subject to some constraints.  It follows that if dagA is isomorphic to dagB, then  isoRepDAG dagA == isoRepDAG dagB. NThe algorithm of course is faster on some DAGs than others: roughly speaking,  it prefers "tall" DAGs (long chains) to "wide" DAGs (long antichains), M and it prefers asymmetric DAGs (ie those with smaller automorphism groups).  !"#$%&Given a finite vector space basis b, Dual b represents a basis for the dual vector space. (If b is infinite, then Dual b is only a sub-basis.) rTrivial k is the field k considered as a k-vector space. In maths, we would not normally make a distinction here, _ but in the code, we need this if we want to be able to put k as one side of a tensor product. xGiven 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. I Elements of Vect k b consist of k-linear combinations of elements of b. The zero vector Addition of vectors "Addition of vectors (same as add) Sum of a list of vectors Negation of vector Subtraction of vectors $Scalar multiplication (on the left) !Same as smultL. Mnemonic is " multiply through (from the left)" "#Scalar multiplication on the right #Same as smultR. Mnemonic is "!multiply through (from the right)" $wConvert an element of Vect k b into normal form. Normal form consists in having the basis elements in ascending order, 3 with no duplicates, and all coefficients non-zero %kA linear map between vector spaces A and B can be defined by giving its action on the basis elements of A. < The action on all elements of A then follows by linearity. qIf we have A = Vect k a, B = Vect k b, and f :: a -> Vect k b is a function from the basis elements of A into B,  then linear f3 is the linear map that this defines by linearity. &'(%'()* !"#$%+,-.&'/012(345 !"#$%&'( !"#$%&'()IA type for constructing a basis for the tensor product of vector spaces. D The tensor product of Vect k a and Vect k b is Vect k (Tensor a b) *EA type for constructing a basis for the direct sum of vector spaces. > The direct sum of Vect k a and Vect k b is Vect k (DSum a b) +*Injection of left summand into direct sum ,+Injection of right summand into direct sum ->The coproduct of two linear functions (with the same target). W Satisfies the universal property that f == coprodf f g . i1 and g == coprodf f g . i2 .-Projection onto left summand from direct sum /.Projection onto right summand from direct sum 0<The product of two linear functions (with the same source). S Satisfies the universal property that f == p1 . prodf f g and g == p2 . prodf f g 1,The direct sum of two vector space elements 2(The direct sum of two linear functions. ] Satisfies the universal property that f == p1 . dsumf f g . i1 and g == p2 . dsumf f g . i2 30The tensor product of two vector space elements 4+The tensor product of two linear functions 56789:;<=>?@A)*+,-./0123456789:;<=>?@6A*+,-./012)3456789:;<=>?@A)*+,-./0123456789:;<=>?@ABCDEFGHIJKL]A bialgebra is an algebra which is also a coalgebra, subject to the compatibility conditions t that counit and comult must be algebra morphisms (or equivalently, that unit and mult must be coalgebra morphisms) MeAn instance declaration for Coalgebra k b is saying that the vector space Vect k b is a k-coalgebra. NOPrCaution: If we declare an instance Algebra k b, then we are saying that the vector space Vect k b is a k-algebra. k In other words, we are saying that b is the basis for a k-algebra. So a more accurate name for this class  would have been AlgebraBasis. QRSMonoid TUVW7VThe tensor product of k-coalgebras can itself be given the structure of a k-coalgebra 8RThe tensor product of k-algebras can itself be given the structure of a k-algebra 9SThe direct sum of k-coalgebras can itself be given the structure of a k-coalgebra. ? This is the coproduct object in the category of k-coalgebras. :OThe direct sum of k-algebras can itself be given the structure of a k-algebra. ; This is the product object in the category of k-algebras. BCDEFGHIJKLMNOPQRSTUVW;STUPQRMNOLJKVWHIFGDEBCBCCDEEFGGHIIJKKLMNONOPQRQRSTUTUVWXYZDGiven 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 [lImplementation of the Knuth-Bendix algorithm. Given a list of relations, return a confluent rewrite system. / The algorithm is not guaranteed to terminate. \WGiven generators and a confluent rewrite system, return (normal forms of) all elements ]FGiven generators and relations, return (normal forms of) all elements XYZ<=>?@ABCD[\]EFGHIJKLZ[\]XYXYYZ[\]6MNOPQRST ^iA type for permutations, considered as functions or actions which can be performed on an underlying set. _`Wx .^ g returns the image of a vertex or point x under the action of the permutation g. 8 The dot is meant to be a mnemonic for point or vertex. aVb -^ 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. b/Construct a permutation from a list of cycles.  For example, p [[1,2,3],[4,5]]K returns the permutation that sends 1 to 2, 2 to 3, 3 to 1, 4 to 5, 5 to 4 c'A trick: g^-1 returns the inverse of g d(g ~^ h returns the conjugate of g by h. Q The tilde is meant to a mnemonic, because conjugacy is an equivalence relation. eOx .^^ gs returns the orbit of the point or vertex x under the action of the gs fMb -^^ gs returns the orbit of the block or edge b under the action of the gs g<_C n returns generators for Cn, the cyclic group of order n h<_S n returns generators for Sn, the symmetric group on [1..n] i>_A n returns generators for An, the alternating group on [1..n] jSGiven generators for a group, return a (sorted) list of all elements of the group. U Implemented using a naive closure algorithm, so only suitable for small groups (|G| < 10000) kVGiven generators for a group, return the order of the group (the number of elements). U Implemented using a naive closure algorithm, so only suitable for small groups (|G| < 10000) lJGiven a strong generating set, return the order of the group it generates mdconjClassReps gs returns a conjugacy class representatives and sizes for the group generated by gs. E This implementation is only suitable for use with small groups (|G| < 10000). nKReturn the subgroups of a group. Only suitable for use on small groups (eg < 100 elts) oisNormal 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>). pRReturn the normal subgroups of a group. Only suitable for use on small groups (eg < 100 elts) qquotientGp gs ks returns <gs> / <ks> rSynonym for quotientGp R^_UVWXYZ`a[b\]^_`acdbcdeefgfhijkglmhinopqrstjukvwxyzl{|}m~nopqr^_`abcdefghijklmnopqr^__`abcdefghijklmnopqr sJGiven generators for a permutation group, return a strong generating set. q The result is calculated using Schreier-Sims algorithm, and is relative to the base implied by the Ord instance tvGiven generators for a group, determine whether a permutation is a member of the group, using Schreier-Sims algorithm uqGiven generators for a group, return a (sorted) list of all elements of the group, using Schreier-Sims algorithm vtGiven generators for a group, return the order of the group (the number of elements), using Schreier-Sims algorithm stuvstuvstuv wxyJGiven generators for a permutation group, return a strong generating set. P 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. zTGiven a strong generating set gs, isMemberSGS gs is a membership test for the group wxyzwxyzwxyz {|zGiven a group gs and a transitive constituent ys, return the kernel and image of the transitive constituent homomorphism. d That is, suppose that gs acts on a set xs, and ys is a subset of xs on which gs acts transitively. m Then the transitive constituent homomorphism is the restriction of the action of gs to an action on the ys. }[Given a transitive group gs, find all non-trivial block systems. That is, if gs act on xs, y find all the ways that the xs can be divided into blocks, such that the gs also have a permutation action on the blocks ~<A more efficient version of blockSystems, if we have an sgs HA permutation group is primitive if it has no non-trivial block systems nGiven a transitive group gs, and a block system for gs, return the kernel and image of the block homomorphism 8 (the homomorphism onto the action of gs on the blocks) {|}~{|}~{|}~ LDatatype for graphs, represented as a list of vertices and a list of edges. > For most purposes, graphs are required to be in normal form. W A graph G vs es is in normal form if (i) vs is in ascending order without duplicates, ^ (ii) es is in ascending order without duplicates, (iii) each e in es is a 2-element list [x,y], x<y 9combinationsOf k xs returns the subsets of xs of size k. K If xs is in ascending order, then the returned list is in ascending order ZConvert a graph to normal form. The input is assumed to be a valid graph apart from order =Safe constructor for graph from lists of vertices and edges. K graph (vs,es) checks that vs and es are valid before returning the graph. 8The null graph on n vertices is the graph with no edges *The null graph, with no vertices or edges &c n is the cyclic graph on n vertices (k n is the complete graph on n vertices ;kb m n is the complete bipartite graph on m and n vertices kb'D m n is the complete bipartite graph on m left and n right vertices q k is the graph of the k-cube HGiven a graph with vertices which are lists of small integers, eg [1,2,3], f return a graph with vertices which are the numbers obtained by interpreting these as digits, eg 123. b The caller is responsible for ensuring that this makes sense (eg that the small integers are all < 10) :Given a graph with vertices which are lists of 0s and 1s, e return a graph with vertices which are the numbers obtained by interpreting these as binary digits.  For example, [1,1,0] -> 6. 7The restriction of a graph to a subset of the vertices BA graph is regular if all vertices have the same valency (degree) *A 3-regular graph is called a cubic graph gWithin a graph G, the distance d(u,v) between vertices u, v is length of the shortest path from u to v JThe diameter of a graph is maximum distance between two distinct vertices IThe girth of a graph is the size of the smallest cycle that it contains. M Note: If the graph contains no cycles, we return -1, representing infinity. Is the graph connected? -kneser n k returns the kneser graph KG n,k - 2 whose vertices are the k-element subsets of [1..n]&, with edges joining disjoint subsets DFThe Cayley graph (undirected) on the generators (and their inverses), # for a group given as permutations FThe Cayley graph (undirected) on the generators (and their inverses), / for a group given as generators and relations  A graph is vertex-transitive if its automorphism group acts transitively on the vertices. Thus, given any two distinct vertices, there is an automorphism mapping one to the other. A graph is edge-transitive if its automorphism group acts transitively on the edges. Thus, given any two distinct edges, there is an automorphism mapping one to the other. A graph is arc-transitive (or flag-transitive) if its automorphism group acts transitively on arcs. (An arc is an ordered pair of adjacent vertices.) A graph is n-arc-transitive is its automorphism group is transitive on n-arcs. (An n-arc is an ordered sequence (v0,...,vn) of adjacent vertices, with crossings allowed but not doubling back.) NA graph is distance transitive if given any two ordered pairs of vertices (u,u' ) and (v,v' ) with d(u,u' ) == d(v,v'), 6 there is an automorphism of the graph that takes (u,u' ) to (v,v') Given a graph g,  graphAuts gB returns a strong generating set for the automorphism group of g. JNote that the implementation is currently only valid for connected graphs NGiven the incidence graph of an incidence structure between points and blocks  (for example, a set system),  incidenceAuts gX returns a strong generating set for the automorphism group of the incidence structure. ? The generators are represented as permutations of the points. d The incidence graph should be represented with the points on the left and the blocks on the right. TNote that the implementation is currently only valid for connected incidence graphs  7!      !"#$!%&'()*+,-./012 $2F7 is a type for the finite field with 7 elements 2F5 is a type for the finite field with 5 elements 2F3 is a type for the finite field with 3 elements 2F2 is a type for the finite field with 2 elements RQ is just the rationals, but with a better show function than the Prelude version f2 lists the elements of F2 f3 lists the elements of F3 f5 lists the elements of F5 f7 lists the elements of F7 ?3456789:;<=>?@ABCDEFGHIJKLM$$      F     NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs               !"#$%&'()*RCreate 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.  !"#$%&'()tuvw*xyz{|}~ ()&'"%$#* !  !!"%$##$%&''())*8 +,-./"+,-././+-,+-,,-.// 0123456789^glexVar creates a variable in the algebra of commutative polynomials with Glex term ordering. F For example, the following code creates variables called x, y and z: : [x,y,z] = map glexVar ["x","y","z"] :: GlexPoly Q String :1In effect, we have (Num k, Monomial m) => Monad (v8 -> Vect k (m v)), with return = var, and (>>=) = bind.  However, we can'Mt express this directly in Haskell, firstly because of the Ord b constraint,  secondly because Haskell doesn't support type functions. ;A(%%) reduces a polynomial with respect to a list of polynomials. 0123456789:; 7869345:012; 012123454567889:;<=>?@ABCDEFGHI<=>?@ABCDEFGHICED>BA@?FIHG<=<==>BA@??@ABCEDDEFGHIJKJKJKJKLMNLMNMNLLMNNOPQRST OPQRSTSTQROPOPPQRRSTTUVWXYZ[\UVWXYZ[\[\XYZWUVUVVWXYZYZ[\\%]^_JA data type representing basis elements of the exterior algebra over a set/type. ? The exterior algebra is the quotient of the tensor algebra by  the ideal generated by all  self-products u"u and sums of products u"v + v"u `aKA data type representing basis elements of the symmetric algebra over a set/type. @ The symmetric algebra is the quotient of the tensor algebra by  the ideal generated by all  differences of products u"v - v"u. bcHA data type representing basis elements of the tensor algebra over a set/type. j Elements of the tensor algebra are linear combinations of iterated tensor products of elements of the set/type. x If V = Vect k a is the free vector space over a, then the tensor algebra T(V) = Vect k (TensorAlgebra a) is isomorphic  to the infinite direct sum:  T(V) = k " V " V"V " V"V"V " ... depInject an element of the free vector space V = Vect k a into the tensor algebra T(V) = Vect k (TensorAlgebra a) fInject an element of the set/type A/;a into the tensor algebra T(A) = Vect k (TensorAlgebra a). gLGiven vector spaces A = Vect k a, B = Vect k b, where B is also an algebra, 5 lift a linear map f: A -> B to an algebra morphism f' : T(A) -> B, < where T(A) is the tensor algebra Vect k (TensorAlgebra a).  f'C will agree with f on A itself (considered as a subspace of T(A)).  In other words, f = f' . injectTA h Given a set/type A/@a, and a vector space B = Vect k b, where B is also an algebra, 3 lift a function f: A -> B to an algebra morphism f' : T(A) -> B.  f'5 will agree with f on A itself. In other words, f = f' . injectTA' i2Tensor algebra is a functor from k-Vect to k-Alg. @ The action on objects is Vect k a -> Vect k (TensorAlgebra a). ( The action on arrows is f -> fmapTA f. jkIf we compose the free vector space functor Set -> k-Vect with the tensor algebra functor k-Vect -> k-Alg, = we obtain a functor Set -> k-Alg, the free algebra functor. 9 The action on objects is a -> Vect k (TensorAlgebra a). $ The action on arrows is f -> fmapTA' f. klm;Algebra morphism from tensor algebra to symmetric algebra. : The kernel of the morphism is the ideal generated by all  differences of products u"v - v"u. nopqrstuv:Algebra morphism from tensor algebra to exterior algebra. : The kernel of the morphism is the ideal generated by all  self-products u"u and sums of products u"v + v"u wxyz{|}~']^_`abcdefghijklmnopqrstuvwxyz{|}~%cdefghijklabmnopqrstu_`vwxyz{|}~]^%]^^_``abbcddefghijklmnopqrstuvwxyz{|}~     !,   !"#$%&'()*+,-."/0123456789:;<=# >?@ABCDEFGHI  $15F25 is a type for the finite field with 25 elements. U F25 is represented as the extension of F5 by an element a25 satisfying x^2+4x+2 = 0 5F16 is a type for the finite field with 16 elements. T F16 is represented as the extension of F2 by an element a16 satisfying x^4+x+1 = 0 3F9 is a type for the finite field with 9 elements. S F9 is represented as the extension of F3 by an element a9 satisfying x^2+2x+2 = 0 3F8 is a type for the finite field with 8 elements. R F8 is represented as the extension of F2 by an element a8 satisfying x^3+x+1 = 0 3F4 is a type for the finite field with 4 elements. R F4 is represented as the extension of F2 by an element a4 satisfying x^2+x+1 = 0 4F23 is a type for the finite field with 23 elements 4F19 is a type for the finite field with 19 elements 4F17 is a type for the finite field with 17 elements 4F13 is a type for the finite field with 13 elements 4F11 is a type for the finite field with 11 elements 2F7 is a type for the finite field with 7 elements 2F5 is a type for the finite field with 5 elements 2F3 is a type for the finite field with 3 elements 2F2 is a type for the finite field with 2 elements RQ is just the rationals, but with a better show function than the Prelude version #f2 is a list of the elements of F2 #f3 is a list of the elements of F3 #f5 is a list of the elements of F5 #f7 is a list of the elements of F7 %f11 is a list of the elements of F11 %f13 is a list of the elements of F13 %f17 is a list of the elements of F17 %f19 is a list of the elements of F19 %f23 is a list of the elements of F23 Ta4 is a primitive element for F4 as an extension over F2. a4 satisfies x^2+x+1 = 0. #f4 is a list of the elements of F4 Ta8 is a primitive element for F8 as an extension over F2. a8 satisfies x^3+x+1 = 0. #f8 is a list of the elements of F8 Ua9 is a primitive element for F9 as an extension over F3. a9 satisfies x^2+2x+2 = 0. #f9 is a list of the elements of F9 Wa16 is a primitive element for F16 as an extension over F2. a16 satisfies x^4+x+1 = 0. %f16 is a list of the elements of F16 Xa25 is a primitive element for F25 as an extension over F5. a25 satisfies x^2+4x+2 = 0. %f25 is a list of the elements of F25 4JKL11%CA conjugation operation is required to satisfy the following laws:  conj (x+y) = conj x + conj y 9 conj (x*y) = conj y * conj x (note the order-reversal)  conj (conj x) = x " conj x = x if and only if x in k DThe squared norm is defined as sqnorm x = x * conj x. It satisfies: $ sqnorm (x*y) = sqnorm x * sqnorm y ' sqnorm (unit k) = k^2, for k a scalar KThe quaternions have {1,i,j,k} as basis, where i^2 = j^2 = k^2 = ijk = -1. KThe quaternions have {1,i,j,k} as basis, where i^2 = j^2 = k^2 = ijk = -1. KThe quaternions have {1,i,j,k} as basis, where i^2 = j^2 = k^2 = ijk = -1. NThe scalar part of the quaternion w+xi+yj+zk is w. Also called the real part. UThe vector part of the quaternion w+xi+yj+zk is xi+yj+zk. Also called the pure part. rGiven a non-zero quaternion q in H, the map x -> q^-1 * x * q defines an action on the 3-dimensional vector space l of pure quaternions X (ie linear combinations of i,j,k). It turns out that this action is a rotation of X, q and this is a surjective group homomorphism from H* onto SO3. If we restrict q to the group of unit quaternions ^ (those of norm 1), then this homomorphism is 2-to-1 (since q and -q give the same rotation). o This shows that the multiplicative group of unit quaternions is isomorphic to Spin3, the double cover of SO3.  reprSO3 q/ returns the 3*3 matrix representing this map. oGiven a pair of unit quaternions (l,r), the map x -> l^-1 * x * r defines an action on the 4-dimensional space j of quaternions. It turns out that this action is a rotation, and this is a surjective group homomorphism S onto SO4. The homomorphism is 2-to-1 (since (l,r) and (-l,-r) give the same map). g This shows that the multiplicative group of pairs of unit quaternions (with pointwise multiplication) 2 is isomorphic to Spin4, the double cover of SO4.  reprSO4 (l,r)/ returns the 4*4 matrix representing this map. MPIf an algebra has a conjugation operation, then it has multiplicative inverses,  via 1 x = conj x  sqnorm x NOPQRST&!<A type representing polynomials with Grevlex term ordering. 5A type representing monomials with Grevlex ordering. Grevlex stands for graded reverse lexicographic. Thus monomials are ordered first by degree, then by reverse lexicographic order. y For example, in Grevlex ordering, monomials up to degree two would be ordered as follows: x^2+xy+y^2+xz+yz+z^2+x+y+z+1. :In general, Grevlex leads to the smallest Groebner bases. 9A type representing polynomials with Glex term ordering. 2A type representing monomials with Glex ordering. oGlex stands for graded lexicographic. Thus monomials are ordered first by degree, then by lexicographic order. v For example, in Glex ordering, monomials up to degree two would be ordered as follows: x^2+xy+xz+y^2+yz+z^2+x+y+z+1. 8A type representing polynomials with Lex term ordering. 1A type representing monomials with Lex ordering. 'Lex stands for lexicographic ordering. u For example, in Lex ordering, monomials up to degree two would be ordered as follows: x^2+xy+xz+x+y^2+yz+y+z^2+z+1. xThe underlying implementation of monomials in variables of type v. Most often, we will be interested in MonImpl String,  with the variable "x" represented by M 1 [("x",1)],. However, other types can be used instead. tNo Ord instance is defined for MonImpl v, so it cannot be used as the basis for a free vector space of polynomials. j Instead, several different newtype wrappers are provided, corresponding to different monomial orderings. TWe want to be able to construct monomials over any set of variables that we choose. A Although we will often use String as the type of our variables, 9 it is useful to define polymorphic types for monomials. VIn order to work with monomials, we need to be able to multiply them and divide them. Y Multiplication is defined by the Mon (monoid) class. Division is defined in this class. B The functions here are primarily intended for internal use only. var v8 creates a variable in the vector space of polynomials. + For example, if we want to work in Q[x,y,z], we might define:  8 [x,y,z] = map var ["x","y","z"] :: [GlexPoly Q String] NNotice that, in general, it is necessary to provide a type annotation so that = the compiler knows which field and which term order to use. lexvar v] creates a variable in the algebra of commutative polynomials over Q with Lex term ordering. U It is provided as a shortcut, to avoid having to provide a type annotation, as with var. F For example, the following code creates variables called x, y and z: $ [x,y,z] = map lexvar ["x","y","z"]  glexvar v^ creates a variable in the algebra of commutative polynomials over Q with Glex term ordering. U It is provided as a shortcut, to avoid having to provide a type annotation, as with var. F For example, the following code creates variables called x, y and z: % [x,y,z] = map glexvar ["x","y","z"]  grevlexvar va creates a variable in the algebra of commutative polynomials over Q with Grevlex term ordering. U It is provided as a shortcut, to avoid having to provide a type annotation, as with var. F For example, the following code creates variables called x, y and z: ( [x,y,z] = map grevlexvar ["x","y","z"] `Given (Num k, MonomialConstructor m), then Vect k (m v) is the free commutative algebra over v. c As such, it is a monad (in the mathematical sense). The following pseudo-code (not legal Haskell)  shows how this would work:  B instance (Num k, Monomial m) => Monad (\v -> Vect k (m v)) where  return = var  (>>=) = bind .bind corresponds to variable substitution, so v  f0 returns the result of making the substitutions  encoded in f into v. SNote that the type signature is slightly more general than that required by (>>=). % For a monad, we would only require:  S bind :: (MonomialConstructor m, Num k, Ord (m v), Show (m v), Algebra k (m v)) => 9 Vect k (m u) -> (u -> Vect k (m v)) -> Vect k (m v) VInstead, the given type signature allows us to substitute in elements of any algebra.  This is occasionally useful. $bind performs variable substitution "Evaluate a polynomial at a point.  For example eval (x^2+y^2) [(x,1),(y,2)]- evaluates x^2+y^2 at the point (x,y)=(1,2). /Perform variable substitution on a polynomial.  For example (subst (x*z-y^2) [(x,u^2),(y,u*v),(z,v^2)]9 performs the substitution x -> u^2, y -> u*v, z -> v^2.  (List the variables used in a polynomial  f %% gsN is the reduction of a polynomial f with respect to a list of polynomials gs. ? In the case where the gs are a Groebner basis for an ideal I,  then f %% gs2 is the equivalence class representative of f in R/I, ' and is zero if and only if f is in I. UOAs a convenience, a partial instance of Fractional is defined for polynomials. \ The instance is well-defined only for scalars, and gives an error if used on other values. U The purpose of this is to allow entry of fractional scalars, in expressions such as x/2. * On the other hand, an expression such as 2/x will return an error. .VW XYZ[\]^_`abc     ' nGiven a list of polynomials over a field, return a Groebner basis for the ideal generated by the polynomials.   memberI f gs3 returns whether f is in the ideal generated by gs  =Given ideals I and J, their sum is defined as I+J = {f+g | f <- I, g <- J}. .If fs and gs are generators for I and J, then  sumI fs gs returns generators for I+J. bThe geometric interpretation is that the variety of the sum is the intersection of the varieties, ! ie V(I+J) = V(I) intersect V(J) XGiven ideals I and J, their product I.J is the ideal generated by all products {f.g | f <- I, g <- J}. .If fs and gs are generators for I and J, then productI fs gs returns generators for I.J. _The geometric interpretation is that the variety of the product is the union of the varieties,  ie V(I.J) = V(I) union V(J) _The intersection of ideals I and J is the set of all polynomials which belong to both I and J. .If fs and gs are generators for I and J, then intersectI fs gs4 returns generators for the intersection of I and J dThe geometric interpretation is that the variety of the intersection is the union of the varieties, ( ie V(I intersect J) = V(I) union V(J). rThe reason for prefering the intersection over the product is that the intersection of radical ideals is radical, " whereas the product need not be. @Given ideals I and J, their quotient is defined as I:J = {f | f <"- R, f.g is in I for all g in J}. .If fs and gs are generators for I and J, then quotientI fs gs returns generators for I:J. bThe ideal quotient is the algebraic analogue of the Zariski closure of a difference of varieties. x V(I:J) contains the Zariski closure of V(I)-V(J), with equality if k is algebraically closed and I is a radical ideal. eliminate vs gsh returns the elimination ideal obtained from the ideal generated by gs by eliminating the variables vs. -Given variables vs, and a Groebner basis gs, mbasisQA vs gs7 returns a monomial basis for the quotient algebra k[vs]/<gs>.  For example,  mbasisQA [x,y] [x^2+y^2-1]# returns a monomial basis for k[x,y]/< x^2+y^2-1>. : In general, the monomial basis is likely to be infinite. cGiven an ideal I, the leading term ideal lt(I) consists of the leading terms of all elements of I.  If I is generated by gs, then  ltIdeal gs returns generators for lt(I). 0Given variables vs, and a homogeneous ideal gs, hilbertFunQA vs gs; returns the Hilbert function for the quotient algebra k[vs]/<gs>. f Given an integer i, the Hilbert function returns the number of degree i monomials in a basis for k[vs]/<gs>. S For a homogeneous ideal, this number is independent of the monomial ordering used \ (even though the elements of the monomial basis themselves are dependent on the ordering). )If the ideal I is not homogeneous, then R/?I is not graded, and the Hilbert function is not well-defined. s Specifically, the number of degree i monomials in a basis is likely to depend on which monomial ordering you use. 0Given variables vs, and a homogeneous ideal gs, hilbertSeriesQA vs gs9 returns the Hilbert series for the quotient algebra k[vs]/<gs>.  The Hilbert series should be interpreted as a formal power series where the coefficient of t^i is the Hilbert function evaluated at i.  That is, the i'Pth element in the series is the number of degree i monomials in a basis for k[vs]/<gs>. iIn the case where every variable v occurs in some generator g of the homogeneous ideal (the usual case), * then the vs can be inferred from the gs.  hilbertSeriesQA' gs9 returns the Hilbert series for the quotient algebra k[vs]/<gs>. For i >>S 0, the Hilbert function becomes a polynomial in i, called the Hilbert polynomial. (defghijklmn opqr  stuvwxyz{|}      (u <+>" v returns the sum u+v of vectors u <->) v returns the difference u-v of vectors k *>< v returns the product k*v of the scalar k and the vector v u <.>L v returns the dot product of vectors (also called inner or scalar product) u <*>O v returns the tensor product of vectors (also called outer or matrix product) a <<+>># b returns the sum a+b of matrices a <<->>* b returns the difference a-b of matrices  a <<*>>' b returns the product a*b of matrices !k *>>< m returns the product k*m of the scalar k and the matrix m "m <<*>9 v is multiplication of a vector by a matrix on the left #v <*>>: m is multiplication of a vector by a matrix on the right $!iMx n is the n*n identity matrix %"jMx n is the n*n matrix of all 1s &"zMx n is the n*n matrix of all 0s '5The inverse of a matrix (over a field), if it exists ()+The determinant of a matrix (over a field)  !"#~$%&'() !"#$%&'() !"#$%&'())*+,-._ptsAG n fq returns the points of the affine geometry AG(n,Fq), where fq are the elements of Fq /cptsPG n fq returns the points of the projective geometry PG(n,Fq), where fq are the elements of Fq 0\Given a list of points in AG(n,Fq), return their closure, the smallest flat containing them 1[Given a set of points in PG(n,Fq), return their closure, the smallest flat containing them 2flatsPG n fq kC returns the k-flats in PG(n,Fq), where fq are the elements of Fq. M The returned flats are represented as matrices in reduced row echelon form, : the rows of which are the points that generate the flat. @ The full set of points in the flat can be recovered by calling 1 3QflatsAG n fq k returns the k-flats in AG(n,Fq), where fq are the elements of Fq. 4 The lines (1-flats) in PG(n,fq) 5 The lines (1-flats) in AG(n,fq) 6[Incidence graph of PG(n,fq), considered as an incidence structure between points and lines 7[Incidence graph of AG(n,fq), considered as an incidence structure between points and lines *+,-./01234567./01*-,+234567*-,++,-./01234567* 89:;<=>?@AB 89:;<=>?@AB 9:8;A@?>=<B 89::;<=>?@AB+CDEUThe incidence matrix of a design, with rows indexed by blocks and columns by points. S (Note that in the literature, the opposite convention is sometimes used instead.) F0The affine plane AG(2,Fq), a 2-(q^2,q,1) design GAThe projective plane PG(2,Fq), a square 2-(q^2+q+1,q+1,1) design HThe dual of a design IJKL The incidence graph of a design MDFind a strong generating set for the automorphism group of a design NOGenerators for the Mathieu group M24, a finite simple group of order 244823040 O\A strong generating set for the Mathieu group M24, a finite simple group of order 244823040 P[A strong generating set for the Mathieu group M23, a finite simple group of order 10200960 QYA strong generating set for the Mathieu group M22, a finite simple group of order 443520 ROThe Steiner system S(5,8,24), with 759 blocks, whose automorphism group is M24 SOThe Steiner system S(4,7,23), with 253 blocks, whose automorphism group is M23 TNThe Steiner system S(3,6,22), with 77 blocks, whose automorphism group is M22 UOThe Steiner system S(5,6,12), with 132 blocks, whose automorphism group is M12 VNThe Steiner system S(4,5,11), with 66 blocks, whose automorphism group is M11 WKGenerators for the Mathieu group M12, a finite simple group of order 95040 XXA strong generating set for the Mathieu group M12, a finite simple group of order 95040 YWA strong generating set for the Mathieu group M11, a finite simple group of order 7920 ?CDEFGHIJKLMNOPQRSTUVWXYCDEFGHIJKLMNOPQRSTUVWXYCDDEFGHIJKLMNOPQRSTUVWXY,Z[\JIs this hypergraph uniform - meaning that all blocks are of the same size ]^_[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 `7Is 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. a9Is this hypergraph a projective plane with a quadrangle. . This is a stronger non-degeneracy condition. bc1Is this hypergraph a (projective) configuration. de;The Heawood graph is the incidence graph of the Fano plane fghijk6The Tutte-Coxeter graph, also called the Tutte 8-cage Z[\]^_`abcdefghijkZ[\]^_`abcdefghijkZ[[\]^_`abcdefghijk-lmno'lmnolonmlonmmno.pqr&Are the two latin squares orthogonal? sHAre the latin squares mutually orthogonal (ie each pair is orthogonal)? tMOLS from a projective plane pqrstpqrstpqrst/u~A poset is represented as a pair (set,po), where set is the underlying set of the poset, and po is the partial order relation vwNA chain is a poset in which every pair of elements is comparable (ie either x < = y or y <= x). * It is therefore a linear or total order. 6 chainN n is the poset consisting of the numbers [1..n] ordered by (<=) xEAn antichain is a poset in which distinct elements are incomparable. . antichainN n is the poset consisting of [1..n] , with x <= y only when x == y. y4posetD n is the lattice of (positive) divisors of n z+posetB n is the lattice of subsets of [1..n] ordered by inclusion {.posetP n is the lattice of partitions of [1..n] ordered by refinement |XposetL n fq is the lattice of subspaces of the vector space Fq^n, ordered by inclusion. > Subspaces are represented by their reduced row echelon form. }/The subposet of a poset satisfying a predicate ~The direct sum of two posets !The direct product of two posets The dual of a poset Given a poset (X,<'=), we say that y covers x, written x -< y, if x <! y and there is no z in X with x < z < y. [ The Hasse digraph of a poset is the digraph whose vertices are the elements of the poset, / with an edge between every pair (x,y) with x -< y. l The Hasse digraph can be represented diagrammatically as a Hasse diagram, by drawing x below y whenever x -< y. wGiven a DAG (directed acyclic graph), return the poset consisting of the vertices of the DAG, ordered by reachability. = This can be used to recover a poset from its Hasse digraph. %Are the two posets order-isomorphic? (uvwxyz {    |}~uvwxyz{|}~uvvwxyz{|}~0 FA type to represent an interval in a poset. The (closed) interval [x,y] is the set {z | x <= z <= y} within the poset.  Note that the "empty interval"0 is not an interval - that is, the interval [x,y] is only defined for x <= y. c The (closed) intervals within a poset form a basis for the incidence algebra as a k-vector space. NList representatives of the order isomorphism classes of intervals in a poset -The unit of the incidence algebra of a poset The zeta function of a poset The Mobius function of a poset ?The inverse of an element in the incidence algebra of a poset. M This is only defined for elements which are non-zero on all intervals (x,x) iA function (ie element of the incidence algebra) that counts the total number of chains in each interval kA function (ie element of the incidence algebra) that counts the number of maximal chains in each interval  toIsoClassesI is the linear map from the incidence Hopf algebra of a poset to itself, \ in which each interval is mapped to (the minimal representative of) its isomorphism class. ` Thus the result can be considered as a linear combination of isomorphism classes of intervals, & rather than of intervals themselves. O Note that if this operation is to be performed repeatedly for the same poset, " then it is more efficient to use  toIsoClasses' poset5, which memoizes the isomorphism class lookup table. Given a poset,  toIsoClasses' posetK is the linear map from the incidence Hopf algebra of the poset to itself, \ in which each interval is mapped to (the minimal representative of) its isomorphism class. sThe incidence algebra of a poset is the free k-vector space having as its basis the set of intervals in the poset, < with multiplication defined by concatenation of intervals. x The incidence algebra can also be thought of as the vector space of functions from intervals to k, with multiplication A defined by the convolution (f*g)(x,y) = sum [ f(x,z) g(z,y) | x <= z <= y ].    1L#A datatype to represent a matroid. M es bs# is the matroid whose elements are es, and whose bases are bs.  The normal form is for the es! to be in order, for each of the bs individually to be in order. i (So the TrieSet should have the property that any path from the root to a leaf is strictly increasing). AThe data structure that we use to store the bases of the matroid 7Return the elements over which the matroid is defined. AReturn all the independent sets of a matroid, in shortlex order. VAre these the independent sets of a matroid? (The sets must individually be ordered.) @Construct a matroid from its elements and its independent sets. FGiven a matrix, represented as a list of rows, number the columns [1..], u and construct the matroid whose independent sets correspond to those sets of columns which are linearly independent t (or in case there are repetitions, those multisets of columns which are sets, and which are linearly independent). MGiven a list of vectors (or rows of a matrix), number the vectors (rows) [1..]3, and construct the matroid whose independent sets K correspond to those sets of vectors (rows) which are linearly independent i (or in case there are repetitions, those multisets which are sets, and which are linearly independent). =Given the edges of an undirected graph, number the edges [1..]3, and construct the matroid whose independent sets  correspond to those sets of edges which contain no cycle. The bases therefore correspond to maximal forests within the graph. = The edge set is allowed to contain loops or parallel edges. WGiven a matroid over an arbitrary type, relabel to obtain a matroid over the integers. !Are the two matroids isomorphic? )Return the automorphisms of the matroid. 3A circuit in a matroid is a minimal dependent set. >Return all circuits for the given matroid, in shortlex order. 1Are the given sets the circuits of some matroid? 6Reconstruct a matroid from its elements and circuits. @An element e in a matroid M is a loop if {e} is a circuit of M. IElements f and g in a matroid M are parallel if {f,g} is a circuit of M. <A matroid is simple if it has no loops or parallel elements ;A base or basis in a matroid is a maximal independent set. 'Return all bases for the given matroid .Are the given sets the bases of some matroid? 3Reconstruct a matroid from its elements and bases. 0Given a matroid m, a basis b, and an element e, fundamentalCircuit m b e6 returns the unique circuit contained in b union {e}, A which is called the fundamental circuit of e with respect to b. XThe uniform matroid U m n is the matroid whose independent sets are all subsets of [1..n] with m or fewer elements. 9The restriction of a matroid to a subset of its elements Given a matroid m,  rankfun m4 is the rank function on subsets of its element set 4The rank of a matroid is the cardinality of a basis :Reconstruct a matroid from its elements and rank function Given a matroid m,  closure m7 is the closure operator on subsets of its element set =Reconstruct a matroid from its elements and closure operator UA flat in a matroid is a closed set, that is a set which is equal to its own closure QThe flats of a matroid are its closed sets. They form a lattice under inclusion. SReconstruct a matroid from its flats. (The flats must be given in shortlex order.) UA subset of the elements in a matroid is spanning if its closure is all the elements GA hyperplane is a flat whose rank is one less than that of the matroid 8Reconstruct a matroid from its elements and hyperplanes 5Given a list of points in k^n, number the points [1..]3, and construct the matroid whose independent sets D correspond to those sets of points which are affinely independent. bA multiset of points in k^n is said to be affinely dependent if it contains two identical points, b or three collinear points, or four coplanar points, or ... - and affinely independent otherwise. mfromGeoRep returns a matroid from a geometric representation consisting of dependent flats of various ranks. w Given lists of dependent rank 0 flats (loops), rank 1 flats (points), rank 2 flats (lines) and rank 3 flats (planes),  $fromGeoRep loops points lines planes6 returns the matroid having these as dependent flats. g Note that if all the elements lie in the same plane, then this should still be listed as an argument. yA simple matroid has no loops or parallel elements, hence its geometric representation has no loops or dependent points.  simpleFromGeoRep lines planes: returns the simple matroid having these dependent flats. +List the circuit-hyperplanes of a matroid. ZGiven a matroid m, and a set of elements b which is both a circuit and a hyperplane in m,  then relaxation m b> is the matroid which is obtained by adding b as a new basis. H This corresponds to removing b from the geometric representation of m. :Given a set of elements es, and a sequence as = [a1,...,am] of subsets of es, S return the matroid whose independent sets are the partial transversals of the as. The dual matroid gA matroid is (2-)connected if, for every pair of distinct elements, there is a circuit containing both The direct sum of two matroids matroidPG n fqT returns the projective geometry PG(n,Fq), where fq is a list of the elements of Fq matroidAG n fqP returns the affine geometry AG(n,Fq), where fq is a list of the elements of Fq QGiven a matroid m, the fundamental-circuit incidence matrix relative to a base b V has rows indexed by the elements of b, and columns indexed by the elements not in b. a The bi, ej entry is 1 if bi is in the fundamental circuit of ej relative to b, and 0 otherwise. hFind representations of the matroid m over fq. Specifically, this function will find one representative 9 of each projective equivalence class of representation. gIs the matroid representable over Fq? For example, to find out whether a matroid m is binary, evaluate isRepresentable f2 m. =A binary matroid is a matroid which is representable over F2 >A ternary matroid is a matroid which is representable over F3 The Fano plane F7 = PG(2,F2) ;F7-, the relaxation of the Fano plane by removal of a line 2The Pappus configuration from projective geometry <Relaxation of the Pappus configuration by removal of a line The Desargues configuration >The Vamos matroid V8. It is not representable over any field. PP8 is a minor-minimal matroid that is not representable over F4, F8, F16, ... . > It is Fq-representable if and only if q is not a power of 2. IP8- is a relaxation of P8. It is Fq-representable if and only if q >= 4. ^P8-- is a relaxation of P8-. It is a minor-minimal matroid that is not representable over F4. / It is Fq-representable if and only if q >= 5. PGiven a matroid m over elements es, the rank polynomial is a polynomial r(x,y), ` which is essentially a generating function for the subsets of es, enumerated by size and rank. > It is efficiently calculated using deletion and contraction. gIt has the property that r(0,0) is the number of bases in m, r(1,0) is the number of independent sets, k r(0,1) is the number of spanning sets. It can also be used to derive the chromatic polynomial of a graph, 3 the weight enumerator of a linear code, and more. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijLL2 #klmnopqrstuvwxyz{|}~  3_The special linear group SL(n,Fq), generated by elementary transvections, returned as matrices DThe projective special linear group PSL(n,Fq) == A(n,Fq) == SL(n,Fq)/Z, 7 returned as permutations of the points of PG(n-1,Fq). 4 This is a finite simple group provided n>2 or q>3. 5The symplectic group Sp(2n,Fq), returned as matrices AThe projective symplectic group PSp(2n,Fq) == Cn(Fq) == Sp(2n,Fq)/Z, 8 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). 445 >Generators for G2(3), a finite simple group of order 4245696, D as a permutation group on the 702 unit imaginary octonions over F3 &  9:;<=>?@ABCDEFGHIJKLLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  ?   F \ HI      !"#$%&&''()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVPWOXYZST[\]^_`abbcVdefgOPhijklmnopqrstuXvwST[xyz{|D}~noO  !!!!!!!""""""""##########$9$9$;$;$=$=$?$?$A$A$$$$$$$$$$$$$ $ $!$!$"$"$'$'$($)$*$+$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%&&&&&&\&^&^&&&&&&&&&S&&&&&&&T&&&&`&&&&a''''''''''''''(T(W(Y(((((((((((((( ) ) )) ) )))))))))*****c*d*****+ +V+!+"+#+`+$+%+&+'+(+)+*+++,+-+.+/+0+1+2+3+4,5,6,7,',8,9,:,;,<,=,>,?,@,A,B,C,D,E-F-e-?-d.G.H.I.J.K/L/L/M/N/O/P/Q/R/S/T/U/`/V/W/X/Y0Z0[0\0]0^0_0`0a0b0c0d0e1f1g1h1i1j11k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1{1|1}1~1111111111111111111111111111`11111T11111111+1111111112222O2V2d2e2f23333444=4=5555c5d55555\66666666                      }      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :  ; < = > ? @ A B C D E F G H I J K L - M , N 5 6 7 O P Q R S T U V W X Y Z 3 [ \ ] 5 ^ _ ` a b c d   ! e f g h i j k l v m n o p q r s t u v w x y  z { | } ~     77i7777j777777777777777777777777777[Tva888888888      !"#$%&'`(a)*+,-./0T123456789:j; <=>?@AhBCD E F G H I  J K L M N O P C Q   R S T U V!W!X!Y!Z![!\!]!^!_!`!a!b!c!d!e!!f!g!h!i!j!k!l!m!n!o!p!q!r!s!t!u!v!w!x"y"h"i""j"z""""{"|"}"~""#W#X#Y###\#]#^####$$$[%%%%%%%%&&&&&&&&&&&&&&"&''''''''''''''''''''''''' '((((((((((((()))))))))))))))))+ +++++++++++++++++++++v++>++++++++++++++++,,,,,,!,e,,,,,,----1------------------- - - - -- -------........./// //!/"/#/$/%/&/a/'/(/)/*/+/,/-/.///0//1/2030405060708090:0;0<0=0>11?1@11A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1[1\1]1^1_1`1a1b1c1d1e1f1x1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1{1|111}1~1111122222222222222222222222222333333333j33i344444444444444444444444444444444444[444449444444445555\5R555I55555555555555555555HaskellForMaths-0.4.1Math.NumberTheory.PrimeMath.NumberTheory.FactorMath.Core.UtilsMath.Combinatorics.DigraphMath.Algebras.VectorSpaceMath.Algebras.TensorProductMath.Algebras.Structures"Math.Algebra.Group.StringRewriting#Math.Algebra.Group.PermutationGroupMath.Algebra.Group.SchreierSims%Math.Algebra.Group.RandomSchreierSimsMath.Algebra.Group.SubquotientsMath.Combinatorics.GraphMath.Algebra.Group.CayleyGraphMath.Combinatorics.GraphAuts"Math.QuantumAlgebra.TensorCategoryMath.Common.IntegerAsTypeMath.Algebra.Field.BaseMath.Algebra.Field.Extension"Math.Algebra.NonCommutative.NCPoly)Math.Algebra.NonCommutative.TensorAlgebraMath.Algebras.CommutativeMath.Algebras.AffinePlaneMath.Algebras.GroupAlgebraMath.Algebras.LaurentPolyMath.Algebras.MatrixMath.Algebras.NonCommutativeMath.Algebras.TensorAlgebra%Math.Projects.KnotTheory.LaurentMPolyMath.Projects.KnotTheory.Braid&Math.Projects.KnotTheory.TemperleyLieb%Math.Projects.KnotTheory.IwahoriHecke"Math.QuantumAlgebra.OrientedTangle Math.QuantumAlgebra.QuantumPlaneMath.QuantumAlgebra.TangleMath.Core.FieldMath.Algebras.Quaternions"Math.CommutativeAlgebra.Polynomial%Math.CommutativeAlgebra.GroebnerBasisMath.Algebra.LinearAlgebra!Math.Combinatorics.FiniteGeometryMath.Algebras.OctonionsMath.Combinatorics.DesignMath.Combinatorics.Hypergraph'Math.Combinatorics.StronglyRegularGraphMath.Combinatorics.LatinSquaresMath.Combinatorics.Poset#Math.Combinatorics.IncidenceAlgebraMath.Combinatorics.MatroidMath.Projects.RootSystem&Math.Projects.ChevalleyGroup.Classical$Math.Projects.MiniquaternionGeometry(Math.Projects.ChevalleyGroup.ExceptionalMath.Common.ListSetMath.Projects.Rubik#Math.Algebra.NonCommutative.GSBasisprimesisPrimenotPrime prevPrime nextPrimeEllipticCurvePtPInf EllipticCurveECpfactors powersetdfs powersetbfscombinationsOfchooseDigraphDGisDagIso isoRepDAGDualTrivialEBasisEVectVzerovadd<+>sumvneg<->smultL*>smultR<*nflinearwrapunwrapdualTensorDSumi1i2coprodfp1p2prodfdsumedsumftetfassocLassocRunitInLunitOutLunitInRunitOutRtwistdistrLundistrLdistrRundistrRevreifyComodulecoactionModuleactionMonoidCoalgebraMC SetCoalgebraSC HopfAlgebraantipode Bialgebra CoalgebracounitcomultAlgebraunitmultMonmunitmmultunit'counit'SGenSrewrite knuthBendixnfselts Permutation.^-^p^-~^.^^-^^_C_S_AorderorderSGS conjClassRepssubgpsisNormal normalSubgps quotientGp//sgsisMember initProdRepl nextProdRepl isMemberSGS isTransitive!transitiveConstituentHomomorphism blockSystemsblockSystemsSGS isPrimitiveisPrimitiveSGSblockHomomorphismGraphGgraph nullGraph nullGraph'ckkbkb'qq' fromDigits fromBinarypetersen complement restrictioninducedSubgraph isRegularisCubicdistancediametergirth isConnectedkneser cayleyGraphP cayleyGraphSisVertexTransitiveisEdgeTransitiveisArcTransitiveisnArcTransitiveis2ArcTransitiveis3ArcTransitiveisDistanceTransitive graphAuts incidenceAutsCob2BraidSymmetricGroupoidWeakTensorCategoryassoclunitrunitStrictTensorCategoryTensorCategorytunittobtarCategoryObArid_sourcetarget>>>T97T89T83T79T73T71T67T61T59T53T47T43T41T37T31T29T23T19T17T13T11T7T5T3T2TOneTZeroTMinus1M IntegerAsTypevalueF97F89F83F79F73F71F67F61F59F53F47F43F41F37F31F29F23F19F17F13F11F7F5F3F2 FiniteFieldeltsFqbasisFqFpQf2f3f5f7 QSqrtMinus5 QSqrtMinus3 QSqrtMinus2 QSqrtMinus1QSqrt7QSqrt5QSqrt3QSqrt2SqrtF32 ConwayF32F27 ConwayF27F25 ConwayF25F16 ConwayF16F9ConwayF9F8ConwayF8F4ConwayF4ExtensionFieldExtPolynomialAsTypepvalueUPolyUP quotRemUP conjugate InvertibleinvVarZYXNPolyNPMonomialvarWeylGensDBasis DivisionBasisdividesBdivBpowersGlexPoly GlexMonomialGlexglexVarbind%%SL2ABCDCBAXYabd GroupAlgebraip LaurentPolyLaurentMonomialLMM3E3Mat2'E2'Mat2E2divMNCPolyNonComMonomialNCMTensorCoalgebraTCExteriorAlgebraSymmetricAlgebraSym TensorAlgebraTAinjectTA injectTA'liftTAliftTA'fmapTAfmapTA'bindTAbindTA'toSym injectSym injectSym'liftSymliftSym'fmapSymfmapSym'bindSymbindSym'toExt injectExt injectExt'liftExtliftExt'fmapExtfmapExt'bindExtbindExt' projectTCcoliftTCcobindTC LaurentMPolyLP BraidGensLPQTemperleyLiebGensIwahoriHeckeGensTOrientedTangleHorizDirToRToLOrientedMinusPlusSL2qM2qAq02Aq20 TangleRepTanglecapcupoverunderkauffmanf11f13f17f19f23a4f4a8f8a9f9a16f16a25f25HasConjugationconjsqnorm QuaternionHBasisKJIOneij scalarPart vectorPartreprSO3reprSO4one'i'j'k'Elim2 GrevlexPolyGrevlexLexPolyLexMonImplMonomialConstructormvarmindicesmdividesmdivmgcdmlcmmcoprimemdeglexvarglexvar grevlexvarevalsubstvarsgbmemberIsumIproductI intersectI quotientI eliminatembasisQAltIdeal hilbertFunQAhilbertSeriesQAhilbertSeriesQA' hilbertPolyQAhilbertPolyQA'<.><*><<+>><<->><<*>>*>><<*><*>>iMxjMxzMxinversereducedRowEchelonFormdet ZeroOneStarStarZeroptsAGptsPG closureAG closurePGflatsPGflatsAGlinesPGlinesAGincidenceGraphPGincidenceGraphAGOctonionOBasisOi0i3i4i5i6i_DesignincidenceMatrixag2pg2 derivedDesign pointResidual blockResidualincidenceGraph designAutsm24m24sgsm23sgsm22sgss_5_8_24s_4_7_23s_3_6_22s_5_6_12s_4_5_11m12m12sgsm11sgs HypergraphH isUniformisPartialLinearSpaceisProjectivePlaneisProjectivePlaneTriisProjectivePlaneQuadisGeneralizedQuadrangleisConfiguration fanoPlane heawoodGraphdesarguesConfigurationdesarguesGraphpappusConfiguration pappusGraph coxeterGraphtutteCoxeterGraph DesignVertex findLatinSqs isLatinSq isOrthogonalisMOLSfromProjectivePlanePosetchainN antichainNposetDposetBposetPposetLsubposetdsumdprod hasseDigraphreachabilityPosetisOrderPreserving isOrderIsoIntervalIvintervalIsoClassesunitIAbasisIAzetaIAmuIAinvIA numChainsIAnumMaximalChainsIA toIsoClasses toIsoClasses'LMRRMidLMatroidTrieSetTSelementsindeps isIndependent isDependentisMatroidIndeps fromIndeps vectorMatroidvectorMatroid' cycleMatroidto1n isMatroidIso matroidAuts isCircuitcircuitsisMatroidCircuits fromCircuitsisLoop isParallelisSimpleisBasebasesisMatroidBases fromBasesfundamentalCircuiturankfunrank fromRankfunclosure fromClosureisFlatflats fromFlats isSpanning isHyperplane hyperplanesisMatroidHyperplanesfromHyperplanes affineMatroid fromGeoRepsimpleFromGeoRepcircuitHyperplanes relaxationtransversalMatroid cocircuitsdeletion contraction matroidPG matroidAG!fundamentalCircuitIncidenceMatrixrepresentationsisRepresentableisBinary isTernaryf7mpappus nonPappus desarguesv8p8p8mp8mmrankPolyTypeFbasisEltsllsp2s2J9g2_3isTrialDivisionPrime pfactors1isStrongPseudoPrimeisStrongPseudoPrime'split2s power_modisMillerRabinPrime'isMillerRabinPrime pfactors2extendedEuclidisEltECecAddecSmultdiscriminantECecTrial multipliers findFactorECMmergeparallelInverse parallelEcAddparallelEcSmultparallelEcTrialfindFactorParallelECMtoSetpairsordpairfoldcmplcmpfsteqfstfromBaseverticesedges predecessors successorsadjLists digraphIsos1 digraphIsos2heightPartitionDAGisDAGdagIsosperms isoRepDAG1 isoRepDAG2 isoRepDAG3termscoeffzeroaddmergeee1e2e3e'e1'e2'e3'zerofsumfdelta$fCoalgebrak(,) $fAlgebrak(,)$fCoalgebrakEither$fAlgebrakEither*.rewrite1splitSubstring findOverlap knuthBendix1shortlex knuthBendix2 knuthBendix3s_s1s3_S'tri_D toListSet isListSetunion intersect\\symDiffdisjointisSubsetrotateL fromPairs fromPairs'toPairsfromListsupp fromCyclestoCyclescycleOfparitysignorderEltcommclosureSorbitorbitPorbitVorbitBorbitEorbits_D2dpwrtoSn fromDigits' fromBinary'eltsSminsupporderTGSeltsTGS tgsFromSgsgens~^^ conjClass reduceGensisSubgp isMinimal centralizercentre normalizer stabilizerptStabsetStab normalClosure commutatorGp derivedSubgp-*--**-cosets~~^conjugateSubgps subgpAction cosetRepsGxschreierGeneratorsGxsiftfindBasebsgsbsgs'newLevel newLevel'ssss' isMemberBSGSeltsBSGScartProd orderBSGSindexreduceGensBSGS testProdRepl updateArrayrssrss' initLevels updateLevels updateLevels'baseTransversalsSGSisLeftisRightunRight restrictLeft"transitiveConstituentHomomorphism' minimalBlockblockHomomorphism'intersectionNormalClosurecentralizerSymTranssetpowerset isSetSystemisGraphtoGraphfromIncidenceMatrixadjacencyMatrixfromAdjacencyMatrix tetrahedroncube octahedron dodecahedron icosahedron lineGraph lineGraph'sizevalency valenciesvalencyPartition regularParamnbrs findPaths findCyclesdistancePartition component componentsjohnsonbipartiteKneser desargues1gp petersen2prismdurer mobiusKantor dodecahedron2 desargues2cayleyDigraphPcayleyDigraphSfromTranspositions fromTrans bubblesorttoTranstoTranspositions inversions->^isArcTransitive'findArcsrefinerefine' isGraphAut graphAuts1 graphAuts2 graphAuts3 isSingleton graphAuts4eqgraph toEquitable toEquitable2 splitNumNbrs dfsEquitable graphIsos isGraphIsoisIso incidenceIsosisIncidenceIsofr rubikCube cornerFaces edgeFaceskerCornerFaces imCornerFaces kerEdgeFaces imEdgeFaces cornerBlocks edgeBlockskerCornerBlocksimCornerBlocks kerEdgeBlocks imEdgeBlocks_U_u_dbf_R_r_l_Lud_B_b_f_FSeqParComultCounitMultUnitIdOBABOSASs numeratorQ denominatorQ primitiveEltcharf29f31f37f41f43f47f53f59f61f67f71f73f79f83f89f97xshowUPtoUPolyconvertdegltmonomialmodUPextendedEuclidUP/>embedpolysf27a27f32a32 frobeniusAutdegreesqrt2sqrt3sqrt5sqrt7 sqrtminus2 sqrtminus3 sqrtminus5cmpTerm mergeTermscollectyzlmlc quotRemNPremNPremNP2toMonicinjectsPolygb1reducegb'gb2gb2'e_e4dim tensorBasis extRelationsextnf exteriorBasis symRelationssymnfsymmetricBasis weylRelationsweylnf weylBasisd_x_d1d2d3x1x2x3weylRelations'weylnf' weylBasis'dividesTdivT quotRemMPsl2VarlvartoMat2toEB2toEBncm signedSort coliftTC'degLM denominatorLMlcmLMdivLM quotRemLPreduceLPt denominatorLPsqrtvar^^^s4writhek3_1k4_1k5_1k7_1d' tlRelationsdimTLtlnftlBasistr'tra' fromBraidjonest_t1t2t3t4z' ihRelationsdimIHihnfihBasistau'tauhomflymhomfly'homfly''coeffsjones'OTParTSeqTXMinusXPlusCupTCapTIdTidVidV'evalVevalV'coevalVcoevalV'lambdac'testcc'mumu'capRLcapLRcupRLcupLRxplusxminusyplusyminustplustminuszpluszminusoloopotrefoil otrefoil'qvardetqvaq20aq02m2qsl2qybUnderTOverTlooptrefoilloopTtrefoilT$fFractionalVectreflasMatrixreprSO3'reprSO4'reprSO4dmproperlydividesflipbindtdividestdivtgcdtmult*->isGBpairWith!gb2agb3gb4mergeBysugar cmpNormalcmpSugmemberGB toElimFst toElimSnd isElimFst fromElimSnd eliminateFst quotientPmbasis numMonomialshilbertSeriesQA1dim'fMatrixfMatrix'idMxinverse1inverse2rowEchelonFormisZeroinSpanREkernel kernelRREpnfispnflineAGlinePGqtorialqnomial numFlatsPG numFlatsAGqtorialsqnomialsrrefslinesAG1linesAG2orderGLorderAfforderPGLheawooddesigntoDesignisValidpointsblocksnoRepeatedBlocks tDesignParamsfindvk findlambda designParams isStructureisDesign is2DesignisSquare subsetDesign pairDesign flatsDesignPGpg flatsDesignAGag paleyDesigncomplementaryDesign isDesignAut designAuts1 alphaL2_23 betaL2_23 gammaL2_23l2_23deltaM24octad s_5_8_24' alphaL2_11 betaL2_11 gammaL2_11l2_11deltaM12hexad hypergraph toHypergraphsame fromGraph fromDesigngriddualGridisGenQuadrangle'duads synthemesintersectionGraph srgParamsisSRGt'l2'l2 paleyGraphclebsch'clebschclebsch2triplesheptads+^+^^hoffmanSingleton'hoffmanSingleton inducedA7hsA7gewirtz'gewirtzhigmanSimsGraph'higmanSimsGraph inducedM22 higmanSimsM22_HS2_HSspswitch schlafli'schlafli mcLaughlin' mcLaughlin_McL2_McL isOneOfEachincidenceGraphLSincidenceGraphLS'findMOLSisOAfromLSfromMOLSgraphOA srgParamsOAimplies isReflexiveisAntisymmetricisPosetposet intervalsintervaldividesdivisors partitions isRefinementintervalPartitions isIntervalintervalPartitions2 subspaces isSubspace orderIsos01 orderIsos orderAuts1isLinextlinexts$fAlgebrakIntervalivPoset intervalIsos isIntervalIsointervalIsoMapmuIA1invIA1invIA'etaIAmuCmuBmuLexistsunique isShortlex toShortlex isClutter deletionsclosedUnderSubsetstsshowtsemptytsinserttsmember tssubmembertstolist tsfromlist fromIndeps1 cycleMatroid'incidenceGraphBincidenceGraphH matroidIsosuniformMatroid restriction1flats1 coveringFlats minimalFlat fromFlats' hyperplanes1fromHyperplanes1minimalisSimpleGeoRepisCircuitHyperplaneex161transversalGraphpartialMatchingsisCoindependentisCobase isCocircuitisColoop isCoparallel\\\///"fundamentalCircuitIncidenceMatrix'fcimfcim'markNonInitialRCs substStarsstarSubstitutionsVrepresentations1fcig markedfcimrepresentations2seriesConnectionparallelConnectiontwoSum matroidUnion vamosMatroid1 vamosMatroidp8' wheelGraphmw4w4'w4 isBinary2 rankPoly1numBases numIndeps numSpanning indepCounts whitney2nd whitney1st simpleSystemw weylPerms weylMatriceswMx cartanMatrixsetDiagdynkinFromCartan dynkinDiagramcoxeterFromDynkin coxeterMatrixfromCoxeterMatrixfromCoxeterMatrix2coxeterPresentation eltsCoxeter poincarePolyelemMxlieMult+|++-+form rootSystemnumRoots orderWeyl factorialnumPtsAGnumPtsPGelemTransvectionorderLorderS2orderS omegaevenomegaoddonorm squaresF9j9autJ9autAautBautCautsJ9conj'isAutisReal isComplexptsPG2orthogonalLinesPG2 rightLinesPG2 leftLinesPG2phiphi'collineationsPhi liftToGraphomega0omegaomega2collineationsOmegaomegaDomegaD1omegaD2psipsi2collineationsPsi collinear isQuadrangle concurrentisQuadrilateralisOval findOvals1findQuadrangles findOvalstoListexpose antiCommutes octonionsisUnitunitImagOctonionsautFrom%^alpha3beta3gamma3sgamma3alpha3'beta3'gamma3'alpha4beta4gamma4sgamma4alpha4'beta4'gamma4'