def test_times_algebraic(self): from pysmt.constants import Numeral env = get_env() mgr = env.formula_manager r0 = Symbol("r0", REAL) p_2 = Real(2) m_5 = mgr._Algebraic(Numeral(-5)) m_10 = mgr._Algebraic(Numeral(-10)) # -5 * r0 * 2 expr = Times(m_5, r0, p_2) res = expr.simplify() self.assertValid(Equals(expr, res)) self.assertIn(m_10, res.args())
def test_times_one(self): r = Symbol("r", REAL) f = Times(r, r, Real(1)) f = f.simplify() self.assertNotIn(Real(1), f.args())
def test_times_one(self): r = Symbol("r", REAL) f = Times(r, r, Real(1)) f = f.simplify() self.assertNotIn(Real(1), f.args())