# ApCoCoA-1:NC.KernelOfHomomorphism

## NC.KernelOfHomomorphism

(Partial) (two-sided) leading-term ideal of the kernel of a K-algebra homomorphism.

### Syntax

```NC.KernelOfHomomorphism(X1:STRING, X2:STRING, Images:LIST):LIST
NC.KernelOfHomomorphism(X1:STRING, X2:STRING, Images:LIST, DegreeBound:INT, LoopBound:INT, Flag:INT):LIST
```

### Description

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.

Please set ring environment coefficient field K and alphabet (or indeterminates) X through the functions NC.SetFp(Prime) and NC.SetX(X), respectively, before calling the function. Default coefficient field is Q. Default ordering is length-lexicographic ordering ("LLEX"). For more information, please check the relevant functions.

• @param X1: a finite set of letters. It is of STRING type. Note that every letter in X1 MUST appear only once.The order of letters in X1 is very important, since X1 as well as Images are used to define a K-algebra homomorphism.

• @param X2: another finite set of letters. It is of STRING type. Note that X1 and X2 are disjoint.

• @param Images: a LIST of polynomials in K<X2>. Each polynomial is represented as a LIST of LISTs, which are pairs of form [C, W] where C is a coefficient and W is a word (or term). Each term is represented as a STRING. For example, xy^2x is represented as "xyyx", unit is represented as an empty string "". Then, polynomial F=xy-y+1 is represented as F:=[[1,"xy"], [-1, "y"], [1,""]]. 0 polynomial is represented as an empty LIST []. Note that the order of polynomials in Images is very important, since Images as well as X1 are used to defined a K-algebra homomorphism. For example, X1:="abc"; F1 := [[1,"x"], [1,"y"]]; F2 := [[1,"xx"],[1,"xy"]]; F3 := [[1,"yy"],[1,"yx"]]; Images := [F1, F2, F3]; these together define a K-algebra homomorphism by mapping a to F1, b to F2 and c to F3.

Since the algorithm used in this function is based on Groebner basis computation, we refer users to NC.GB or NC.ReducedGB for information about the following optional parameters:

• @param DegreeBound

• @param LoopBound

• @param Flag

• @return: a LIST of polynomials, which is a Groebner basis of the kernel of a K-algebra homomorphism if a finite Groebner basis exists, and is a partial Groebner basis otherwise.

#### Example

```X1 := <quotes>abc</quotes>;
X2 := <quotes>xy</quotes>;
F1 := [[1,<quotes>x</quotes>], [1,<quotes>y</quotes>]];
F2 := [[1,<quotes>xx</quotes>],[1,<quotes>xy</quotes>]];
F3 := [[1,<quotes>yy</quotes>],[1,<quotes>yx</quotes>]];
Images :=[F1, F2, F3]; -- a |-> F1; b |-> F2; c |-> F3
NC.KernelOfHomomorphism(X1, X2, Images);
[[[1, <quotes>ab</quotes>], [-1, <quotes>ba</quotes>], [1, <quotes>ac</quotes>], [-1, <quotes>ca</quotes>]], [[1, <quotes>aa</quotes>], [-1, <quotes>b</quotes>], [-1, <quotes>c</quotes>]]]
-------------------------------
```