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{\mathrm{Li}_{s}(z)}{z^{a}} = \sum_{n=0}^{N-1} C_{n}(z,a) \frac{(s)_{n}}{a^{n+s}} + O\left( (\Re a)^{1-N-s}+a z^{-\Re a} \right), }
... is translated to the CAS output ...
Semantic latex: \Phi(z , s , a) - \frac{L \iunit_{s}(z)}{z^{a}} = \sum_{n=0}^{N-1} C_{n}(z , a) \frac{\Pochhammersym{s}{n}}{a^{n+s}} + O((\realpart a)^{1-N-s} + a z^{-\realpart a}) ,
Confidence: 0.68872262762278
Mathematica
Translation: \[CapitalPhi][z , s , a]-Divide[L*Subscript[I, s]*(z),(z)^(a)] == Sum[Subscript[C, n][z , a]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 0, N - 1}, GenerateConditions->None]+ O*((Re[a])^(1 - N - s)+ a*(z)^(- Re[a]))
Information
Sub Equations
- \[CapitalPhi][z , s , a]-Divide[L*Subscript[I, s]*(z),(z)^(a)] = Sum[Subscript[C, n][z , a]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 0, N - 1}, GenerateConditions->None]+ O*((Re[a])^(1 - N - s)+ a*(z)^(- Re[a]))
Free variables
- L
- N
- O
- \[CapitalPhi]
- a
- s
- z
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Mathematica: https://reference.wolfram.com/language/ref/Re.html
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- 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
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)-(L*I[s]*(z))/((z)^(a)) = sum(C[n](z , a)*(pochhammer(s, n))/((a)^(n + s)), n = 0..N - 1)+ O*((Re(a))^(1 - N - s)+ a*(z)^(- Re(a)))
Information
Sub Equations
- Phi(z , s , a)-(L*I[s]*(z))/((z)^(a)) = sum(C[n](z , a)*(pochhammer(s, n))/((a)^(n + s)), n = 0..N - 1)+ O*((Re(a))^(1 - N - s)+ a*(z)^(- Re(a)))
Free variables
- L
- N
- O
- Phi
- a
- s
- z
Symbol info
- Real part of a complex number; Example: \realpart@@{z}
Will be translated to: Re($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- 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
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Complete translation information:
{
"id" : "FORMULA_f0c8ab12712ed36e24ba826de8f4d4b5",
"formula" : "\\Phi(z,s,a) - \\frac{\\mathrm{Li}_{s}(z)}{z^{a}}\n=\n\\sum_{n=0}^{N-1}\nC_{n}(z,a) \\frac{(s)_{n}}{a^{n+s}}\n+\nO\\left( (\\realpart a)^{1-N-s}+a z^{-\\realpart a} \\right),",
"semanticFormula" : "\\Phi(z , s , a) - \\frac{L \\iunit_{s}(z)}{z^{a}} = \\sum_{n=0}^{N-1} C_{n}(z , a) \\frac{\\Pochhammersym{s}{n}}{a^{n+s}} + O((\\realpart a)^{1-N-s} + a z^{-\\realpart a}) ,",
"confidence" : 0.6887226276227827,
"translations" : {
"Mathematica" : {
"translation" : "\\[CapitalPhi][z , s , a]-Divide[L*Subscript[I, s]*(z),(z)^(a)] == Sum[Subscript[C, n][z , a]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 0, N - 1}, GenerateConditions->None]+ O*((Re[a])^(1 - N - s)+ a*(z)^(- Re[a]))",
"translationInformation" : {
"subEquations" : [ "\\[CapitalPhi][z , s , a]-Divide[L*Subscript[I, s]*(z),(z)^(a)] = Sum[Subscript[C, n][z , a]*Divide[Pochhammer[s, n],(a)^(n + s)], {n, 0, N - 1}, GenerateConditions->None]+ O*((Re[a])^(1 - N - s)+ a*(z)^(- Re[a]))" ],
"freeVariables" : [ "L", "N", "O", "\\[CapitalPhi]", "a", "s", "z" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMathematica: https://reference.wolfram.com/language/ref/Re.html",
"C" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\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"
}
},
"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)-(L*I[s]*(z))/((z)^(a)) = sum(C[n](z , a)*(pochhammer(s, n))/((a)^(n + s)), n = 0..N - 1)+ O*((Re(a))^(1 - N - s)+ a*(z)^(- Re(a)))",
"translationInformation" : {
"subEquations" : [ "Phi(z , s , a)-(L*I[s]*(z))/((z)^(a)) = sum(C[n](z , a)*(pochhammer(s, n))/((a)^(n + s)), n = 0..N - 1)+ O*((Re(a))^(1 - N - s)+ a*(z)^(- Re(a)))" ],
"freeVariables" : [ "L", "N", "O", "Phi", "a", "s", "z" ],
"tokenTranslations" : {
"\\realpart" : "Real part of a complex number; Example: \\realpart@@{z}\nWill be translated to: Re($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.9#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Re",
"C" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\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"
}
},
"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) - \\frac{\\mathrm{Li}_{s}(z)}{z^{a}}=\\sum_{n=0}^{N-1}C_{n}(z,a) \\frac{(s)_{n}}{a^{n+s}}+O\\left( (\\Re a)^{1-N-s}+a z^{-\\Re a} \\right)", "\\Phi(z,s,a)", "\\operatorname{Li}_s(z)", "z", "s", "C_{n}(z,a)", "n= 0" ],
"isPartOf" : [ ],
"definiens" : [ ]
}