Sage implements multivariate polynomial rings through several backends. The most generic implementation uses the classes sage.rings.polynomial.polydict.PolyDict and sage.rings.polynomial.polydict.ETuple to construct a dictionary with exponent tuples as keys and coefficients as values.
Additionally, specialized and optimized implementations over many specific coefficient rings are implemented via a shared library interface to SINGULAR; and polynomials in the boolean polynomial ring
are implemented using the PolyBoRi library (cf. sage.rings.polynomial.pbori).