Ejemplo n.º 1
0
 def is_homogeneous(f):
     """Returns `True` if `f` has zero trailing coefficient. """
     return f.dom.is_zero(dmp_ground_TC(f.rep, f.lev, f.dom))
Ejemplo n.º 2
0
 def TC(f):
     """Returns the trailing coefficent of `f`. """
     return dmp_ground_TC(f.rep, f.lev, f.dom)
Ejemplo n.º 3
0
 def is_homogeneous(f):
     """Returns `True` if `f` has zero trailing coefficient. """
     return f.dom.is_zero(dmp_ground_TC(f.rep, f.lev, f.dom))
Ejemplo n.º 4
0
def test_dmp_ground_TC():
    assert dmp_ground_TC([[]], 1, ZZ) == 0
    assert dmp_ground_TC([[2,3,4],[5]], 1, ZZ) == 5
    assert dmp_ground_TC([[[]]], 2, ZZ) == 0
    assert dmp_ground_TC([[[2],[3,4]],[[5]]], 2, ZZ) == 5
Ejemplo n.º 5
0
 def TC(f):
     """Returns the trailing coefficent of `f`. """
     return dmp_ground_TC(f.rep, f.lev, f.dom)