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 \begin{align} \lim_{n \to \infty} n^{-\alpha}P_n^{(\alpha,\beta)}\left(\cos \left ( \tfrac{z}{n} \right ) \right) &= \left(\tfrac{z}{2}\right)^{-\alpha} J_\alpha(z)\\ \lim_{n \to \infty} n^{-\beta}P_n^{(\alpha,\beta)}\left(\cos \left (\pi - \tfrac{z}{n} \right) \right) &= \left(\tfrac{z}{2}\right)^{-\beta} J_\beta(z) \end{align}}
... is translated to the CAS output ...
Semantic latex: \begin{align}\lim_{n \to \infty} n^{-\alpha} \JacobipolyP{\alpha}{\beta}{n}@{\cos(\tfrac{z}{n})} &=(\tfrac{z}{2})^{-\alpha} J_\alpha(z) \\ \lim_{n \to \infty} n^{-\beta} \JacobipolyP{\alpha}{\beta}{n}@{\cos(\cpi - \tfrac{z}{n})} &=(\tfrac{z}{2})^{-\beta} J_\beta(z)\end{align}
Confidence: 0.66063438774294
Mathematica
Translation: Limit[(n)^(- \[Alpha])* JacobiP[n, \[Alpha], \[Beta], Cos[Divide[z,n]]], n -> Infinity, GenerateConditions->None] == (Divide[z,2])^(- \[Alpha])* Subscript[J, \[Alpha]][z] Limit[(n)^(- \[Beta])* JacobiP[n, \[Alpha], \[Beta], Cos[Pi -Divide[z,n]]], n -> Infinity, GenerateConditions->None] == (Divide[z,2])^(- \[Beta])* Subscript[J, \[Beta]][z]
Information
Sub Equations
- Limit[(n)^(- \[Alpha])* JacobiP[n, \[Alpha], \[Beta], Cos[Divide[z,n]]], n -> Infinity, GenerateConditions->None] = (Divide[z,2])^(- \[Alpha])* Subscript[J, \[Alpha]][z]
- Limit[(n)^(- \[Beta])* JacobiP[n, \[Alpha], \[Beta], Cos[Pi -Divide[z,n]]], n -> Infinity, GenerateConditions->None] = (Divide[z,2])^(- \[Beta])* Subscript[J, \[Beta]][z]
Free variables
- \[Alpha]
- \[Beta]
- z
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: Cos[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Mathematica: https://reference.wolfram.com/language/ref/Cos.html
- Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}
Will be translated to: JacobiP[$2, $0, $1, $3] Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 Mathematica: https://reference.wolfram.com/language/ref/JacobiP.html?q=JacobiP
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
Tests
Symbolic
Numeric
SymPy
Translation: limit((n)**(- Symbol('alpha'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos((z)/(n))), n, oo) == ((z)/(2))**(- Symbol('alpha'))* Symbol('{J}_{Symbol('alpha')}')(z) limit((n)**(- Symbol('beta'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos(pi -(z)/(n))), n, oo) == ((z)/(2))**(- Symbol('beta'))* Symbol('{J}_{Symbol('beta')}')(z)
Information
Sub Equations
- limit((n)**(- Symbol('alpha'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos((z)/(n))), n, oo) = ((z)/(2))**(- Symbol('alpha'))* Symbol('{J}_{Symbol('alpha')}')(z)
- limit((n)**(- Symbol('beta'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos(pi -(z)/(n))), n, oo) = ((z)/(2))**(- Symbol('beta'))* Symbol('{J}_{Symbol('beta')}')(z)
Free variables
- Symbol('alpha')
- Symbol('beta')
- z
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos
- Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}
Will be translated to: jacobi($2, $0, $1, $3) Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 SymPy: https://docs.sympy.org/latest/modules/functions/special.html#jacobi-polynomials
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: pi
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
Tests
Symbolic
Numeric
Maple
Translation: limit((n)^(- alpha)* JacobiP(n, alpha, beta, cos((z)/(n))), n = infinity) = ((z)/(2))^(- alpha)* J[alpha](z); limit((n)^(- beta)* JacobiP(n, alpha, beta, cos(Pi -(z)/(n))), n = infinity) = ((z)/(2))^(- beta)* J[beta](z)
Information
Sub Equations
- limit((n)^(- alpha)* JacobiP(n, alpha, beta, cos((z)/(n))), n = infinity) = ((z)/(2))^(- alpha)* J[alpha](z)
- limit((n)^(- beta)* JacobiP(n, alpha, beta, cos(Pi -(z)/(n))), n = infinity) = ((z)/(2))^(- beta)* J[beta](z)
Free variables
- alpha
- beta
- z
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos
- Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}
Will be translated to: JacobiP($2, $0, $1, $3) Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=JacobiP
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_c3c73cf5bc92598a906f5e8a0e697c4d",
"formula" : "\\begin{align}\n\\lim_{n \\to \\infty} n^{-\\alpha}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left ( \\tfrac{z}{n} \\right ) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\alpha} J_\\alpha(z)\\\\ \n\\lim_{n \\to \\infty} n^{-\\beta}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left (\\pi - \\tfrac{z}{n} \\right) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\beta} J_\\beta(z)\n\\end{align}",
"semanticFormula" : "\\begin{align}\\lim_{n \\to \\infty} n^{-\\alpha} \\JacobipolyP{\\alpha}{\\beta}{n}@{\\cos(\\tfrac{z}{n})} &=(\\tfrac{z}{2})^{-\\alpha} J_\\alpha(z) \\\\ \\lim_{n \\to \\infty} n^{-\\beta} \\JacobipolyP{\\alpha}{\\beta}{n}@{\\cos(\\cpi - \\tfrac{z}{n})} &=(\\tfrac{z}{2})^{-\\beta} J_\\beta(z)\\end{align}",
"confidence" : 0.6606343877429388,
"translations" : {
"Mathematica" : {
"translation" : "Limit[(n)^(- \\[Alpha])* JacobiP[n, \\[Alpha], \\[Beta], Cos[Divide[z,n]]], n -> Infinity, GenerateConditions->None] == (Divide[z,2])^(- \\[Alpha])* Subscript[J, \\[Alpha]][z]\nLimit[(n)^(- \\[Beta])* JacobiP[n, \\[Alpha], \\[Beta], Cos[Pi -Divide[z,n]]], n -> Infinity, GenerateConditions->None] == (Divide[z,2])^(- \\[Beta])* Subscript[J, \\[Beta]][z]",
"translationInformation" : {
"subEquations" : [ "Limit[(n)^(- \\[Alpha])* JacobiP[n, \\[Alpha], \\[Beta], Cos[Divide[z,n]]], n -> Infinity, GenerateConditions->None] = (Divide[z,2])^(- \\[Alpha])* Subscript[J, \\[Alpha]][z]", "Limit[(n)^(- \\[Beta])* JacobiP[n, \\[Alpha], \\[Beta], Cos[Pi -Divide[z,n]]], n -> Infinity, GenerateConditions->None] = (Divide[z,2])^(- \\[Beta])* Subscript[J, \\[Beta]][z]" ],
"freeVariables" : [ "\\[Alpha]", "\\[Beta]", "z" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: Cos[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMathematica: https://reference.wolfram.com/language/ref/Cos.html",
"\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: JacobiP[$2, $0, $1, $3]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.3#T1.t1.r2\nMathematica: https://reference.wolfram.com/language/ref/JacobiP.html?q=JacobiP",
"J" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
}
},
"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" : "limit((n)**(- Symbol('alpha'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos((z)/(n))), n, oo) == ((z)/(2))**(- Symbol('alpha'))* Symbol('{J}_{Symbol('alpha')}')(z)\nlimit((n)**(- Symbol('beta'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos(pi -(z)/(n))), n, oo) == ((z)/(2))**(- Symbol('beta'))* Symbol('{J}_{Symbol('beta')}')(z)",
"translationInformation" : {
"subEquations" : [ "limit((n)**(- Symbol('alpha'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos((z)/(n))), n, oo) = ((z)/(2))**(- Symbol('alpha'))* Symbol('{J}_{Symbol('alpha')}')(z)", "limit((n)**(- Symbol('beta'))* jacobi(n, Symbol('alpha'), Symbol('beta'), cos(pi -(z)/(n))), n, oo) = ((z)/(2))**(- Symbol('beta'))* Symbol('{J}_{Symbol('beta')}')(z)" ],
"freeVariables" : [ "Symbol('alpha')", "Symbol('beta')", "z" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos",
"\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: jacobi($2, $0, $1, $3)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.3#T1.t1.r2\nSymPy: https://docs.sympy.org/latest/modules/functions/special.html#jacobi-polynomials",
"J" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: pi",
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
}
},
"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" : "limit((n)^(- alpha)* JacobiP(n, alpha, beta, cos((z)/(n))), n = infinity) = ((z)/(2))^(- alpha)* J[alpha](z); limit((n)^(- beta)* JacobiP(n, alpha, beta, cos(Pi -(z)/(n))), n = infinity) = ((z)/(2))^(- beta)* J[beta](z)",
"translationInformation" : {
"subEquations" : [ "limit((n)^(- alpha)* JacobiP(n, alpha, beta, cos((z)/(n))), n = infinity) = ((z)/(2))^(- alpha)* J[alpha](z)", "limit((n)^(- beta)* JacobiP(n, alpha, beta, cos(Pi -(z)/(n))), n = infinity) = ((z)/(2))^(- beta)* J[beta](z)" ],
"freeVariables" : [ "alpha", "beta", "z" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos",
"\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: JacobiP($2, $0, $1, $3)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.3#T1.t1.r2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=JacobiP",
"J" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
}
},
"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" : [ "\\begin{align}\\lim_{n \\to \\infty} n^{-\\alpha}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left ( \\tfrac{z}{n} \\right ) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\alpha} J_\\alpha(z)\\\\ \\lim_{n \\to \\infty} n^{-\\beta}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left (\\pi - \\tfrac{z}{n} \\right) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\beta} J_\\beta(z)\\end{align}", "z", "\\alpha,\\beta", "n", "P_{n}^{(\\alpha, \\beta)}", "P_{n}^{(\\alpha, \\beta)}(x)" ],
"isPartOf" : [ "\\begin{align}\\lim_{n \\to \\infty} n^{-\\alpha}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left ( \\tfrac{z}{n} \\right ) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\alpha} J_\\alpha(z)\\\\ \\lim_{n \\to \\infty} n^{-\\beta}P_n^{(\\alpha,\\beta)}\\left(\\cos \\left (\\pi - \\tfrac{z}{n} \\right) \\right) &= \\left(\\tfrac{z}{2}\\right)^{-\\beta} J_\\beta(z)\\end{align}" ],
"definiens" : [ ]
}