Hi, 

I am new to learn sympy. This is a very simple question but I do not know 
how to deal with it.

The question is: both c and d are positive integers, is c*d even if c*(d+1) 
is odd.

my code:

from sympy import Symbol
from sympy.assumptions import assuming, Q, ask
c = Symbol('c')
d = Symbol('d')
with assuming(Q.positive(c), Q.integer(c), Q.positive(d), Q.integer(d)):
    with assuming(Q.odd(c*(d +1))):
        print(ask(Q.odd(c)))
        print(ask(Q.odd((d+1))))

This code works. c is odd and (d+1) is odd, but how to evaluate d is odd or 
even.
I run the code
ask(Q.odd(d)),
but the result is "NONE"

Ask for help.
Thanks, 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/5206e651-feeb-4cd9-a4c5-ba85f17ec6f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to