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,a) = \frac{1}{1-z} \frac{1}{a^{s}} + \sum_{n=1}^{N-1} \frac{(-1)^{n} \mathrm{Li}_{-n}(z)}{n!} \frac{(s)_{n}}{a^{n+s}} +O(a^{-N-s}) }
... is translated to the CAS output ...
Semantic latex: \Phi(z , s , a) = \frac{1}{1-z} \frac{1}{a^{s}} + \sum_{n=1}^{N-1} \frac{(- 1)^{n} L \iunit_{-n}(z)}{n!} \frac{\Pochhammersym{s}{n}}{a^{n+s}} + O(a^{-N-s})
Confidence: 0.68872262762278
Mathematica
Translation: \[CapitalPhi][z , s , a] == Divide[1,1 - z]*Divide[1,(a)^(s)]+ Sum[Divide[(- 1)^(n)* L*Subscript[I, - n]*(z),(n)!]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 1, N - 1}, GenerateConditions->None]+ O[(a)^(- N - s)]
Information
Sub Equations
- \[CapitalPhi][z , s , a] = Divide[1,1 - z]*Divide[1,(a)^(s)]+ Sum[Divide[(- 1)^(n)* L*Subscript[I, - n]*(z),(n)!]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 1, N - 1}, GenerateConditions->None]+ O[(a)^(- N - s)]
Free variables
- L
- N
- \[CapitalPhi]
- a
- s
- z
Symbol info
- Imaginary unit was translated to: I
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pochhammer symbol; Example: \Pochhammersym{a}{n}
Will be translated to: Pochhammer[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#iii Mathematica: https://reference.wolfram.com/language/ref/Pochhammer.html
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \Pochhammersym [\Pochhammersym]
Tests
Symbolic
Numeric
Maple
Translation: Phi(z , s , a) = (1)/(1 - z)*(1)/((a)^(s))+ sum(((- 1)^(n)* L*I[- n]*(z))/(factorial(n))*(pochhammer(s, n))/((a)^(n + s)), n = 1..N - 1)+ O((a)^(- N - s))
Information
Sub Equations
- Phi(z , s , a) = (1)/(1 - z)*(1)/((a)^(s))+ sum(((- 1)^(n)* L*I[- n]*(z))/(factorial(n))*(pochhammer(s, n))/((a)^(n + s)), n = 1..N - 1)+ O((a)^(- N - s))
Free variables
- L
- N
- Phi
- a
- s
- z
Symbol info
- Imaginary unit was translated to: I
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pochhammer symbol; Example: \Pochhammersym{a}{n}
Will be translated to: pochhammer($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#iii Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=pochhammer
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_73981d8c70f5fbf83a9ca7a7a053e59c",
"formula" : "\\Phi(z,s,a) = \\frac{1}{1-z} \\frac{1}{a^{s}}\n +\n \\sum_{n=1}^{N-1} \\frac{(-1)^{n} \\mathrm{Li}_{-n}(z)}{n!} \\frac{(s)_{n}}{a^{n+s}}\n +O(a^{-N-s})",
"semanticFormula" : "\\Phi(z , s , a) = \\frac{1}{1-z} \\frac{1}{a^{s}} + \\sum_{n=1}^{N-1} \\frac{(- 1)^{n} L \\iunit_{-n}(z)}{n!} \\frac{\\Pochhammersym{s}{n}}{a^{n+s}} + O(a^{-N-s})",
"confidence" : 0.6887226276227827,
"translations" : {
"Mathematica" : {
"translation" : "\\[CapitalPhi][z , s , a] == Divide[1,1 - z]*Divide[1,(a)^(s)]+ Sum[Divide[(- 1)^(n)* L*Subscript[I, - n]*(z),(n)!]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 1, N - 1}, GenerateConditions->None]+ O[(a)^(- N - s)]",
"translationInformation" : {
"subEquations" : [ "\\[CapitalPhi][z , s , a] = Divide[1,1 - z]*Divide[1,(a)^(s)]+ Sum[Divide[(- 1)^(n)* L*Subscript[I, - n]*(z),(n)!]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 1, N - 1}, GenerateConditions->None]+ O[(a)^(- N - s)]" ],
"freeVariables" : [ "L", "N", "\\[CapitalPhi]", "a", "s", "z" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\Pochhammersym" : "Pochhammer symbol; Example: \\Pochhammersym{a}{n}\nWill be translated to: Pochhammer[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#iii\nMathematica: https://reference.wolfram.com/language/ref/Pochhammer.html",
"O" : "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" : "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: \\Pochhammersym [\\Pochhammersym]"
}
},
"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" : "Phi(z , s , a) = (1)/(1 - z)*(1)/((a)^(s))+ sum(((- 1)^(n)* L*I[- n]*(z))/(factorial(n))*(pochhammer(s, n))/((a)^(n + s)), n = 1..N - 1)+ O((a)^(- N - s))",
"translationInformation" : {
"subEquations" : [ "Phi(z , s , a) = (1)/(1 - z)*(1)/((a)^(s))+ sum(((- 1)^(n)* L*I[- n]*(z))/(factorial(n))*(pochhammer(s, n))/((a)^(n + s)), n = 1..N - 1)+ O((a)^(- N - s))" ],
"freeVariables" : [ "L", "N", "Phi", "a", "s", "z" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\Pochhammersym" : "Pochhammer symbol; Example: \\Pochhammersym{a}{n}\nWill be translated to: pochhammer($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#iii\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=pochhammer",
"O" : "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" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ ],
"includes" : [ "a", "\\Phi(z,s,a)", "\\Phi(z,s,a) = \\frac{1}{1-z} \\frac{1}{a^{s}} + \\sum_{n=1}^{N-1} \\frac{(-1)^{n} \\mathrm{Li}_{-n}(z)}{n!} \\frac{(s)_{n}}{a^{n+s}} +O(a^{-N-s})", "z", "s" ],
"isPartOf" : [ "\\Phi(z,s,a) = \\frac{1}{1-z} \\frac{1}{a^{s}} + \\sum_{n=1}^{N-1} \\frac{(-1)^{n} \\mathrm{Li}_{-n}(z)}{n!} \\frac{(s)_{n}}{a^{n+s}} +O(a^{-N-s})" ],
"definiens" : [ ]
}