Oscar Benjamin

Results 1872 comments of Oscar Benjamin

This example is not quite right: ```python In [5]: factor_system_cond([a*(x - 1)], [x]) Out[5]: [[(x - 1, a ≠ 0)]] In [6]: factor_system_cond([a*(x - 1), b], [x]) Out[6]: [] ```...

> Ideally we would return the system with a condition `b = 0` perhaps like: > > ```python > In [11]: ([[(x - 1, Ne(a, 0))]], Eq(b, 0)) > Out[11]:...

Maybe the return should be two lists: ```python In [18]: p1 = Poly(a*(x - 1), x, domain=ZZ[a, b]) In [19]: p2 = Poly(b, x, domain=ZZ[a, b]) In [20]: factor_system_poly([p1, p2])...

> At some point it might be better to have something that represents all conditions just as Boolean and Relational At least it would not be hard to make a...

We could have a `factor_system_bool` that turns the output of `factor_system_cond` into a Boolean expression: ```python In [15]: from sympy.polys.polytools import factor_system_cond In [16]: a, b, c, d = symbols('a,...

Currently `factor_system` here is slow: ```python In [43]: eqs = [a*(x - 1)*(y - 1), b*(x - 2)*(y - 1)*(y - 2)] In [44]: %time r = factor_system(eqs, [x, y])...

> 2\. Still figuring out on how to correct the grouping of conditions in `factor_system_cond`.(Running low on good ideas) I think this will make more sense if you implement `factor_system_bool`....

There is a lot of duplicated code in `factor_system` and `factor_system_cond`. That should probably be moved to a separate function.

> I think it would be better to deal with the non-symbolic generators right at the start of the (high-level) function and be able to assume in the lower-level function...

I simplified the code: ```python def factor_system(eqs, *gens, **kwargs): systems, conds = factor_system_cond(eqs, *gens, **kwargs) systems = [{f.as_expr() for f, c in system} for system in systems] return systems def...