Hi.
I'm not sure if it will be the same as how you envision this to work, but these
are all supported in SymPy:
In [7]: a, b = symbols('a b', commutative=False)
In [8]: a*b - b*a
Out[8]: a⋅b - b⋅a
Note the symbols are complex by default.
In [9]: x = Symbol('x')
In [10]: sqrt(x**2)
Out[10]:
⎽⎽⎽⎽
╱ 2
╲╱ x
In [11]: x = Symbol('x', positive=True)
In [12]: sqrt(x**2)
Out[12]: x
There's a fairly complete list of simplification functions at
http://docs.sympy.org/dev/modules/simplify.html.
Aaron Meurer
On Jun 17, 2011, at 9:23 AM, Yrogirg wrote:
> Hello! I don't know python and sympy, I'm justing trying to figure out
> whether sympy fits my needs.
>
> So, my question is, what are the rules applied by various
> simplification algorithms (or other algorithms of that kind) ? Are
> there distinct simplification rules for expressions meant to represent
> elements from non-commutative ring, field, real numbers or other
> structures?
>
> For example if I want to simplify an expression for non-commutative
> ring simplification should not use a*b = b*a rule.
>
> Is there anywhere a list of rules applied by various simplification
> functions?
>
> --
> 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.
>
--
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.