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 \Gamma(z+1)=z \, \Gamma(z) .}
... is translated to the CAS output ...
Semantic latex: \EulerGamma@{z + 1} = z \EulerGamma@{z}
Confidence: 0.64955994969561
Mathematica
Translation: Gamma[z + 1] == z*Gamma[z]
Information
Sub Equations
- Gamma[z + 1] = z*Gamma[z]
Free variables
- z
Symbol info
- Euler Gamma function; Example: \EulerGamma@{z}
Will be translated to: Gamma[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E1 Mathematica: https://reference.wolfram.com/language/ref/Gamma.html
Tests
Symbolic
Test expression: (Gamma[z + 1])-(z*Gamma[z])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \EulerGamma [\EulerGamma]
Tests
Symbolic
Numeric
Maple
Translation: GAMMA(z + 1) = z*GAMMA(z)
Information
Sub Equations
- GAMMA(z + 1) = z*GAMMA(z)
Free variables
- z
Symbol info
- Euler Gamma function; Example: \EulerGamma@{z}
Will be translated to: GAMMA($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_226d97f875a0eb9b40ff16711b7c4998",
"formula" : "\\Gamma(z+1)=z \\Gamma(z)",
"semanticFormula" : "\\EulerGamma@{z + 1} = z \\EulerGamma@{z}",
"confidence" : 0.6495599496956054,
"translations" : {
"Mathematica" : {
"translation" : "Gamma[z + 1] == z*Gamma[z]",
"translationInformation" : {
"subEquations" : [ "Gamma[z + 1] = z*Gamma[z]" ],
"freeVariables" : [ "z" ],
"tokenTranslations" : {
"\\EulerGamma" : "Euler Gamma function; Example: \\EulerGamma@{z}\nWill be translated to: Gamma[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#E1\nMathematica: https://reference.wolfram.com/language/ref/Gamma.html"
}
},
"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" : "Gamma[z + 1]",
"rhs" : "z*Gamma[z]",
"testExpression" : "(Gamma[z + 1])-(z*Gamma[z])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\EulerGamma [\\EulerGamma]"
}
}
},
"Maple" : {
"translation" : "GAMMA(z + 1) = z*GAMMA(z)",
"translationInformation" : {
"subEquations" : [ "GAMMA(z + 1) = z*GAMMA(z)" ],
"freeVariables" : [ "z" ],
"tokenTranslations" : {
"\\EulerGamma" : "Euler Gamma function; Example: \\EulerGamma@{z}\nWill be translated to: GAMMA($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA"
}
}
}
},
"positions" : [ ],
"includes" : [ "\\Gamma(z+1)=z \\, \\Gamma(z)", "\\,\\Gamma(x)", "z", "G(z+ 1)" ],
"isPartOf" : [ "\\Gamma(z+1)=z \\, \\Gamma(z)" ],
"definiens" : [ ]
}