On Friday, December 7, 2012 6:43:37 AM UTC-8, Simon King wrote:
> But then: How can one combine symbolic expressions without automatic
> evaluation?
>
by implementing symbolic 'and' and 'or' functions. You can already do the
formal stuff:
sage: function('symbolic_or')
sage: symbolic_or(x==2,x==4)
symbolic_or(x == 2, x == 5)
you'd still need to put the plumbing in to get the semantics (and link that
to the `bool` function on symbolics). Maxima has symbolic 'and' and 'or' so
there's a pretty good chance one could get it to work in a lot of cases.
You can't reasonably overload python's 'and' and 'or' with this
functionality though: they're supposed to be shortcutting and a lot of
python code depends on that behaviour to function correctly. There are
'bitwise' operations '&' and '|' that one could overload to be symbolic
'and' and 'or' for symbolic expressions.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.