On Wed, Jan 27, 2010 at 5:11 PM, Ronan Lamy <[email protected]> wrote:
> Le mercredi 27 janvier 2010 à 16:52 -0800, Ondrej Certik a écrit :
>> On Wed, Jan 27, 2010 at 4:39 PM, Ronan Lamy <[email protected]> wrote:
>> > Le mercredi 27 janvier 2010 à 11:19 -0800, Ondrej Certik a écrit :
>> >> What is the advantage of having two classes instead of one? Just so
>> >> that I understand the motivation better. Essentially you just want to
>> >> split Basic into two classes, so that each class is simpler to
>> >> maintain? I am missing why it is a roadblock, but since you both did
>> >> some work with assumptions already,  I guess there is a good reason
>> >> for that.
>> >
>> > The main problem is circular dependency: assuming we switch to the new
>> > assumption system, algebraic expressions need assumptions, assumptions
>> > need the logic module, and logic needs Basic. So if Basic is aware of
>> > the existence of algebraic expressions, we have a problem. This also
>> > means that Basic shouldn't be aware of assumptions, by the way.
>>
>> Basic should not be aware of assumptions at all, that's clear.
>>
>> So let's say I have x^2, which is Pow(Symbol("x"), 2). How does the
>> Expr come into this? And why does it need to know about assumptions? I
>> thought that's what refine() is for.
>  Expr is a base class of both Pow and Symbol, so its methods might be
> called when working with x^2. It probably needs to know about some
> assumptions (for instance whether x is commutative) in order to evaluate
> some expressions (for instance (y*x^2)^2).

Besides commutative, does it need to know any other assumption? I
think we might have a new NCMul for commutative multiplication.

Ondrej

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

Reply via email to