Thanks, that is one of the places I was starting. It turns out that doesn't 
quite pick up the necessary stuff from the `Expr` type. I have had better 
luck extending the base type `Expr`. It was not hard to get the arithmetic 
parts (+, -, /,*, pow) working. I'm still looking for/working on a robust 
way of extending all the SymPy functions to operate on both the lhs and the 

The idea here is not to use solve, but allow students to use it to aid them 
in doing algebra without making silly errors. We still need them to decide 
on all the steps themselves. This also lets them include units in 
calculations in a way that is familiar to physical scientists.

Anyway, my hope is to get some inspiration from how it is done in Sagemath.

Although my preference is to use Sagemath because of the inherent power, 
this application needs to play nice with *conda and pip installs. So I 
think it has to be an extension of SymPy rather than trying to convince 
people to install the other tools they are using in a Sagemath environment.

I'm definitely thankful for any suggestions people have.

On Friday, May 22, 2020 at 11:54:19 AM UTC-5, Emmanuel Charpentier wrote:
> Well, you  might consider working on the expressions <lef-hend 
> part>-<right-hand part>. A quick test with Sympy:
> Python 3.8.3 (default, May 14 2020, 11:03:12) 
> [GCC 9.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> python.el: native completion setup loaded
> >>> from sympy import *
> >>> p,V,n,R,T=symbols("p,V,n,R,T")
> >>> Ex1=p*V-n*R*T
> >>> Ex1
> -R*T*n + V*p
> >>> Ex1/V
> (-R*T*n + V*p)/V
> >>> solve(Ex1,p)
> [R*T*n/V]
> But Sympy *has* the Eq operator, which allows you to build, store and use 
> symbolic equations :
> >>> Eq1=Eq(p*V, n*R*T)
> >>> Eq1
> Eq(V*p, R*T*n)
> >>> solve(Eq1,p)
> [R*T*n/V]
> OTOH, Sage isn't *that* much heavier than Sympy...
> HTH,
> Le jeudi 21 mai 2020 15:30:42 UTC+2, Jonathan a écrit :
>> Dear All,
>> I have a use case where I need something lighter weight than the whole of 
>> Sagemath. I think SymPy + the ability to handle math on symbolic equations 
>> as Sagemath does it might be enough. Thus I wanted to see if I could 
>> extract from Sagemath the code supporting math on symbolic expressions and 
>> overlay that on SymPy or at least use that as a template. Can somebody 
>> please point me to the place to start looking in the codebase?
>> To make sure people understand what I am interested in, here is a simple 
>> example of the ability I would like to extract:
>> >>>eq1 = p*V==n*R*T
>> >>>eq1
>> p*V=n*R*T
>> >>>eq2=eq1/V
>> >>>eq2
>> p=n*R*T/V
>> Thanks,
>> Jonathan

You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to