Exemple #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))
Exemple #2
0
 def TC(f):
     """Returns the trailing coefficent of `f`. """
     return dmp_ground_TC(f.rep, f.lev, f.dom)
Exemple #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))
Exemple #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
Exemple #5
0
 def TC(f):
     """Returns the trailing coefficent of `f`. """
     return dmp_ground_TC(f.rep, f.lev, f.dom)