Given the symbolic slack matrix X of a polytope, we may set to 1 the variables corresponding of a spanning forest of the bipartite graph associated with X. It can be useful to rehomogenize a polynomial in the variables that are left, reversing the dehomogenization process.
This function produces the rehomogenization of a polynomial following the spanning forest backwards. It is useful in the computation of the rehomogenization of the generators of an ideal, for example of the slack ideal.
i1 : R = QQ[x_1..x_12]; |
i2 : X = matrix {{0, x_1, 0, 0, x_2}, {x_3, 0, 0, 0, x_4}, {0, x_5, x_6, 0, 0}, {x_7, 0, x_8, 0, 0}, {0, x_9, 0, x_10, 0}, {x_11, 0, 0, x_12, 0}}; 6 5 o2 : Matrix R <--- R |
i3 : (Y, T) = setOnesForest X; |
i4 : remVars := flatten entries Y - set{0_(ring Y), 1_(ring Y)}; |
i5 : h = rehomogenizePolynomial(X, Y, T, remVars_0^2+remVars_0*remVars_1-1) 2 2 2 2 2 2 2 2 2 2 o5 = x x x x x x + x x x x x x x x - x x x x x x 1 4 6 7 10 11 1 2 3 4 5 8 10 11 2 3 6 7 9 12 o5 : R |
The object rehomogenizePolynomial is a method function.