# horrocks -- computes a local solution to the unimodular row problem over a localization at a maximal ideal

## Synopsis

• Usage:
U = horrocks(f,var,M)
• Inputs:
• f, , a unimodular matrix over a polynomial ring with coefficients in QQ, ZZ, or ZZ/p for p a prime integer
• var, , a variable in the polynomial ring
• M, an ideal, a maximal ideal in the polynomial ring excluding the given variable
• Optional inputs:
• Verbose => an integer, default value 0, which controls the level of output of the method (0, 1, 2, 3, or 4)
• CheckUnimodular => , default value false, which gives the user the option to test whether the given matrix is unimodular
• Outputs:
• U, , a local solution to the unimodular row problem

## Description

Given a unimodular row f over a polynomial ring R = S[x_1,\ldots,x_{n-1}][x_n] (where S is either QQ, ZZ, or ZZ/p) and a maximal ideal M in S[x_1,\ldots,x_{n-1}] , horrocks computes a unimodular matrix U over (S[x_1,\ldots,x_{n-1}]_M)[x_n] which solves the unimodular row problem for f. That is, f*U is of the form |1 0 ... 0|.

 i1 : S = ZZ[x] o1 = S o1 : PolynomialRing i2 : M = ideal(2,x) o2 = ideal (2, x) o2 : Ideal of S i3 : R = ZZ[x,y] o3 = R o3 : PolynomialRing i4 : f = matrix{{y^2+x^2*y+x,3*y+1,x^2}} o4 = | x2y+y2+x 3y+1 x2 | 1 3 o4 : Matrix R <--- R i5 : U = horrocks(f,y,M) o5 = | (-9)/(3x2-9x-1) (9y+3)/(3x2-9x-1) | (3x2+3y-1)/(3x2-9x-1) (-3x2y-3y2-3x)/(3x2-9x-1) | 0 0 ------------------------------------------------------------------------ 9x2/(3x2-9x-1) | (-3x4-3x2y+x2)/(3x2-9x-1) | 1 | 3 3 o5 : Matrix (frac R) <--- (frac R)

It is worth noting that M can be chosen to be an extension of a maximal ideal from S[x_1,\ldots,x_{n-1}] to the ring R. We repeat the above example with this convention.

 i6 : R = ZZ[x,y] o6 = R o6 : PolynomialRing i7 : f = matrix{{y^2+x^2*y+x,3*y+1,x^2}} o7 = | x2y+y2+x 3y+1 x2 | 1 3 o7 : Matrix R <--- R i8 : M = ideal(2,x) o8 = ideal (2, x) o8 : Ideal of R i9 : U = horrocks(f,y,M) o9 = | (-9)/(3x2-9x-1) (9y+3)/(3x2-9x-1) | (3x2+3y-1)/(3x2-9x-1) (-3x2y-3y2-3x)/(3x2-9x-1) | 0 0 ------------------------------------------------------------------------ 9x2/(3x2-9x-1) | (-3x4-3x2y+x2)/(3x2-9x-1) | 1 | 3 3 o9 : Matrix (frac R) <--- (frac R)

One can check that U is unimodular over (\mathbb{Z}[x]_{(2,x)})[y] (i.e. the determinant is a unit in this ring), and that U solves the unimodular row problem for f (i.e. f*U = |1 0 0|).

 i10 : det U -3 o10 = ------------ 2 3x - 9x - 1 o10 : frac R i11 : f*U o11 = | 1 0 0 | 1 3 o11 : Matrix (frac R) <--- (frac R)

Before applying horrocks one must guarantee that the first entry in the unimodular row is monic in the given variable. This can be accomplished, for example, by using the method changeVar. One can also use the method getMaxIdeal to construct a maximal ideal to localize at. We demonstrate the use of these methods in the next example.

 i12 : R = ZZ/11[x,y] o12 = R o12 : PolynomialRing i13 : f = matrix{{4*x^2-4*x*y+2*y^2+3*x-2*y+3,-2*x^2+2*x*y-4*y^2-2*x-2,-5*x^2-4*x*y-5*y^2+4*x+3*y+5}} o13 = | 4x2-4xy+2y2+3x-2y+3 -2x2+2xy-4y2-2x-2 -5x2-4xy-5y2+4x+3y+5 | 1 3 o13 : Matrix R <--- R i14 : isUnimodular f o14 = true i15 : M = getMaxIdeal(ideal(0_R),{x}) o15 = ideal x o15 : Ideal of R i16 : (N,subs,invSubs) = changeVar(f,{x,y}) o16 = (| -5 0 0 |, | x y |, | x y |) | 0 1 0 | | 0 0 1 | o16 : Sequence i17 : g = sub(f*N,subs) o17 = | 2x2-2xy+y2-4x-y-4 -2x2+2xy-4y2-2x-2 -5x2-4xy-5y2+4x+3y+5 | 1 3 o17 : Matrix R <--- R i18 : U = horrocks(g,y,M) o18 = | (4x2-3xy-x-2y-2)/(x4+2x2+4x-3) | (-2x2+2xy+4x+5y)/(x4+2x2+4x-3) | 0 ----------------------------------------------------------------------- (-4x3+4x2y+3xy2-3x2-xy+2y2-3x+1)/(x4+2x2+4x-3) (-4x3+4x2y-2xy2-2x2+xy-5y2-5x+5y-2)/(x4+2x2+4x-3) 0 ----------------------------------------------------------------------- (-2x4+x3y-3x2y2-4xy3+x3-3x2y-4xy2+y3-4x2-4xy-4y2+2x+5y-1)/(x4+2x2+4x-3) (x4+2x3y-2x2y2-xy3-5x3-5x2y+xy2+3y3+5x2+2xy-4y2+2x-3y)/(x4+2x2+4x-3) 1 ----------------------------------------------------------------------- | | | 3 3 o18 : Matrix (frac R) <--- (frac R)

Again we can check that U is unimodular over ((\mathbb{Z}/11\mathbb{Z})[x]_{(x)})[y] and that U solves the unimodular row problem for g.

 i19 : det U - 2x - 5 o19 = ----------------- 4 2 x + 2x + 4x - 3 o19 : frac R i20 : g*U o20 = | 1 0 0 | 1 3 o20 : Matrix (frac R) <--- (frac R)

## Caveat

horrocks may give undesired results if the given ideal is not actually maximal.