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 \left(\frac{W_0(x)}{x}\right)^r = e^{-r W_0(x)} = \sum_{n=0}^\infty \frac{r\left(n + r\right)^{n - 1}}{n!} \left(-x\right)^n, }
... is translated to the CAS output ...
Semantic latex: (\frac{\LambertW@{x}_0(x)}{x})^r = \expe^{- r \LambertW@{x}_0(x)} = \sum_{n=0}^\infty \frac{r(n + r)^{n - 1}}{n!}(- x)^n
Confidence: 0.54993329190884
Mathematica
Translation: (Divide[Subscript[ProductLog[x], 0]*(x),x])^(r) == Exp[- r*Subscript[ProductLog[x], 0]*(x)] == Sum[Divide[r*(n + r)^(n - 1),(n)!]*(- x)^(n), {n, 0, Infinity}, GenerateConditions->None]
Information
Sub Equations
- (Divide[Subscript[ProductLog[x], 0]*(x),x])^(r) = Exp[- r*Subscript[ProductLog[x], 0]*(x)]
- Exp[- r*Subscript[ProductLog[x], 0]*(x)] = Sum[Divide[r*(n + r)^(n - 1),(n)!]*(- x)^(n), {n, 0, Infinity}, GenerateConditions->None]
Free variables
- r
- x
Symbol info
- Lambert W-Function; Example: \LambertW@{x}
Will be translated to: ProductLog[$0] Constraints: x in \Reals Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.13#p2 Mathematica: https://reference.wolfram.com/language/ref/ProductLog.html
- Recognizes e with power as the exponential function. It was translated as a function.
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \LambertW [\LambertW]
Tests
Symbolic
Numeric
Maple
Translation: ((LambertW(x)[0]*(x))/(x))^(r) = exp(- r*LambertW(x)[0]*(x)) = sum((r*(n + r)^(n - 1))/(factorial(n))*(- x)^(n), n = 0..infinity)
Information
Sub Equations
- ((LambertW(x)[0]*(x))/(x))^(r) = exp(- r*LambertW(x)[0]*(x))
- exp(- r*LambertW(x)[0]*(x)) = sum((r*(n + r)^(n - 1))/(factorial(n))*(- x)^(n), n = 0..infinity)
Free variables
- r
- x
Symbol info
- Lambert W-Function; Example: \LambertW@{x}
Will be translated to: LambertW($0) Constraints: x in \Reals Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.13#p2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LambertW
- Recognizes e with power as the exponential function. It was translated as a function.
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- form of a Taylor expansion
- power
Complete translation information:
{
"id" : "FORMULA_035c99ed110581493c56e8f6acee4ba1",
"formula" : "\\left(\\frac{W_0(x)}{x}\\right)^r = e^{-r W_0(x)} = \\sum_{n=0}^\\infty \\frac{r\\left(n + r\\right)^{n - 1}}{n!} \\left(-x\\right)^n",
"semanticFormula" : "(\\frac{\\LambertW@{x}_0(x)}{x})^r = \\expe^{- r \\LambertW@{x}_0(x)} = \\sum_{n=0}^\\infty \\frac{r(n + r)^{n - 1}}{n!}(- x)^n",
"confidence" : 0.5499332919088415,
"translations" : {
"Mathematica" : {
"translation" : "(Divide[Subscript[ProductLog[x], 0]*(x),x])^(r) == Exp[- r*Subscript[ProductLog[x], 0]*(x)] == Sum[Divide[r*(n + r)^(n - 1),(n)!]*(- x)^(n), {n, 0, Infinity}, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "(Divide[Subscript[ProductLog[x], 0]*(x),x])^(r) = Exp[- r*Subscript[ProductLog[x], 0]*(x)]", "Exp[- r*Subscript[ProductLog[x], 0]*(x)] = Sum[Divide[r*(n + r)^(n - 1),(n)!]*(- x)^(n), {n, 0, Infinity}, GenerateConditions->None]" ],
"freeVariables" : [ "r", "x" ],
"tokenTranslations" : {
"\\LambertW" : "Lambert W-Function; Example: \\LambertW@{x}\nWill be translated to: ProductLog[$0]\nConstraints: x in \\Reals\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.13#p2\nMathematica: https://reference.wolfram.com/language/ref/ProductLog.html",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function."
}
},
"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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\LambertW [\\LambertW]"
}
},
"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" : "((LambertW(x)[0]*(x))/(x))^(r) = exp(- r*LambertW(x)[0]*(x)) = sum((r*(n + r)^(n - 1))/(factorial(n))*(- x)^(n), n = 0..infinity)",
"translationInformation" : {
"subEquations" : [ "((LambertW(x)[0]*(x))/(x))^(r) = exp(- r*LambertW(x)[0]*(x))", "exp(- r*LambertW(x)[0]*(x)) = sum((r*(n + r)^(n - 1))/(factorial(n))*(- x)^(n), n = 0..infinity)" ],
"freeVariables" : [ "r", "x" ],
"tokenTranslations" : {
"\\LambertW" : "Lambert W-Function; Example: \\LambertW@{x}\nWill be translated to: LambertW($0)\nConstraints: x in \\Reals\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.13#p2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LambertW",
"\\expe" : "Recognizes e with power as the exponential function. It was translated as a function."
}
},
"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" : 8,
"sentence" : 2,
"word" : 19
} ],
"includes" : [ "W_{k}", "W_{0}", "n = 0", "r", "W_{0}(z)", "W", "n", "e^{w}", "x", "W_{k}(z)", "-1" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "form of a Taylor expansion",
"score" : 0.6859086196238077
}, {
"definition" : "power",
"score" : 0.5988174995334326
} ]
}