Re: [sympy] GSoC 15: Improving Assumptions

2015-03-20 Thread Aaron Meurer
Glad to see you're taking this on. It's a pretty complicated task. To really understand what should be done, you should understand what's already been tried, and why certain things haven't worked. So let me see if I can give a short history. this is from memory, so I'm sure I'll forget a lot of

Re: [sympy] Re: CAD Implementation - GSoC 2015

2015-03-20 Thread Luv Agarwal
I have added the implementation details of few functions in the draft https://github.com/sympy/sympy/wiki/GSoC-2015-Application-Luv-Agarwal:-Cylindrical-Algebraic-Decomposition . How can I implement refine_root (and dup_isolate_real_roots_sqf) for polynomials over algebraic numbers? -- You

Re: [sympy] Re: GSoC 15: Improving Assumptions

2015-03-20 Thread Sudhanshu Mishra
I have a question. This one is fine. In [9]: x = Symbol('x', zero=True) In [10]: (x*y).is_zero -- Here we didn't give facts about y then why ask returned True? In [3]: ask(Q.zero(x*y), Q.zero(x)) Out[3]: True On Fri, Mar 20, 2015 at 6:26 PM, Sudhanshu Mishra

Re: [sympy] Re: GSoC proposals can now be submitted

2015-03-20 Thread Sudhanshu Mishra
1. Is blogging about progress for GSoC required? It's mentioned in the melange application template. Yes. It is advised to do so. 2. Which application template has to be followed? The one provided with melange or SymPy. SymPy's template should be compatible with other templates. Where is

Re: [sympy] Re: GSoC 15: Improving Assumptions

2015-03-20 Thread Joachim Durchholz
Am 20.03.2015 um 13:56 schrieb Sudhanshu Mishra: I have a question. This one is fine. In [9]: x = Symbol('x', zero=True) In [10]: (x*y).is_zero -- Here we didn't give facts about y then why ask returned True? In [3]: ask(Q.zero(x*y), Q.zero(x)) Out[3]: True

Re: [sympy] what does S(0) mean?

2015-03-20 Thread Aaron Meurer
The S() function converts objects into SymPy objects, so S(0) converts int(0) to sympy.Integer(0). It is completely redundant in this case, as the 0 would be coerced automatically from the = with the SymPy expression x + 3. The S() function is typically only needed when dividing integers, like

[sympy] what does S(0) mean?

2015-03-20 Thread Christoph Kukulies
Hi, I'm playing a bit with sympy and reduce_inequations while I'm stumbling about understanding a term: from sympy import Q, sympify as S from sympy.abc import x, y from sympy.solvers.inequalities import reduce_inequalities reduce_inequalities(S(0) = x + 3, Q.real(x), []) What does S(0) mean

Re: [sympy] what does S(0) mean?

2015-03-20 Thread Sudhanshu Mishra
Hi It gives sympyfied 0. Its different from Python's integer object. Regards Sudhanshu Mishra On Fri, Mar 20, 2015, 11:27 PM Christoph Kukulies k...@physik.rwth-aachen.de wrote: Hi, I'm playing a bit with sympy and reduce_inequations while I'm stumbling about understanding a term: from

[sympy] Re: what does S(0) mean?

2015-03-20 Thread Francesco Bonazzi
S(0) is SymPy's zero, 0 is python's zero. SymPy integers form fractions under division, Python integers become floating-point numbers. On Friday, March 20, 2015 at 6:57:27 PM UTC+1, Christoph Kukulies wrote: Hi, I'm playing a bit with sympy and reduce_inequations while I'm stumbling about

Re: [sympy] Re: Replace and subs

2015-03-20 Thread Mike Boyle
Oh, I think I get it now. `replace(w*(2*x+3)` starts at the bottom of the expression tree. So at first it's not looking to replace expressions, it's looking to replace atoms. Now I'm wondering if it would make sense for an `if` statement inserted into the logic to ensure that `w*(2*x+3)`