Am 03.06.2012 10:49, schrieb [email protected]:
Take square roots for example.
Usually, you expect zero, one, or two solutions.
However, somebody working with geometries expects exactly one answer out of
the square root in the calculation; for him, a square root has exactly one
answer.
The correct way to deal with this is to set assumptions.
In mathematical daily work, such assumptions remain implicit.
If SymPy forced every user to make such assumptions explicit, that would
make using it much more hassle.
In general, I'm quite sceptical about making all assumptions explicit.
It's rigorous and useful for proof work, but it's unsuitable for
exploratory mode.
As an extreme example of rigor, take Principia Mathematica (Whitehead &
Russell). They stopped after volume III due to "intellectual
exhaustion", which isn't suprising given that they needed pages to prove
that 1+1=2 (which isn't as ridiculous as it may sound, but still too
much effort for too little effect for most mathematical purposes).
My personal idea of typical SymPy usage is that it's more exploratory
than proof, so I'd prefer making SymPy accept more variation over making
SymPy require more assumptions.
That said, I'm aware that that's not necessarily the direction that
you're ultimately aiming for. In that case, all I mean to say that any
solution to the problem at hand should not urge us towards requiring
more assumptions.
> I do not
think my question is related to this, as in you example the user still
needs to check whether he received a list or a single value.
Does he?
If all single-parameter functions accept lists and single values alike,
doing the Right Thing (TM) on lists, is there still a need to distinguish?
--
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.