Am 03.06.2012 16:14, schrieb [email protected]:
@Joachim, maybe we are just speaking about different things:
## by assumptions I mean: "x=Symbol('x', real=True)" and co
I think it is self-evident that this is necessary for forcing
solve(x**2+1) to return [].
Agreed.
That doesn't relate to [x] vs. x though, i.e. the question in the subject.
## by ""sympy guessing assumption" I mean:
You said that for a geometer the results should be real (for example).
How will sympy know this, if the assumption is not explicitly inputed
by the user?
I agree that he'd have to input that the constraint should be x as Real.
He wouldn't want to have to specify whether he wants x or [x] though.
## by abuse of notation I mean what mathematicians usually mean:
From wikipedia: "In mathematics, abuse of notation occurs when an
author uses a mathematical notation in a way that is not formally
correct but that seems likely to simplify the exposition or suggest
the correct intuition".
Okay. I knew the word only in its everyday, pejorative meaning.
I said that making the sympy codebase treat sets of one element and
the element itself in the same manner will be an implementation of an
"abuse of notation" that
- is not that wildly used
We'll have to agree to disagree on that one.
- in no way makes the work *in a CAS* easier,
Well, it does. Say, when working with solutions to linear equations.
That's useful for those cases where the user assumes a single solution
but the math returns multiple solutions: The processing will continue
(as far as it is possible under that notational abuse).
## about rigor an my comment about your comparison with Principia Mathematica:
When you teach a human, he is aware of the context of the subject and
some of the assumptions are implicit. We already have many implicit
assumptions in sympy (symbols for example are usually considered to
belong to the extended complex plane).
Hm. I'm not seeing how that is different from not requiring an
assumption whether the results of a linear equation are a single value
or not.
Because if you don't, you'll have to force the user to use a list for
any linear equation system.
Which will require some special case handling in those situations where
the equation system degenerates into a single equation.
## Final remark
Most of the current discussion is about the input to different sympy
functions (should they treat a single value and a set of one element
in the same manner). As I have already mentioned, this was not my
question.
Since outputs from functions are often fed as inputs to other functions,
it becomes relevant when considering the consequences of any decision.
> A discussion about this can be found here
http://code.google.com/p/sympy/issues/detail?id=537.
Heh. The trouble is caused by a function not accepting a list as an input.
This even reinforces that inputs are, in fact, highly relevant to the
discussion.
(Unless I'm grossly misinterpreting the first entry. But it's feeding a
numpy.array to a SymPy multiplication, right?)
--
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.