normalElements(A,n,x)
Let b_1,...,b_n be a monomial basis for a noncommutative Ring A in degree d. We assume A is generated by elements a_1,...,a_k of degree 1. A homogeneous element r in A is normal if a_i*r is in the span of the r*a_j for all i.
Using the input symbols x and y, we define the "normal variety" to be the set of common solutions to the equations x_j*a_i*b_j = y_j1*b_j*a_1+...+y_jk*b_j*a_k for all i and j. Saturating the ideal at each x_i we extract polynomial equations the x_i must satisfy for the element x_1*b_1+...+x_n*b_n to be normal in A.
Before computing the normal variety, this method checks for normal monomials in degree n. These are returned first to reduce the complexity of the problem. Then the method computes the variety and returns its components. The equations the method returns are given in terms of the indexed variable x. The indices are basis monomials in degree n.
The following example is a 3dimensional Sklyanin algebra.



The normal elements in degree 2 are x^2, y^2 and z^2. The basis calculation shows y^2 and z^2 are normal forms in B. The normalElements method first checks all basis monomials using isNormal. In this case it finds y^2 and z^2 are normal and returns this information. However, x^2 is not a normal form expression. The normal form of x^2 is y*z+z*y. In the second phase of the calculation, the method returns generators of the ideal describing the normal elements (excluding the normal monomials). We see the coefficients of basis monomials z*x and y*x must be 0 and the coefficients of y*z and z*y must be equal. These equations identify x^2 = y*z+z*y as a normal element of degree 2.



In degree 3, there are no normal monomials, so the first part of the return value is the empty list. The second coordinate of the return value is a single matrix whose entries determine the equations that show that the only normal element of degree 3 (up to scaling) is the central element g.
The object normalElements is a method function.