Scholarly article on topic 'Computing over K-modules'

Computing over K-modules Academic research paper on "Computer and information sciences"

CC BY-NC-ND
0
0
Share paper
Keywords
{}

Abstract of research paper on Computer and information sciences, author of scientific article — Neil Ghani, Anne Heyworth

Abstract Kan extensions over the category of Sets provide a unifying framework for computation of group, monoid and category actions allowing a number of diverse problems to be solved with a generalised form of string rewriting. This paper extends these techniques to K-algebras and K-categories by using Gröbner basis techniques to compute Kan extensions over the category of K-modules.

Academic research paper on topic "Computing over K-modules"

URL: http://www.elsevier.nl/locate/entcs/volume61.html 17 pages

Computing over K-modules

Neil Gliani1 and Anne Hey worth 2,3

Department of Mathematics and Computer Science University of Leicester Leicester LEI 7RH, UK

Abstract

Kan extensions over the category of Sets provide a unifying framework for computation of group, monoid and category actions allowing a number of diverse problems to be solved with a generalised form of string rewriting. This paper extends these techniques to K-algebras and K-categories by using Grobner basis techniques to compute Kan extensions over the category of K-modules.

1 Introduction

Computer Algebra: Computer algebra packages are widely used in mathematics and computer science to solve combinatorial problems whose essence is the computation of the quotient of an algebraic structure. Such problems occur widely throughout mathematics in the theory of groups, rings, modules etc, and computer science, for example in equational reasoning [14] and the study of Petri nets [28]. Central to any computer algebra package is the representation of the algebraic structure to be quotiented as a data structure and the algorithms used to compute the quotient. Current packages suffer from two main drawbacks: i) computation is limited to those algebraic structures and quotients for which data structures and algorithms have been built into the package; and ii) many packages are limited to finite structures as they enumerate the elements of the quotient. Thus, although there are a number of successful computer algebra packages for computation over groups, for example Gap [12], and KBMAG [17], there is little support for computation structures such as rings, modules and algebras beyond 'Vector Enumerator' which implements a Todd-Coxeter type algorithm for modules [23].

1 Email: ngl30mcs.le.ac.uk

2 Email: ah830mcs.le.ac.uk

3 Supported by EPSRC grant number GR/R29604/01 Kan: A Categorical Approach to Computer Algebra

©2002 Published by Elsevier Science B. V.

Categorical Computer Algebra: Our long-term aim is to develop a generic computer algebra package Kan supporting the computation of a variety of quotients in different algebraic structures. Our central idea is to use generalised forms of rewriting to compute Kan extensions4 and then compute other quotients by expressing them as Kan extensions. The use of category theory as a meta-language for algebra can be traced back to Linton [22] and Lawvere [21] and the study of algebra has since remained central to the development of category theory [2], Our main contribution here is to observe that this meta-language extends naturally, through the use of Kan extensions, to cover computational algebra. The use of rewriting to perform computation ensures that, unlike enumerative methods, our algorithms are not limited to finite structures.

Computation over Sets: In our previous work we unified a number of different computational problems as Kan extensions whose codomain was the category Sets, These included a number of fundamental problems in computational group theory, for example the calculation of presentations, cosets, orbits and induced actions as such Kan extensions, as well as analogues in the theory of monoids and categories. The construction of groups and monoids from finite presentations is based upon the free monoid functor and hence leads to a notion of computation based upon a generalised form of string rewriting. The advantage of this approach is that instead of implementing a number of different algorithms, and providing each with a correctness proof, we need only implement a single algorithm which significantly reduces the work required. The correctness is also simplified because the structures being quotiented and their representation as Kan extensions are both algebraic in nature and because the quotient is simply the symmetric closure of the rewrite relation used to compute it. This work is summarised in Section 2 so as to allow the reader to familiarise themselves with our general approach.

Computation over /\-modules This paper extends our previous work [4] to computing K-modules, K-algebras and K-categories by using Kan extensions whose codomain is KMods, the category of K-modules, K-modules are of particular interest in representation theory, while Lie, Hecke, Serre and String algebras are widely studied examples of K-algebras, Rather than invent new computational paradigms for these structures, the categorical approach notes that K-algebras are internal monoids in the category KMods of K-modules in the same way that monoids are internal monoids in Sets, Hence one can compute with K-algebras by using the same Kan extensions as before but now the codomain of the Kan extension will be KMods, Overall, the change in algebraic structure from monoid-like structures to K-algebras is elegantly and succinctly modelled by computing the same Kan extensions but over a

4 Throughout this paper "Kan extension" is taken to mean left Kan extension

more complex base category. Having reduced computation with K-algebras to the computation of Kan extensions with codomain KMods, we then turn to the computation of these Kan extensions. The construction of K-algebras from finite presentations is based upon the free ring functor and this leads to computation based upon Grobner basis techniques.

Background: This synthesis of category theory and rewriting is part of a strand of research dating back to the late 1980's when it was observed that the traditional denotation models of computation based upon categories could be extended to cover operational aspects. The seminal research in this field has focused on the development of categorical models of rewriting [30,29,18,25,13]. We hope that, by leading to the actual production of software, this research will be seen as part of the maturing of the field of Categorical Rewriting.

Our work is related to that of Carmodv and Walters [6,7] who provided Todd-Coxeter algorithms for computing Kan Extensions but only over Sets. This was implemented by Eosebrugh in [10]. The rewriting techniques of [4] provided an alternative to their enumerative methods in the same way that string rewriting provides an alternative to traditional Todd-Coxeter for groups [9].

To summarise, this paper provides a number of theoretical and practical insights.

• We show that in the context of K-algebras and K-modules, different quotients can be modelled uniformly as Kan extensions

• We provide evidence that computing quotients in different algebraic structures can be achieved by changing the codomain of the associated Kan extension.

• We show that Kan extensions into the category KMods can be computed by Grobner basis techniques.

• We consequently provide algorithms for computing canonical quotients of K-algebras.

One further question needs to be addressed, namely the suitability of this paper for a theoretical computer science audience. Although modules and algebras may not be standard fare for such an audience we believe that our methodology is. Certainly, category theory has become widespread throughout the theoretical computer science community in providing a meta-language for computation. Indeed it is hard to find a modern paper on the denotational semantics of programming languages which is not written in the categorical dialect. Furthermore, rewriting falls clearly within the realms of theoretical computer science. We believe that the synthesis of category theory and rewriting will therefore be of interest to the participants of CATS2002.

The rest of the paper is structured as follows: Section 2 uses the examples of groups to explain our general approach, Section 3 introduces K-modules, K-algebras and K-categories and states their basic properties. Section 4 derives algorithms to compute Kan extensions over KMods and we briefly outline some examples in Section 5, We conclude in Section 6 by outlining plans for future research,

2 Computation over Sets

We illustrate our previous work on Kan extensions over Sets by describing several problems in computational group theory and our solution to them,

2.1 Four Problems in Computational Group Theory

Let U : Grp —Sets be the forgetful functor from the category of groups to the category of sets and F be its left adjoint.

Definition 2.1 A group presentation grp(X\R) consists of a finite set X and a finite subset R C F(X). A group G is presented by a group presentation grp(X\R) if and only if G is isomorphic to the quotient of F(X) by the equivalence relation induced by r ~ 0 for r E R.

Categorically, G is presented by grp(X\R) if and only if G is the coequalizer in Grp of

F(R)Z1 1F(X)

where r* is induced by the function sending r as an element of R to r as an element of F(X) and 0 is the constantly 0 function. Either way, G is a quotient of F(X) and for p E F(X), its equivalence class in G is written [p]G.

Problem 2.2 Given a group presentation grp(X\R) of G and elements p, q E F(X), is it the case that \j)]g = [q]o?

Our second problem concerns cosets. Definition 2.3 (Cosets)

Let H be a subgroup of G. The set of cosets G/H is the quotient of the carrier set of G by the equivalence relation g ~ g + h where g E G and h e H. The equivalence class of g e G is written gH

In general, the cosets G/H form a set and not a group — the obvious notion of multiplication is not well-defined on the equivalence classes of G/H. This example shows that one cannot base a general model of algebraic computation on coequalisers as all objects would have to reside in the same category.

Problem 2.4 Let H be a subgroup of G and 51,52 G G. Does g\H = g2H ?

Our third problem concerns the notion of an action, or G-set, and seeks to calculate the quotient of the carrier set by the action.

Definition 2.5 If G is a group, then a G-set is a set X with a function GxI~>I (here written by juxtaposition) such that lx = x and (gi + g2)x = 9i{mx).

The orbits of the action are the collections of elements of the set which can be obtained by applying the action repeatedly to an element.

Problem 2.6 Let 4>: G x X —X be a G-set. The orbits of (j) is the quotient of X under the equivalence relation x ~ gx for g e G. The orbit of x e X is denoted [x]^. Given elements xq,xi e X, is it the case that [xq]^ = [xi]^.

Finally, we introduce the problem of induced actions.

Problem 2.7 Let 4> : G x X —X be a G-set and f \ G G' be a group homomorphism. The induced action (f)/f is the G'-set whose carrier is the quotient of X x G' by the equivalence relation

{gx,g')~{x,f{g)g') (1)

2.2 Unification of Quotients as Kan-extensions

One could write an algorithm, together with an associated correctness proof, for each quotient one wants to compute. Although this is possible, the volume of work makes this a lengthy process and increases the possibility of errors arising in the algorithms or their implementation.

Our alternative approach begins by translating these problems into category theory. First note that we can regard a group G as a category with one object and whose hom-set is the set G. Composition in the category is given by addition in the group and the identity is the zero of the group. Of course, this construction works for any monoid — the presence of inverses in the group means that every arrow in the associated category is an isomorphism. We use G to denote both a group and its associated category. In the same way, group homomorphisms form functors. Actions are also functors. In particular, given an action (j> : G x X —X we define a functor o : (,' —Sets whose action sends the object of G to X and every g e G to the function <f>(g) : X —X defined by <t>(g)(x) = gx. The G-set axioms correspond precisely to the funetorialitv axioms. If G is a group, we also use G to denote its categorical representation and similarly for homomorphisms and actions.

Let us turn to our four computational problems. We start with, because it turns out to be most general, the problem of induced actions. Recall that we have a G-set (j> : G x X —X and a homomorphism f \ G G'. The induced action is the G'-action (j)/ f whose carrier is the equivalence classes of X x G' under the equivalence relation (gx, h) ~ (x, f(g)h) and whose action is h'{x,h) = (x,h'h). A priori, this particular quotient does not appear to have any simple categorical explanation in the way that groups, homomorphisms

and actions did. However, note there is a natural transformation

e\<t>=> o/f o / : G ->• Sets

whose only component r* : .V —.V x G'/ ~ is defined by e(x) = [(x,l)], i.e. the map sending x to the equivalence class of (x,l). The naturalitv of e is precisely equation 1, The fact that the induced action is the quotient of equation 1 means that the induced action is the smallest G'-set equipped with such a natural transformation. That is, there is a natural bijection between G'-sets tj) equipped with a natural transformation a : 4> —ip o f and natural transformations 4>/f =>■ ip. The induced action is simply the left Kan extension of 4> along / written Lanf<p.

Definition 2.8 (Left Kan Extensions) Let F : A —G and G : A ^ B be

functors. The left Kan extension of F along G is a functor LanGF : B —G such that there is a natural bijection Nat(LanGF, H) = Nat(F, HG).

Kan extensions were originally developed 40 years ago [19] and have since become a fundamental construction in category theory [8,24], There are a number of alternative formulations of left Kan extensions, e.g. when it exists, LanG_ H _oG : CA —CB, The above discussion shows that induced actions are Kan extensions — the natural transformation e is the unit of the adjunction and the bijection property of e is the universal property of the unit. By itself, representing induced actions as Kan extensions is not so interesting. However, what is interesting is that all of the other problems encountered so far are also induced actions and hence left Kan extensions.

Lemma 2.9 Let 1 he the group with one element and !G : G —1 the unique group homomorphism from G to 1. The orbit of an action o : G ^ Sets is the induced action of <p along \q, or equivalently, Lan^.

Proof. The induced action is a quotient of </>(*) x 1 which is isomorphic to 4>(*). The equivalence relations are also isomorphic: {gx,*} ~ {x,\G(g)*} = (x, *), □

Lemma 2.10 Let H he a subgroup of G. If <f> is the trivial action of H on the one point set *, then the right (and left) cosets G/H are isomorphic to the induced action of <f> along the inclusion i : H —t G or, equivalently, the Kan extension Lan(o.

Proof. The induced action is a quotient of 1 x G which is isomorphic to G, The defining equivalence relations are also isomorphic (*,g) = (*h,g} ~ (*,hg). □

So we have an elegant and abstract way of encoding computational problems as Kan extensions. The reader may argue that since all of our examples are induced actions, induced actions could be taken as the primary concept. In fact induced actions are precisely Kan extensions of functors whose domain

and codomain are 1-objeet categories. The extra generality afforded by Kan extensions is crucial in modelling several computational problems , for example colimits and path algebras as we mention in Section 5, subsectionComputation via String Rewriting

The key to the computation of Kan extensions is their expression as coends

where ® is the tensor operation. In the examples presented above, the codomain of M is Sets and hence MA is just a set while the tensor operation is cartesian product. In addition, the categories A and B are generated from graphs and hence B(FA, B) a set of equivalence classes of paths over a generating set kB. Thus (LanFM)B is contained in the quotient of the free monoid (MA x kB)* by the equivalence relation induced by the relations of B and the Kan relations (.F(f)(a),g) (M(f)g). Since these relations are strings, we have expressed the Kan extension as a quotient of a free monoid by a set of equations between words, ie a problem expressible within the string rewriting formalism. In particular, one can use Knuth-Bendix completion for string rewriting to generate (if possible) a complete string rewrite system and hence decide when two elements of (MA x Ab)* represent the same element in the Kan extension.

3 Computation over K-modules

Rather than developing new data structures and algorithms for computing with K-modules, algebras and categories, we regard them as internal constructions in KMods and then compute with them as before. In order to do so, we define the notion of internal monoid — see [24] for details.

Definition 3.1 A monoid in a monoidal category (C,®,I) consists of an object X of C together with maps e : 1 —X and m, : X ® X —X such that the obvious monoid laws hold. Given a monoid (X, e, m), the map Z X®Z defines the action of a monad on C, An A-action is an X ® _-algebra.

For example, a monoid M is a monoid in Sets, while a M-action is precisely a M-set, In the category Ab of abelian groups, a monoid in Ab is a ring R, while an R-action is a /¿-module, In the category KMods of K-modules, a monoid is a K-algebra A while an A-aetion is an A-module, We now give more traditional definitions of K-modules etc.

Definition 3.2 (ii-modules)

Let K be a field, A K-module is an abelian group £ together with a scalar

multiplication a;iixS-^S (written by juxtaposition) such that

k(g + h) =kg+kh (h + k2)g = hg + k2g (kik2)g = h(k2g) 1 m = m.

The first three equations guarantee that a is a bilinear map and, by the universal property of the tensor of abelian groups, therefore it can be identified with a group homomorphism a : K ® A —A. The third and fourth equations then make a into a K ® _-algebra. Since K-modules are K ® _-algebras, we could define KMods to be the Eilenberg-Moore category of the K ® _-monad. More concretely,

Definition 3.3 (The category KMods)

Given K-modules a : K ® A —A and /3 : K ® B B, a K-module homomorphism is a group homomorphism / : A B such that f(kg) = kf(g). The category KMods has as objects K-modules and as morphisms ii-module homomorphisms.

The condition on K-module homomorphisms can be written as a commuting diagram in Ab

K® A-

K®f f

which illustrates K-module homomorphisms as K®_-algebra homomorphisms. The categorical approach to modules gives immediate results on the structure of KMods, Firstly, one can construct free K-modules over sets.

Lemma 3.4 The forgetful functor UM : KMods Sets has a left adjoint FM whose action maps a set S to the set of all polynomials k\Si + • • • + knsn for Si e S and ki G K.

In fact KMods arises as a finitarv algebraic theory, so we have the following lemma.

Lemma 3.5 KMods is locally finitely presentable and hence complete and co-complete.

A consequence of this lemma is that a K-module £ is finitely presented if there is a pair modK{A\R) where A is a finite set and R C FM(A) is a finite set such that £ is the coequaliser in KMods of the following diagram

FM{R)\

:FM(A)

where r* is the module homomorphism defined by sending r to its canonical interpretation in FM(A) and 0 is the map which is constantly 0, More concretely, given a presentation modK{A\R), define an equivalence relation on FM(A) by / =R h if and only if / = h + kiri + • • • + knrn for kjt E K and ri E R. Then, the set theoretic quotient FM(A)/ =r is a K-module and we say £ is presented by modK(h-\R) if and only if £ ~ FM(A)/ =r.

Lemma 3.6 KMods is a symmetric monoidal closed category as follows

• The unit is the free K-module on one generator, namely K

• The tensor of K-modules R® A ^ A and R® B —B is denoted A ®K B and is the quotient of A® B by the relation r(a® b) = ra ® b = a ® rb.

• The exponential [A, B] is the set of K-module homomorphisms between A and B. This set is an abelian group:

(f + g)x = fx + gx, Qx = 0, (f'l)x = (fx)'1.

The scalar 'multiplication K ® [A, B] —[A, B] is given by (rf)(x) = r(fx).

Proof. The proof rests upon KMods arising as an example of a commutative algebraic theory. Note that the commutativitv of the theory is essential, eg the category of groups is not closed. See Borceux 2 ppl72 or MacLane ppl80 [3,24]. □

3.1 Enrichment over KMods

We have represented K-algebras as monoids in the category of K-modules. Recall that computing with groups amounted to turning them into categories and we do the same for K-algebras, Indeed, this is a general construction mapping monoids in a monoidal category to categories. In fact the category we get is enriched over the ambient category. Enriched categories are categories whose hom is not a set but an object of some other category. We give a basic description and refer the reader to [3,20] for more details. If V is a monoidal category, a F-eategorv C consists of a class of objects \C\ and, for each pair of objects a hom C(A,B) which is an object of V. In addition,

• Identities are given by requiring for each object A E |C|, a map 1A \ I C(A, A) in V

• Composition is given by requiring for each triple of objects A,B,C E \C\ a map mA.B,c ■ C(A, B) ® C(B, C) -t C(A, C) in V.

The maps are required to be identities for composition and composition is required to be associative, F-funetors are defined similarly. If V = Sets we get the usual definition of a category. If V = Pre we get ordered categories while if V = Cat we get 2-eategories, In this paper, we are interested K-algebras which are monoids in KMods which will then turn into one object, KMods-enriched categories, or K-categories for short,

Lemma 3.7 Let X he a monoid in a monoidal category V. Then X defines a one-object V-enriched category. If V is closed, then every X-action a : X ® Y —Y defines a V-functor a : X —V.

Proof. The proof is the obvious generalisation the presentation in Section 2 of groups as categories. Let X be a monoid in V. definitionine the F-categorv X to have one object and hom A(*, *) = X. The monoid structure of X ensures that X is then a F-categorv,

For the second part of the lemma, note first that the assumption that V is closed is required to ensure that V is a F-categorv, To define a F-functor a : X —V we must map the single object of X to an object of V and the obvious choice is o(*) = X. The rest of the proof is then standard with the action axioms translating precisely into the axioms of a functor, □

Although computing with K-algebras requires only one object K-categories, as we remarked before this is overly limiting and in general we want to compute with finitely presented K-categories, These are a synthesis of the usual presentation of categories based upon the path functor and the presentations of K-modules given above. The free K-eategory on the graph A is the category PKA whose objects are the objects of A and whose homs are I'kM A. B) = FM(PA)(A, B) where A,B E ObA, /' : Gph Cat is the path functor and FM is the free module functor. More concretely, Pk&(A, B) consists of all polynomials of the form p = k\W\ H-----b knwn where k\,... ,kn E K

and wi,... ,wn E -PA (A, B). As usual, finitely presented K-categories are a quotient of a free K-eategory by a set of relations [26],

Definition 3.8 (K-category presentation)

A K-eategorv presentation cosists of a finite directed graph A and a set of elements R of the free K-eategorv JVA on A, We may write the presentation as catxi^lR). The category presented has the same objects as A and its arrows are the equivalence classes of An /'/, A under the relation generated by R; i.e. =R which is defined by

/ =R h if and only if f =Rh + hpinqi H-----b knpnrnqn

where r, E R. k, E K and Pi,qi are arrows of PKA whose composites are defined,

4 Computing Kan Extensions over /\'-rnodules

We now formally define those Kan extensions to which we will compute with Grobner basis techniques.

Definition 4.1 (Kan Presentations)

A Kan presentation for K-categories is a quintuple V := kan{T, A, R, M. F) where

i) T and A are (directed) finite graphs;

ii) M : T —KMods and F : T —Pk& are graph morphisms; For every object .1 G I'. M(A) is presented by modK{kA, RA).

iii) R is a finite set of relations on PKA,

kan(r, A, R, M, F) presents the Kan extension of (Mf, F') where M' : A — KMods and F' : A —B if A is the free K-eategorv on T, cai^A,/?) is a K-categorv presentation for B, M induces M' and F induces F'. As we have seen, a Kan extension LanFM can be computed pointwise by the coend formula

/AeObA

MA ® B(FA, B)

In our setting, both MA and B(FA, B) are finitely presented K-modules, The tensor product of two finitely presented K-modules is finitely presented and so we consider the free module over the generators as a basic data structure over which three forms of equation, and later rewrite rule, will occur: firstly equations pertaining to the presentation of MA, secondly the relations defining B and finally the equations defining the actual Kan extension. Thus, for each B G ObB and A G ObB define TAyB to be

Ta,b = Fm(AaxPA(FA,B)).

Further define TB := LLeobr and T := UseObA Tb- Alternatively, TAtB is

the set of all elements ki\ipi-\-----hkn\npn where hi,..., kn G K, Ai,..., Xn G

A.4 and pi,... ,pn G PA(FA, B). We will refer to the elements Ap as the terms of T, whilst noting that not all formal sums of these elements are defined in T. In addition, let a,r : T ObA be defined by a{t) := F(A) and r(t) := B for t G TAtB. These are, in effect, source and target functions.

As mentioned above, to construct the Kan extension Lan/. .1/ we need to combine the relations for the category B with the relations in the K-module presentations defining M and relations to force there to be only one natural transformation e from M to Lan/. .1/ o F. Given three sets of relations; Qt Q T, Qm ^ u i oi.r -Pm[Aa] and Qit c An /'/, A. define Q = QT + Qr + Qm-We compute q in T by embedding T in the free polynomial ring T+ = K[(A+ ArrA)*] where A = U.4eobrA.4. We choose an admissible well-ordering > on the monoid (A + ArrA)*, i.e. a well-ordering on the elements of (A + ArrA)* such that if Ui > u2 then tu\V > tu2v for /. r G (A + ArrA)*. Note that this ordering is stronger than we need, but it is computationally practical as well as more easily defined.

The leading term of any polynomial q = k\Ui + • —b knun of T+ is defined to be the element LT(g) = u¿ in (A + ArrA)* which is largest with respect to the given ordering. The coefficient of u¿ in q is A;¿. We note that for polynomials

generating an ideal in T+ we can divide them all by the coefficient of their leading terms; so we can assume that the coefficient of the leading term is 1,

Definition 4.2 The reduction relation —q on T is defined by

f ->q f - kuqv

when u(LT(<7))t; occurs in / with coefficient k E K where either

i) q is in QT or QM, u = 1 and v E PA with r(q) = src(v),

ii) q E Qr, ii E / and v E PA and r(u) = src{q) and tgt(q) = src{v).

The reflexive, symmetric and transitive closure of —q is denoted Aq. The equivalence classes of T under A-q are denoted [t]q. Note that if t E TB and ti ^q t2, then t2 E TB and also that the relation preserves addition and scalar multiplication. This gives us the following result.

Lemma 4.3 For Q, TB as above, the restriction of reduction relation q to the module TB, is well defined, i.e. if t ETB then \t]q C TB and TB/ is a K-module.

We now prove that the reduction relation generated by Q on the set of terms T, that we have described, captures the Kan extension.

Theorem 4.4

Let V := kan(r, A, R, M, F) be a presentation of a left Kan extension over KMods. Define

i) Qt := A • F(a) — M{a){A) for all A e AM(src(a)), for all a E An I'.

ii) Qm '■= LJ i, om i • in) Qr := R.

Then the left Kan extension presented by V is (LanpM,e) where

i) LanFM(B) is the K-module TB/

ii) LanFM(b) is defined by LanFM(b)[t]q := [tb]q for b in ArrA, Hi) e : M Lan/. .1/ o F is given by £a(A) := [X1fA]q.

Proof. It is required to verify that Lan/. .1/. as defined above, is a well-defined K-functor, This can be deduced from the fact that the congruence preserves addition, scalar multiplication and right-multiplication.

To verify that e is a natural transformation of K-functors is straightforward. Let q '. A\ —y A2 in A, Then let ¡x be an element of M(Ai). Now by definition (LanFM) (Fa) (eAt (p)) = (LanFM) (Fa) ([pifa^q) = [/¿1 f.AiP]q = [^p]q where [p]r = Fa, and £a2(Mg-(^)) = £a2([ij'P]q) = [ij'P^fa2]q = [lJ>p] so Lan/. .1/Fa o eAl = £a2 o Ma for all arrows a : Ai A2 in A,

The universal property completes the proof. Let (E', e') be a pair such that

E' is a K-functor from B —y KMods and e' is a natural transformation of K-functors, Any natural transformation of K-functors a : LanFM —y E' such that e o a = e' must satisfy the commutative diagram:

.U(,l,)——Lan/. .1//•'(. 1| j —— /•.•'/•'(.I,;

Lan FM(p) £a2

Lan/. .1/l-'(. lj}—~ l-:'F(A-j)

which allows the unique definition a(p) = E'(p)(e'( 1a))- Hence (Lan/. .1/. :) is universal. □

By making the following observations about T and M. we can apply the standard methods of noneommutative Grobner bases [11,27] to obtain a set of polynomials Q' so that Aq coincides with Prq> and A-q> is complete. Recall T is a submodule of the K-module T+ = K[(A + ArrA)*] which is a free polynomial ring. Secondly, we can define on K[(A + ArrA)*] by / / — kuqv for all k E K and u,v E (A + ArrA)* such that uLT(q)v occurs in / with coefficient k. Observe that the restriction to T of . coincides with our original relation —and that if is complete on T+, then q is complete on T. Recall that we can use Buchberger's Algorithm to try to compute a Grobner basis for Q in T+, and thus find Q' such that q>+ is complete. Furthermore, no computation during the execution of Buchberger's Algorithm for Q will yield a polynomial which is not a member of the submodule i of I . Therefore, if Buchberger's Algorithm applied to Q in T+ terminates, giving a Grobner basis Q', then Q' is a subset of T + ArrPKA so —yQ> is well-defined and convergent on T. This gives us the following result.

Corollary 4.5 (Application of Grobner Basis Theory)

Grobner bases can be used to compute left Kan extensions of the above type.

Outline Proof Given Q, we can use the noneommutative version of Buchberger's Algorithm in the usual way [27] to attempt to compute a Grobner basis in T+. Suppose Q' is a Grobner basis for Q in T+, then Q generates a convergent reduction relation on T and the Kan extension is given by the following:

i) LanFM(B) := irrQ/(TB),

ii) LanFM(b) : t ixTQi(tp), for t in LanFM(B), p in PKA such that 0(p) = b and src(p) = r(t),

iii) ^a(A) := A.

where irr^/ (t) is the irreducible result of repeated reduction of t by —and

±ttqi(Tb) is the set of all terms in TB which are irreducible with respect to *

5 Examples

We complete the paper by showing how our computational Kan extensions can be used to solve a number of problems of importance to researchers in mathematics. The first concerns presentations of K-algebras, which recall we represent as 1-objeet K-categories. Thus, a K-algebra presentation is a K-eategory presentation whose graph has one vertex. Given a K-algebra presentation catK{A, R) of B and two elements a, ¡3 of the free K-algebra on A, is it the case that [a]b = [(3]b?

Example 5.1 (Algebra presentation) Let A be the trivial K-category and let B be the K-category B. Let F : A —B be unique functor and let M : A — KMods 'map the object of A to the K-module K. Then computing Lan /. / is equivalent to computing the algebra presented by K[X*]/ =R where X is the set of edges in A. In detail, the functor Lan/. .1/. when applied to the object of B, gives a K-module isomorphic to the algebra (quotient of a 'monoid ring) K[X*]/ =R. On arrows, the functor gives us automorphisms of the module, which define a right action of the module on itself LanFM(b)p = pb. This gives the 'multiplication for the algebra. The natural transformation e picks out the monomial which is the multiplicative identity of the algebra i.e. £a(1) =

The construction of the quiver algebra over a graph is a fundamental construction in representation theory. This can be modelled as follows. Note that this example requires Kan extensions of functors whose domain/codomain have more than one object.

Example 5.2 (Path Algebra) Let B be a path algebra, i.e. the free K-category over a graph A. Let T have the same vertices as A but an empty set of edges and F the inclusion. Let M : A —KMods 'map each object of A to the K-module K. Then the Kan extension LanFM defines the quiver algebra over B.

The free module over an algebra may be computed as follows.

Example 5.3 (Free module over an algebra) Let A be the trivial K-category and let M 'map it to a free K-module on a set of generators A. Then let B be K-algebras regarded as a one object K-category. Let F be the functor from A to B. Then the Kan extension of M along F gives the free B-module on A.

The coset construction is fundamental throughout algebra. We have already seen it in the context of group theory and the following example constructs cosets of K-algebras. Note how the construction is only changed by the enrichment with the unit of the monoidal structure on Sets namely 1 being replaced by the unit of the monoidal structure on KMods, namely K.

Example 5.4 (Cosets of a sub-algebra in a K-algebra) Let A and B be

K-algebras, regarded as one object K-categories enriched over KMods. Let F be inclusion of A into B. Then let M map the object of A the K-module K, and all the arrows to the identity K-module morphism. Then Lan /. / maps the single object of B to the module of cosets of A in B.

As is well known, eolimits in categories are Kan extensions along a functor into the terminal category. Enriching this construction allows us to calculate eolimits of K-modules. For simplicity, we tackle coproducts i.e. direct sums and note that this example requires Kan extensions of functors whose domain is not a single object K-categorv. See MacLane for details [24]

Example 5.5 (Coproducts/Direct sums of K-modules) Let A be a discrete category with n objects, and let B be the trivial K-category. Let F be the unique functor from A to B and let M map the objects of A to K-modules Mi,... ,Mn. Then the Kan extension LanpM calculates the coproduct/direct sum Mi + .. + \1„ of K-modules.

Our last example is that of induced modules

Example 5.6 (Induced Modules) Let A and B be K-algebras represented as one object K-categories and let F : A —B. Let M map the object of A to a K-module M(A) and the arrows to endomorphisms of the K-module; then M defines a right A-module. The Kan extension of M along F gives the right B-module induced by F on M. In detail, LanpM(B) is a K-module and LanFM(b) : Lan^M(i?) —Lan^M(i?) gives a right action of the elements of the K-algebra B on LanFMB. The universal property of the natural transformation £a M(A) —LanpM(B) confirms that LanpM(B) is the induced module.

6 Further work

We have shown that category theory, in particular Kan extensions, provides an expressive meta-language for describing various quotients involving K-modules, K-algebras and K-categories. We also showed how Grobner bases techniques could be applied to compute these Kan extensions, thereby opening the way to their formal implementation as part of a computer algebra package. We feel that the unification of quotients at the level of Kan extensions, and the unification of computation in different algebraic structures by a change of enrichment, is an elegant theoretical insight which will also significantly improve the quality and reliability of the software.

Future work lies in two directions concerning the implementation of these algorithms and their further theoretical development. The current implementation is a collection of functions written in Gap, which need further development. Interfacing the functions for the Kan extensions with a faster Grobner basis

program is one possibility for increasing efficiency. We are discussing our algorithms with algebraists in order to get more examples to test, in particular we would like to investigate further the possibility for computing tensor products as Kan extensions. On the theoretical side, there are a number of enhancements we have in mind: using modularity results in rewriting to integrate the different notions of rewriting used; using automata theory to give language-theoretic descriptions of the normal forms of computation; and optimising the Knuth Bendix process for obtaining complete rewrite systems. Overall there is certainly much more to do.

References

[1] F. Baader and T. Nipkow: Term Rewriting and All That Cambridge University Press (1998)

[2] M. Barr and C. Wells : Toposes, Triples and Theories, Springer, Grundlehren der Mathematischen Wissenschaften Series no.278 (1985)

[3] F. Borceux: Handbook of categorical algebra , Encyclopedia of mathematics and its applications, Vol. 50, p. xv,345p, Basic category theory/ Francis Borceux Cambridge: Cambridge University Press, 1994.

[4] R. Brown and A. Heyworth: Using Rewrite Systems to Compute Kan Extensions and Induced Actions of Categories Journal of Symbolic Computation, vol.29 p5-31 (2000)

[5] M. R. Bush, M. Leeming and R. F. C. Walters: Computing Left Kan Extensions Journal of Symbolic Computation, vol.11 pll-20 (1997)

[6] S. Carmody, M. Leeming and R. F. C. Walters: The Todd-Coxeter Procedure and Left Kan Extensions Journal of Symbolic Computation, 19 p459-488 (1995)

[7] S. Carmody and R. F. C. Walters: Computing Quotients of Actions on a Free Category in A. Carboni, M. C. Pedicchio, G. Rosolini (eds), Category Theory, Proceedings of the Int. Conf. Como, Italy 22-28 July 1990 vol.1144 of Lectures Notes in Mathematics, pl31-56, Springer-Verlag (2000)

[8] E. J. Dubuc : Kan Extensions in Enriched Category Theory Springer Lecture Notes in Mathematics, vol.245 (1970)

[9] D. B. A. Epstein with J. W. Cannon et al: Word processing in groups Jones and Bartlett, Boston (1992)

[10] M. Fleming, R. Gunther and R. Rosebrugh: User Guide for the Categories Database and Manual anonymous ftp://sunl.mta.ca/pub/papers/rosebrugh/catdsalg.dvi,tex and /catuser.dvi,tex (1996)

[11] R. Froberg: An Introduction to Grobner Bases John Wiley and Sons (1997)

[12] The GAP Group, 'GAP - Groups, Algorithms, and Programming, Version 4', Aachen, St Andrews, (1998) (http://www-gap.dcs.st-and.ac.uk/~gap).

[13] N. Ghani and C. Liith: Monads and Modular Rewriting Proc. Category Theory and Computer Science 1997, Lecture Notes in Computer Science, SpringerVerlag 1290 p69-86 (1997)

[14] J. Goguen and T. Winkler : Introducing obj3, Technical Report SRI-CSL-88-8, SRI (1993)

[15] A. Heyworth: Groebner Basis Techniques for Computing Actions of K-Categories, Proceedings of Category Theory 2000 16-22 July, Como, Italy, 105113 (2000)

[16] A. Heyworth and J. Snellman: Grobner Bases for Modules University of Leicester, preprint (2001)

[17] D. F. Holt : Knuth-Bendix in Monoids, and Automatic Groups, Univ. of Warwick (1996).

[18] C. B. Jay : Modelling Reduction in Confluent Categories Applications of Categories in Computer Science pl43-62 C.U.P. (1992)

[19] D. M. Kan: Adjoint Functors, Trans. Am. Math. Soc. 87 p294-329 (1958)

[20] G. M. Kelly : Basic Concepts of Enriched Category Theory, London Math Soc. C.U.P. no.64 (1982)

[21] F. W. Lawvere : Functorial Semantics of Algebraic Theories Proc. Nat. Academ. of Sciences vol.50 P869-872 (1963)

[22] F. E. J. Linton : Some Aspects of Equational Categories Proc. of Conference on Categorical Algebra p84-94 Springer-Verlag (1965)

[23] S. A. Linton : On Vector Enumeration, Linear Algebra and its Applications 192 p235-48 (1993)

[24] S. Mac Lane : Categories for the Working Mathematician, Springer-Verlag,

(1971)

[25] P. -A. Mellies : A Stability Theorem in Rewriting Theory /,ICS: IEEE Symposium, on Logic in Computer Science, (1998)

[26] B. Mitchell: Rings with Several Objects Advances in Mathematics vol.8 no.l

(1972)

[27] T. Mora, Seven Variations on Standard Bases, Preprint, University of Genova, http://www.disi.unige.it/ftp/person/MoraF/7Varietions.tar.gz, 1988.

[28] T. Murata : Petri nets: Properties, Analysis and Applications, Proceedings of the IEEE, vol.77 no.4 (1989)

[29] D. E. Rydeheard and J. G. Stell : Foundations of Equational Deduction - A Categorical Treatment of Equational Proofs and Unification Algorithms, Proc. CTCS'87 LNCS 283 114-139 Springer (1987)

[30] R. A. G. Seely : Modelling Computations: A 2-categorical Framework, Symposium on Logic in Computer Science p65-71 IEEE Computer Society Press (1987)