We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3aab2e3 commit dc38269Copy full SHA for dc38269
src/sage/rings/semirings/tropical_mpolynomial.py
@@ -653,12 +653,17 @@ def _repr_(self):
653
r"""
654
Return a string representation of ``self``.
655
656
+ Note that ``x`` equals ``0*x``, which is different from
657
+ ``1*x``. Therefore, we represent monomials always together
658
+ with their coefficients, to avoid confusion.
659
+
660
EXAMPLES::
661
662
sage: T = TropicalSemiring(QQ)
663
sage: R.<x,y> = PolynomialRing(T)
664
sage: x + R(-1)*y + R(-3)
665
0*x + (-1)*y + (-3)
666
667
"""
668
if not self.monomial_coefficients():
669
return str(self.parent().base().zero())
0 commit comments