Hi Chris!

On Thu, Nov 6, 2008 at 11:40 PM, Drake <[EMAIL PROTECTED]> wrote:
>
>> I'd love to have it. Here is how Mathematica does it:
>>
>> http://reference.wolfram.com/mathematica/guide/LogicAndBooleanAlgebra...
>>
>> so let's do the same. If you'd be interested in implementing that,
>> it'd be awesome. Feel free to ask if you have any problems.
>>
>> Ondrej
>
> I am interested, though I am unfamiliar with the sympy code base.
> Please give me some advice on how to properly outline the data types
> and functions within the sympy framework.

Yes, let's discuss it.

>
> It seems like we need a new type, something like:
>
> class Boolean(Basic):
>  ...

Yes, you need to create your own classes like that. See here for docs:

http://docs.sympy.org/guide.html#functions

>
> A question of style is which operators to use:
> 1. A * (B + !C)
> 2. A and (B or not C)

"!" is not a Python operator, is it? So this leaves the option 2.

>
> Should boolean expressions implicitly evaluate to (True, False) or
> (1,0)?

I think it could return True/False and we should have a "boole"
function to convert this to 1/0. The same way as Mathematica does:

http://reference.wolfram.com/mathematica/ref/Boole.html

> Incidentally, I don't have a license for Mathematica. Sorry, I work

Neither do I. I only use their docs, because so far my experience is
that we have always kind of converged to something similar as
Mathematica has (obviously -- Mathematica is 20 years old, SymPy is 2
or 3 years old), so now if I am designing a new thing, I first learn
how Mathematica does it and only do it differently if we have a good
reason.

> for a large semiconductor manufacturing company, not a math research
> lab :).

Excellent, I am very glad you are around. Your feedback on our design
is welcomed.


I suggest you try to create simple classes to do what you want and
post here your progress and we'll help with it. E.g. fork our git repo
and publish your changes for example to github and we'll iteratively
get there. Btw, we also have an assumptions inference engine here:

http://hg.sympy.org/sympy/file/dab6435e04fd/sympy/core/facts.py

maybe something could be used from that.

We really need this functionality in the general assumptions system,
so we definitely need all the things you want, someone just need to do
it.

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