class_docstr: A class for retrieving the Dixon's resultant of a multivariate
  system.
  
  Examples
  ========
  
  >>> from sympy import symbols
  
  >>> from sympy.polys.multivariate_resultants import DixonResultant
  >>> x, y = symbols('x, y')
  
  >>> p = x + y
  >>> q = x ** 2 + y ** 3
  >>> h = x ** 2 + y
  
  >>> dixon = DixonResultant(variables=[x, y], polynomials=[p, q, h])
  >>> poly = dixon.get_dixon_polynomial()
  >>> matrix = dixon.get_dixon_matrix(polynomial=poly)
  >>> matrix
  Matrix([
  [ 0,  0, -1,  0, -1],
  [ 0, -1,  0, -1,  0],
  [-1,  0,  1,  0,  0],
  [ 0, -1,  0,  0,  1],
  [-1,  0,  0,  1,  0]])
  >>> matrix.det()
  0
  
  See Also
  ========
  
  Notebook in examples: sympy/example/notebooks.
  
  References
  ==========
  
  .. [1] [Kapur1994]_
  .. [2] [Palancz08]_
class_docstr_tok: ["A","class","for","retrieving","the","Dixon","'s","resultant","of","a","multivariate","system",".","Examples","========",">",">",">","from","sympy","import","symbols",">",">",">","from","sympy.polys.multivariate_resultants","import","DixonResultant",">",">",">","x",",","y","=","symbols","(","'","x",",","y","'",")",">",">",">","p","=","x","+","y",">",">",">","q","=","x","*","*","2","+","y","*","*","3",">",">",">","h","=","x","*","*","2","+","y",">",">",">","dixon","=","DixonResultant","(","variables=","[","x",",","y","]",",","polynomials=","[","p",",","q",",","h","]",")",">",">",">","poly","=","dixon.get_dixon_polynomial","(",")",">",">",">","matrix","=","dixon.get_dixon_matrix","(","polynomial=poly",")",">",">",">","matrix","Matrix","(","[","[","0",",","0",",","-1",",","0",",","-1","]",",","[","0",",","-1",",","0",",","-1",",","0","]",",","[","-1",",","0",",","1",",","0",",","0","]",",","[","0",",","-1",",","0",",","0",",","1","]",",","[","-1",",","0",",","0",",","1",",","0","]","]",")",">",">",">","matrix.det","(",")","0","See","Also","========","Notebook","in","examples",":","sympy\/example\/notebooks",".","References","==========","..","[","1","]","[","Kapur1994","]","_","..","[","2","]","[","Palancz08","]","_"]
docstr: Test for the validity of the Kapur-Saxena-Yang precondition.
  
  The precondition requires that the column corresponding to the
  monomial 1 = x_1 ^ 0 * x_2 ^ 0 * ... * x_n ^ 0 is not a linear
  combination of the remaining ones. In SymPy notation this is
  the last column. For the precondition to hold the last non-zero
  row of the rref matrix should be of the form [0, 0, ..., 1].
docstr_tok: ["Test","for","the","validity","of","the","Kapur-Saxena-Yang","precondition",".","The","precondition","requires","that","the","column","corresponding","to","the","monomial","1","=","x_1","^","0","*","x_2","^","0","*","...","*","x_n","^","0","is","not","a","linear","combination","of","the","remaining","ones",".","In","SymPy","notation","this","is","the","last","column",".","For","the","precondition","to","hold","the","last","non-zero","row","of","the","rref","matrix","should","be","of","the","form","[","0",",","0",",","...",",","1","]","."]
code: def KSY_precondition(self, matrix):
      """
      Test for the validity of the Kapur-Saxena-Yang precondition.
  
      The precondition requires that the column corresponding to the
      monomial 1 = x_1 ^ 0 * x_2 ^ 0 * ... * x_n ^ 0 is not a linear
      combination of the remaining ones. In SymPy notation this is
      the last column. For the precondition to hold the last non-zero
      row of the rref matrix should be of the form [0, 0, ..., 1].
      """
      if matrix.is_zero_matrix:
          return False
  
      m, n = matrix.shape
  
      # simplify the matrix and keep only its non-zero rows
      matrix = simplify(matrix.rref()[0])
      rows = [
          i
          for i in range(m)
          if any(matrix[i, j] != 0 for j in range(n))
      ]
      matrix = matrix[rows, :]
  
      condition = Matrix([[0] * (n - 1) + [1]])
  
      if matrix[-1, :] == condition:
          return True
      else:
          return False
  
imports: from math import prod
  from sympy.core.mul import Mul
  from sympy.matrices.dense import Matrix, diag
  from sympy.polys.polytools import Poly, degree_list, rem
  from sympy.simplify.simplify import simplify
  from sympy.tensor.indexed import IndexedBase
  from sympy.polys.monomials import itermonomials, monomial_deg
  from sympy.polys.orderings import monomial_key
  from sympy.polys.polytools import poly_from_expr, total_degree
  from sympy.functions.combinatorial.factorials import binomial
  from itertools import combinations_with_replacement
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 7 for calling the DixonResultant obj's underlying member method code with example usage: obj.KSY_precondition(matrix) and returns: False, True, False