Not sure if this is what you want, but here is a way to get a vector space basis. We need to extract the different exponent vectors, create a matrix with each row representing a polynomial, augment with the actual polynomials, and reduce to row echelon form.
I use an internal function to obtain the exponent vectors and facilitate creating the matrix representation, but this can be done in other ways.
polylist = {(1 - x) (1 - y) (y - x), -y (1 - x) (y - x),
y (1 - x) (1 - y), -x (1 - y) (y - x), -x (1 - x) (1 - y),
y (y - x), -y (1 - y), -y (1 - x)};
vars = {x, y};
terms = GroebnerBasis`DistributedTermsList[polylist, vars][[1]];
exponvecs = terms[[All, All, 1]];
exponbasis = Union[Flatten[exponvecs, 1]];
basisrules = Thread[exponbasis -> Range[Length[exponbasis]]];
matrix0 = Map[# /. basisrules &, terms];
matrix =
Normal[SparseArray[
Flatten@MapIndexed[{#2[[1]], #1[[1]]} -> #1[[2]] &,
matrix0, {2}]]];
augmat = Join[matrix, Transpose[{Expand[polylist]}], 2]
(* Out[472]= {{1, -1, -1, 0, 1,
1, -1, -x + x^2 + y - x^2 y - y^2 + x y^2}, {0, -1, 0, 1, 1, 0, -1,
x y - x^2 y - y^2 + x y^2}, {1, -1, 0, -1, 1, 0, 0,
y - x y - y^2 + x y^2}, {0, 0, 0, -1, 1, 1, -1,
x^2 - x y - x^2 y + x y^2}, {0, 0, -1, 1, 0,
1, -1, -x + x^2 + x y - x^2 y}, {0, 1, 0, -1, 0, 0,
0, -x y + y^2}, {-1, 1, 0, 0, 0, 0, 0, -y + y^2}, {-1, 0, 0, 1, 0,
0, 0, -y + x y}} *)
redmat = RowReduce[augmat]
(* Out[462]= {{1, 0, 0, 0, 0, 0, -1, y - x^2 y}, {0, 1, 0, 0, 0,
0, -1, -x^2 y + y^2}, {0, 0, 1, 0, 0, 0, -1, x - x^2 y}, {0, 0, 0,
1, 0, 0, -1, x y - x^2 y}, {0, 0, 0, 0, 1,
0, -1, -x^2 y + x y^2}, {0, 0, 0, 0, 0, 1, -1, x^2 - x^2 y}, {0, 0,
0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}} *)
basispolys = redmat[[All, -1]] /. 0 -> Nothing
(* Out[463]= {y - x^2 y, -x^2 y + y^2, x - x^2 y,
x y - x^2 y, -x^2 y + x y^2, x^2 - x^2 y} *)
GroebnerBasis
be acceptable, becauseGroebnerBasis[ listOfPolynomials, {x, y}]
returns{-y + y^2, x - y}
. $\endgroup$