LaTeX to CAS translator
This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.
The demo-application converts LaTeX functions which directly translate to CAS counterparts.
Functions without explicit CAS support are available for translation via a DRMF package (under development).
The following LaTeX input ...
{\displaystyle \Phi(z,s-1,a)=\left(a+z\frac{\partial}{\partial z}\right) \Phi(z,s,a)}
... is translated to the CAS output ...
Semantic latex: \Phi(z , s - 1 , a) =(a + z \deriv [1]{ }{z}) \Phi(z , s , a)
Confidence: 0
Mathematica
Translation: \[CapitalPhi][z , s - 1 , a] == (a + D[z, {z, 1}])*\[CapitalPhi][z , s , a]
Information
Sub Equations
- \[CapitalPhi][z , s - 1 , a] = (a + D[z, {z, 1}])*\[CapitalPhi][z , s , a]
Free variables
- \[CapitalPhi]
- a
- s
- z
Symbol info
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: D[$1, {$2, $0}] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Mathematica: https://reference.wolfram.com/language/ref/D.html
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Test expression: (\[CapitalPhi]*(z , s - 1 , a))-((a + D[z, {z, 1}])*\[CapitalPhi]*(z , s , a))
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: Symbol('Phi')(z , s - 1 , a) == (a + diff(z, z, 1))*Symbol('Phi')(z , s , a)
Information
Sub Equations
- Symbol('Phi')(z , s - 1 , a) = (a + diff(z, z, 1))*Symbol('Phi')(z , s , a)
Free variables
- Symbol('Phi')
- a
- s
- z
Symbol info
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: diff($1, $2, $0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 SymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Maple
Translation: Phi(z , s - 1 , a) = (a + diff(z, [z$(1)]))*Phi(z , s , a)
Information
Sub Equations
- Phi(z , s - 1 , a) = (a + diff(z, [z$(1)]))*Phi(z , s , a)
Free variables
- Phi
- a
- s
- z
Symbol info
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: diff($1, [$2$($0)]) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Maple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- Various identity
Complete translation information:
{
"id" : "FORMULA_c0c8957625fec695feb20f7ebef4840b",
"formula" : "\\Phi(z,s-1,a)=\\left(a+z\\frac{\\partial}{\\partial z}\\right) \\Phi(z,s,a)",
"semanticFormula" : "\\Phi(z , s - 1 , a) =(a + z \\deriv [1]{ }{z}) \\Phi(z , s , a)",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "\\[CapitalPhi][z , s - 1 , a] == (a + D[z, {z, 1}])*\\[CapitalPhi][z , s , a]",
"translationInformation" : {
"subEquations" : [ "\\[CapitalPhi][z , s - 1 , a] = (a + D[z, {z, 1}])*\\[CapitalPhi][z , s , a]" ],
"freeVariables" : [ "\\[CapitalPhi]", "a", "s", "z" ],
"tokenTranslations" : {
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: D[$1, {$2, $0}]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMathematica: https://reference.wolfram.com/language/ref/D.html",
"\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 1,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 1,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "\\[CapitalPhi]*(z , s - 1 , a)",
"rhs" : "(a + D[z, {z, 1}])*\\[CapitalPhi]*(z , s , a)",
"testExpression" : "(\\[CapitalPhi]*(z , s - 1 , a))-((a + D[z, {z, 1}])*\\[CapitalPhi]*(z , s , a))",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "Symbol('Phi')(z , s - 1 , a) == (a + diff(z, z, 1))*Symbol('Phi')(z , s , a)",
"translationInformation" : {
"subEquations" : [ "Symbol('Phi')(z , s - 1 , a) = (a + diff(z, z, 1))*Symbol('Phi')(z , s , a)" ],
"freeVariables" : [ "Symbol('Phi')", "a", "s", "z" ],
"tokenTranslations" : {
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: diff($1, $2, $0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nSymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives",
"\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
}
},
"Maple" : {
"translation" : "Phi(z , s - 1 , a) = (a + diff(z, [z$(1)]))*Phi(z , s , a)",
"translationInformation" : {
"subEquations" : [ "Phi(z , s - 1 , a) = (a + diff(z, [z$(1)]))*Phi(z , s , a)" ],
"freeVariables" : [ "Phi", "a", "s", "z" ],
"tokenTranslations" : {
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: diff($1, [$2$($0)])\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMaple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff",
"\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
}
}
}
},
"positions" : [ {
"section" : 4,
"sentence" : 3,
"word" : 7
} ],
"includes" : [ "z", "s", "\\Phi(z,s,a)", "a" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Various identity",
"score" : 0.6460746792928004
} ]
}