On Wed, May 4, 2011 at 7:53 PM, Ronan Lamy <[email protected]> wrote:
> Le mercredi 04 mai 2011 à 10:37 +0100, Tom Bachmann a écrit :
>> On 02.05.2011 19:57, Aaron S. Meurer wrote:
>> > I agree that Frederik's idea is an interesting one, but we would need to
>> > have other people who understand it well if we were to attempt to
>> > implement it. If you could write something up on the wiki, it would go a
>> > long way towards this.
>>
>> I wrote up my view of the algebras model. Obviously the typical
>> disclaimers apply: I don't know sympy very well, I don't really know
>> sympycore at all, bla bla. Please comment.
>>
>> Ondrej, Ronan: I hope this answers your questions as well.
>>
> Thanks for the write-up. It does confirm what I had been thinking: this
> model basically amounts to rewriting sympy in a Lispish rather than
> Pythonic style - consider, for instance, (ADD, (x, y, 5)) vs Add(x, y,
> 5). Besides that, I don't see anything that couldn't be done with the
> current design, replacing "the object's algebra" with "the object's
> class" and with the equivalences Verbatim == Basic, Calculus == Expr,
> Algebra == BasicMeta, CachingAlgebra == AssumeMeths, etc. but I'm
> probably overlooking something.

These are just implementation details of SympyCore, and they probably
don't belong in the assumptions writeup. How SymPy represents
expressions internally is largely irrelevant to whether one adopts a
parent-element model. In fact much of the point is to allow different
ways to represent data (as SymPy already does with the new polynomial
code).

The starting point is just that all elements have a reference to a
parent, and one way to implement assumptions then would be to make
assumptions a (mutable) property of the parent. The reason the
parent-element model makes sense to discuss in the context of
assumptions is that it provides a natural way to define domains for
symbols (as a "first level" of assumptions) -- for example, if one
wants symbols representing elements of R rather than C by default, one
can use an algebra for this purpose.

Fredrik

-- 
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