def test_product_sum_2_3x_times_sum_minus4_6x_is_not_reducible(): """Is this Product not reducible?""" p = Product([ Sum([Item(2), Monomial(('+', 3, 1))]), Sum([Item(-4), Monomial(('+', 6, 1))]) ]) assert not p.is_reducible()
def test_2_by_1_is_reducible(): """Is Product([Item(2), (Item(1))]) reducible?""" p = Product([Item(2), (Item(1))]) p.set_compact_display(False) assert p.is_reducible()
def test_1_by_7x_is_reducible(): """Is Product([Item(1), (Monomial((7, 1)))]) reducible?""" p = Product([Item(1), (Monomial((7, 1)))]) p.set_compact_display(False) assert p.is_reducible()
def test_a_by_negb_bis_is_reducible(): """Is this Product reducible?""" p = Product([Item('a'), Item(('+', "-b", 1))]) p.set_compact_display(False) assert p.is_reducible()