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 \operatorname{Li}_s(z) = \sum_{k=1}^\infty \frac{z^k}{k^s}}
... is translated to the CAS output ...
Semantic latex: \polylog{s}@{z} = \sum_{k=1}^\infty \frac{z^k}{k^s}
Confidence: 0.89530287320794
Mathematica
Translation: PolyLog[s, z] == Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None]
Information
Sub Equations
- PolyLog[s, z] = Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None]
Free variables
- s
- z
Symbol info
- Polylogarithm; Example: \polylog{s}@{z}
Will be translated to: PolyLog[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/25.12#E10 Mathematica: https://reference.wolfram.com/language/ref/PolyLog.html
Tests
Symbolic
Test expression: (PolyLog[s, z])-(Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None])
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: \polylog [\polylog]
Tests
Symbolic
Numeric
Maple
Translation: polylog(s, z) = sum(((z)^(k))/((k)^(s)), k = 1..infinity)
Information
Sub Equations
- polylog(s, z) = sum(((z)^(k))/((k)^(s)), k = 1..infinity)
Free variables
- s
- z
Symbol info
- Polylogarithm; Example: \polylog{s}@{z}
Will be translated to: polylog($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/25.12#E10 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=polylog
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- polylogarithm
- Riemann zeta function
Complete translation information:
{
"id" : "FORMULA_e885ed66b8ee8e72e5b226919bcdce5c",
"formula" : "\\operatorname{Li}_s(z) = \\sum_{k=1}^\\infty \\frac{z^k}{k^s}",
"semanticFormula" : "\\polylog{s}@{z} = \\sum_{k=1}^\\infty \\frac{z^k}{k^s}",
"confidence" : 0.8953028732079359,
"translations" : {
"Mathematica" : {
"translation" : "PolyLog[s, z] == Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "PolyLog[s, z] = Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None]" ],
"freeVariables" : [ "s", "z" ],
"tokenTranslations" : {
"\\polylog" : "Polylogarithm; Example: \\polylog{s}@{z}\nWill be translated to: PolyLog[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/25.12#E10\nMathematica: https://reference.wolfram.com/language/ref/PolyLog.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" : "PolyLog[s, z]",
"rhs" : "Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None]",
"testExpression" : "(PolyLog[s, z])-(Sum[Divide[(z)^(k),(k)^(s)], {k, 1, Infinity}, GenerateConditions->None])",
"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: \\polylog [\\polylog]"
}
}
},
"Maple" : {
"translation" : "polylog(s, z) = sum(((z)^(k))/((k)^(s)), k = 1..infinity)",
"translationInformation" : {
"subEquations" : [ "polylog(s, z) = sum(((z)^(k))/((k)^(s)), k = 1..infinity)" ],
"freeVariables" : [ "s", "z" ],
"tokenTranslations" : {
"\\polylog" : "Polylogarithm; Example: \\polylog{s}@{z}\nWill be translated to: polylog($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/25.12#E10\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=polylog"
}
}
}
},
"positions" : [ {
"section" : 29,
"sentence" : 3,
"word" : 5
} ],
"includes" : [ "k", "1", "s", "Li_{s}(e)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "polylogarithm",
"score" : 0.6859086196238077
}, {
"definition" : "Riemann zeta function",
"score" : 0.6859086196238077
} ]
}