Hello,
        I'm trying to implement a Set Algebra module for sympy. I
started coding a few days ago and it quickly became apparent that I
have to write something completely parallel to the normal algebra,
which is already present in Sympy. I've written a very rough code,
which contains some classes and very liitle operations.
        Much of what I could think of with sets is of a form that can
only be simplified by taking two or more terms together - like {(A *U
*B) *^* B = B}. I was thinking of looping through the terms of both,
and then find a  match. I think this is a messy and horribly
inefficient way to do this. The "trigsimp" function doesn't seem to
have any way around this either. Any ideas on how to go ahead would be
very helpful.
        The attached is archive contains the whole Set module.

Example of usage:

A=Set('A')
B=Set('B')

A.union(B)
> (A | B)
A | B
> (A | B)
A & B
> ( A & B)
A | A
> A

If you go through the code the analogy becomes even more clear.

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

Attachment: sets.tar.bz2
Description: BZip2 compressed data

Reply via email to