im actually interested in comparing two OpenMath-Objects with each other in terms of equality (despite being build a bit differently in XML) by using Java.
For example I want "x^2+2x-35=0" to be equal to "-35+2x+x^2=0".
So im wondering if there is a way to achieve this. I at least understand OpenMath as some sort of tree structure and thought there might be a way to compare them.
I already tried writing the expressions for those two equations, but ended up with no luck or good idea.
Equation 1: x^2+2x-35=0<OMOBJ xmlns='http://www.openmath.org/OpenMath' version='2.0' cdbase='http://www.openmath.org/cd'> <OMA> <OMS cd='relation1' name='eq'/> <OMA> <OMS cd='arith1' name='minus'/> <OMA> <OMS cd='arith1' name='plus'/> <OMA> <OMS cd='arith1' name='power'/> <OMV name='x'/> <OMI> 2 </OMI> </OMA> <OMA style='invisible'> <OMS cd='arith1' name='times'/> <OMI> 2 </OMI> <OMV name='x'/> </OMA> </OMA> <OMI> 35 </OMI> </OMA> <OMI> 0 </OMI> </OMA> </OMOBJ>
Equation 2: -35+2x+x^2<OMOBJ xmlns='http://www.openmath.org/OpenMath' version='2.0' cdbase='http://www.openmath.org/cd'> <OMA> <OMS cd='relation1' name='eq'/> <OMA> <OMS cd='arith1' name='plus'/> <OMA> <OMS cd='arith1' name='unary_minus'/> <OMI> 35 </OMI> </OMA> <OMA style='invisible'> <OMS cd='arith1' name='times'/> <OMI> 2 </OMI> <OMV name='x'/> </OMA> <OMA> <OMS cd='arith1' name='power'/> <OMV name='x'/> <OMI> 2 </OMI> </OMA> </OMA> <OMI> 0 </OMI> </OMA> </OMOBJ>
Thank you for your time
Sincerely
Phu
_______________________________________________ Om mailing list [email protected] http://mailman.openmath.org/cgi-bin/mailman/listinfo/om
