def is_irreducible(f): """Returns ``True`` if ``f`` has no factors over its domain. """ return dmp_irreducible_p(f.rep, f.lev, f.dom)
def test_dmp_irreducible_p(): assert dmp_irreducible_p([[ZZ(1)], [ZZ(1)], [ZZ(1)]], 1, ZZ) == True assert dmp_irreducible_p([[ZZ(1)], [ZZ(2)], [ZZ(1)]], 1, ZZ) == False
def test_dmp_irreducible_p(): assert dmp_irreducible_p([[ZZ(1)],[ZZ(1)],[ZZ(1)]], 1, ZZ) == True assert dmp_irreducible_p([[ZZ(1)],[ZZ(2)],[ZZ(1)]], 1, ZZ) == False