2011/12/7 Ondřej Čertík <ondrej.cer...@gmail.com>

> On Wed, Dec 7, 2011 at 11:58 AM, Ronan Lamy <ronan.l...@gmail.com> wrote:
> > Le mercredi 07 décembre 2011 à 20:36 +0100, krastanov.ste...@gmail.com a
> > écrit :
> >> How should assumptions be used? More precisely why the following code
> >> does what it does
> >>
> >> In [18]: global_assumptions.clear()
> >>
> >> In [19]: x = Symbol('x', positive=True)
>
>
> ^^^ This is old assumptions, that will be eventually removed
>
> >>
> >> In [20]: ask(Q.positive(x)) # Why does it return None?
>
> New assumptions.
>
> >>
> >> In [21]: x > 0
> >> Out[21]: True
>
> Old assumptions.
>
> And so on. We need to write documentation how to use the new
> assumptions. I hit the same problems. Here is an example:
>
> +    >>> from sympy import var, solve, S, refine, Q
> +    >>> var("a z")
> +    (a, z)
> +    >>> f = z / (a**2+z**2)**(S(5)/2)
> +    >>> solve(f.diff(z), z)
> +    [-a/2, a/2]
> +    >>> f.subs(z, a/2)
> +    16*sqrt(5)*a/(125*(a**2)**(5/2))
> +    >>> refine(f.subs(z, a/2), Q.positive(a))
> +    16*sqrt(5)/(125*a**4)
>
> and we just need to document it well, then improve refine and other
> things, and then eventually remove the old assumptions.
>
Does this mean that every instance of is_something must be changed to ask()?
Is it plausible in the meantime to have (is_something or ask(..))? Of
course in some cases 'or' wont be the correct operator.

>
> Ondrej
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to