class_docstr: A class for calculating the Macaulay resultant. Note that the
  polynomials must be homogenized and their coefficients must be
  given as symbols.
  
  Examples
  ========
  
  >>> from sympy import symbols
  
  >>> from sympy.polys.multivariate_resultants import MacaulayResultant
  >>> x, y, z = symbols('x, y, z')
  
  >>> a_0, a_1, a_2 = symbols('a_0, a_1, a_2')
  >>> b_0, b_1, b_2 = symbols('b_0, b_1, b_2')
  >>> c_0, c_1, c_2,c_3, c_4 = symbols('c_0, c_1, c_2, c_3, c_4')
  
  >>> f = a_0 * y -  a_1 * x + a_2 * z
  >>> g = b_1 * x ** 2 + b_0 * y ** 2 - b_2 * z ** 2
  >>> h = c_0 * y * z ** 2 - c_1 * x ** 3 + c_2 * x ** 2 * z - c_3 * x * z ** 2 + c_4 * z ** 3
  
  >>> mac = MacaulayResultant(polynomials=[f, g, h], variables=[x, y, z])
  >>> mac.monomial_set
  [x**4, x**3*y, x**3*z, x**2*y**2, x**2*y*z, x**2*z**2, x*y**3,
  x*y**2*z, x*y*z**2, x*z**3, y**4, y**3*z, y**2*z**2, y*z**3, z**4]
  >>> matrix = mac.get_matrix()
  >>> submatrix = mac.get_submatrix(matrix)
  >>> submatrix
  Matrix([
  [-a_1,  a_0,  a_2,    0],
  [   0, -a_1,    0,    0],
  [   0,    0, -a_1,    0],
  [   0,    0,    0, -a_1]])
  
  See Also
  ========
  
  Notebook in examples: sympy/example/notebooks.
  
  References
  ==========
  
  .. [1] [Bruce97]_
  .. [2] [Stiller96]_
class_docstr_tok: ["A","class","for","calculating","the","Macaulay","resultant",".","Note","that","the","polynomials","must","be","homogenized","and","their","coefficients","must","be","given","as","symbols",".","Examples","========",">",">",">","from","sympy","import","symbols",">",">",">","from","sympy.polys.multivariate_resultants","import","MacaulayResultant",">",">",">","x",",","y",",","z","=","symbols","(","'","x",",","y",",","z","'",")",">",">",">","a_0",",","a_1",",","a_2","=","symbols","(","'a_0",",","a_1",",","a_2","'",")",">",">",">","b_0",",","b_1",",","b_2","=","symbols","(","'b_0",",","b_1",",","b_2","'",")",">",">",">","c_0",",","c_1",",","c_2",",","c_3",",","c_4","=","symbols","(","'c_0",",","c_1",",","c_2",",","c_3",",","c_4","'",")",">",">",">","f","=","a_0","*","y","-","a_1","*","x","+","a_2","*","z",">",">",">","g","=","b_1","*","x","*","*","2","+","b_0","*","y","*","*","2","-","b_2","*","z","*","*","2",">",">",">","h","=","c_0","*","y","*","z","*","*","2","-","c_1","*","x","*","*","3","+","c_2","*","x","*","*","2","*","z","-","c_3","*","x","*","z","*","*","2","+","c_4","*","z","*","*","3",">",">",">","mac","=","MacaulayResultant","(","polynomials=","[","f",",","g",",","h","]",",","variables=","[","x",",","y",",","z","]",")",">",">",">","mac.monomial_set","[","x","*","*","4",",","x","*","*","3","*","y",",","x","*","*","3","*","z",",","x","*","*","2","*","y","*","*","2",",","x","*","*","2","*","y","*","z",",","x","*","*","2","*","z","*","*","2",",","x","*","y","*","*","3",",","x","*","y","*","*","2","*","z",",","x","*","y","*","z","*","*","2",",","x","*","z","*","*","3",",","y","*","*","4",",","y","*","*","3","*","z",",","y","*","*","2","*","z","*","*","2",",","y","*","z","*","*","3",",","z","*","*","4","]",">",">",">","matrix","=","mac.get_matrix","(",")",">",">",">","submatrix","=","mac.get_submatrix","(","matrix",")",">",">",">","submatrix","Matrix","(","[","[","-a_1",",","a_0",",","a_2",",","0","]",",","[","0",",","-a_1",",","0",",","0","]",",","[","0",",","0",",","-a_1",",","0","]",",","[","0",",","0",",","0",",","-a_1","]","]",")","See","Also","========","Notebook","in","examples",":","sympy\/example\/notebooks",".","References","==========","..","[","1","]","[","Bruce97","]","_","..","[","2","]","[","Stiller96","]","_"]
docstr: Parameters
  ==========
  
  variables: list
      A list of all n variables
  polynomials : list of SymPy polynomials
      A  list of m n-degree polynomials
docstr_tok: ["Parameters","==========","variables",":","list","A","list","of","all","n","variables","polynomials",":","list","of","SymPy","polynomials","A","list","of","m","n-degree","polynomials"]
code: def __init__(self, polynomials, variables):
      """
      Parameters
      ==========
  
      variables: list
          A list of all n variables
      polynomials : list of SymPy polynomials
          A  list of m n-degree polynomials
      """
      self.polynomials = polynomials
      self.variables = variables
      self.n = len(variables)
  
      # A list of the d_max of each polynomial.
      self.degrees = [
          total_degree(poly, *self.variables)
          for poly in self.polynomials
      ]
  
      self.degree_m = self._get_degree_m()
      self.monomials_size = self.get_size()
  
      # The set T of all possible monomials of degree degree_m
      self.monomial_set = self.get_monomials_of_certain_degree(
          self.degree_m
      )
  
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 1 to create a new MacaulayResultant object  with example: obj = MacaulayResultant(polynomials, variables)