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 g_1(x) = \sum_{k \geq 1} \frac{\sin(k \pi / 4)}{k! (8x)^k} \prod_{l = 1}^k (2l - 1)^2 .}
... is translated to the CAS output ...
Semantic latex: g_1(x) = \sum_{k \geq 1} \frac{\sin(k \cpi / 4)}{k! (8x)^k} \prod_{l = 1}^k(2 l - 1)^2
Confidence: 0
Mathematica
Translation: Subscript[g, 1][x] == Sum[Divide[Sin[k*Pi/4],(k)!*(8*x)^(k)]*Product[(2*l - 1)^(2), {l, 1, k}, GenerateConditions->None], {k, 1, Infinity}, GenerateConditions->None]
Information
Sub Equations
- Subscript[g, 1][x] = Sum[Divide[Sin[k*Pi/4],(k)!*(8*x)^(k)]*Product[(2*l - 1)^(2), {l, 1, k}, GenerateConditions->None], {k, 1, Infinity}, GenerateConditions->None]
Free variables
- x
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: Sin[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Mathematica: https://reference.wolfram.com/language/ref/Sin.html
Tests
Symbolic
Numeric
SymPy
Translation: Symbol('{g}_{1}')(x) == Sum((sin(k*pi/4))/(factorial(k)*(8*x)**(k))*Product((2*l - 1)**(2), (l, 1, k)), (k, 1, oo))
Information
Sub Equations
- Symbol('{g}_{1}')(x) = Sum((sin(k*pi/4))/(factorial(k)*(8*x)**(k))*Product((2*l - 1)**(2), (l, 1, k)), (k, 1, oo))
Free variables
- x
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: pi
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin
Tests
Symbolic
Numeric
Maple
Translation: g[1](x) = sum((sin(k*Pi/4))/(factorial(k)*(8*x)^(k))*product((2*l - 1)^(2), l = 1..k), k = 1..infinity)
Information
Sub Equations
- g[1](x) = sum((sin(k*Pi/4))/(factorial(k)*(8*x)^(k))*product((2*l - 1)^(2), l = 1..k), k = 1..infinity)
Free variables
- x
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- series expansion
- special case
- asymptotic series
Complete translation information:
{
"id" : "FORMULA_07453e6baf8f216467f9b664de795bfc",
"formula" : "g_1(x) = \\sum_{k \\geq 1} \\frac{\\sin(k \\pi / 4)}{k! (8x)^k} \\prod_{l = 1}^k (2l - 1)^2",
"semanticFormula" : "g_1(x) = \\sum_{k \\geq 1} \\frac{\\sin(k \\cpi / 4)}{k! (8x)^k} \\prod_{l = 1}^k(2 l - 1)^2",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "Subscript[g, 1][x] == Sum[Divide[Sin[k*Pi/4],(k)!*(8*x)^(k)]*Product[(2*l - 1)^(2), {l, 1, k}, GenerateConditions->None], {k, 1, Infinity}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "Subscript[g, 1][x] = Sum[Divide[Sin[k*Pi/4],(k)!*(8*x)^(k)]*Product[(2*l - 1)^(2), {l, 1, k}, GenerateConditions->None], {k, 1, Infinity}, GenerateConditions->None]" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"g" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: Sin[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMathematica: https://reference.wolfram.com/language/ref/Sin.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "Symbol('{g}_{1}')(x) == Sum((sin(k*pi/4))/(factorial(k)*(8*x)**(k))*Product((2*l - 1)**(2), (l, 1, k)), (k, 1, oo))",
"translationInformation" : {
"subEquations" : [ "Symbol('{g}_{1}')(x) = Sum((sin(k*pi/4))/(factorial(k)*(8*x)**(k))*Product((2*l - 1)**(2), (l, 1, k)), (k, 1, oo))" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"g" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "g[1](x) = sum((sin(k*Pi/4))/(factorial(k)*(8*x)^(k))*product((2*l - 1)^(2), l = 1..k), k = 1..infinity)",
"translationInformation" : {
"subEquations" : [ "g[1](x) = sum((sin(k*Pi/4))/(factorial(k)*(8*x)^(k))*product((2*l - 1)^(2), l = 1..k), k = 1..infinity)" ],
"freeVariables" : [ "x" ],
"tokenTranslations" : {
"g" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 1,
"word" : 28
} ],
"includes" : [ "x", "x)", "g_1(x)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "series expansion",
"score" : 0.6460746792928004
}, {
"definition" : "special case",
"score" : 0.6460746792928004
}, {
"definition" : "asymptotic series",
"score" : 0.5988174995334326
} ]
}