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 1+\frac{(q^\alpha-1)(q^\beta-1)}{(q-1)(q^\gamma-1)}x + \frac{(q^\alpha-1)(q^{\alpha+1}-1)(q^\beta-1)(q^{\beta+1}-1)}{(q-1)(q^2-1)(q^\gamma-1)(q^{\gamma+1}-1)}x^2+\cdots}
... is translated to the CAS output ...
Semantic latex: 1+\frac{(q^\alpha-1)(q^\beta-1)}{(q-1)(q^\gamma-1)}x + \frac{(q^\alpha-1)(q^{\alpha+1}-1)(q^\beta-1)(q^{\beta+1}-1)}{(q-1)(q^2-1)(q^\gamma-1)(q^{\gamma+1}-1)}x^2+\cdots
Confidence: 0
Mathematica
Translation: 1 +Divide[((q)^\[Alpha]- 1)*((q)^\[Beta]- 1),(q - 1)*((q)^\[Gamma]- 1)]*x +Divide[((q)^\[Alpha]- 1)*((q)^(\[Alpha]+ 1)- 1)*((q)^\[Beta]- 1)*((q)^(\[Beta]+ 1)- 1),(q - 1)*((q)^(2)- 1)*((q)^\[Gamma]- 1)*((q)^(\[Gamma]+ 1)- 1)]*(x)^(2)+ \[Ellipsis]
Information
Sub Equations
- 1 +Divide[((q)^\[Alpha]- 1)*((q)^\[Beta]- 1),(q - 1)*((q)^\[Gamma]- 1)]*x +Divide[((q)^\[Alpha]- 1)*((q)^(\[Alpha]+ 1)- 1)*((q)^\[Beta]- 1)*((q)^(\[Beta]+ 1)- 1),(q - 1)*((q)^(2)- 1)*((q)^\[Gamma]- 1)*((q)^(\[Gamma]+ 1)- 1)]*(x)^(2)+ \[Ellipsis]
Free variables
- \[Alpha]
- \[Beta]
- \[Gamma]
- q
- x
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- 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: 1 +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('beta'))- 1))/((q - 1)*((q)**(Symbol('gamma'))- 1))*x +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('alpha')+ 1)- 1)*((q)**(Symbol('beta'))- 1)*((q)**(Symbol('beta')+ 1)- 1))/((q - 1)*((q)**(2)- 1)*((q)**(Symbol('gamma'))- 1)*((q)**(Symbol('gamma')+ 1)- 1))*(x)**(2)+ null
Information
Sub Equations
- 1 +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('beta'))- 1))/((q - 1)*((q)**(Symbol('gamma'))- 1))*x +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('alpha')+ 1)- 1)*((q)**(Symbol('beta'))- 1)*((q)**(Symbol('beta')+ 1)- 1))/((q - 1)*((q)**(2)- 1)*((q)**(Symbol('gamma'))- 1)*((q)**(Symbol('gamma')+ 1)- 1))*(x)**(2)+ null
Free variables
- Symbol('alpha')
- Symbol('beta')
- Symbol('gamma')
- q
- x
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- 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: 1 +(((q)^(alpha)- 1)*((q)^(beta)- 1))/((q - 1)*((q)^(gamma)- 1))*x +(((q)^(alpha)- 1)*((q)^(alpha + 1)- 1)*((q)^(beta)- 1)*((q)^(beta + 1)- 1))/((q - 1)*((q)^(2)- 1)*((q)^(gamma)- 1)*((q)^(gamma + 1)- 1))*(x)^(2)+ ..
Information
Sub Equations
- 1 +(((q)^(alpha)- 1)*((q)^(beta)- 1))/((q - 1)*((q)^(gamma)- 1))*x +(((q)^(alpha)- 1)*((q)^(alpha + 1)- 1)*((q)^(beta)- 1)*((q)^(beta + 1)- 1))/((q - 1)*((q)^(2)- 1)*((q)^(gamma)- 1)*((q)^(gamma + 1)- 1))*(x)^(2)+ ..
Free variables
- alpha
- beta
- gamma
- q
- x
Symbol info
- Could be the Euler-Mascheroni constant.
But it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant! Use the DLMF-Macro \EulerConstant to translate \gamma as a constant.
- 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
Complete translation information:
{
"id" : "FORMULA_9d88a85020a8d0f7c4dd8fa6798a915a",
"formula" : "1+\\frac{(q^\\alpha-1)(q^\\beta-1)}{(q-1)(q^\\gamma-1)}x + \\frac{(q^\\alpha-1)(q^{\\alpha+1}-1)(q^\\beta-1)(q^{\\beta+1}-1)}{(q-1)(q^2-1)(q^\\gamma-1)(q^{\\gamma+1}-1)}x^2+\\cdots",
"semanticFormula" : "1+\\frac{(q^\\alpha-1)(q^\\beta-1)}{(q-1)(q^\\gamma-1)}x + \\frac{(q^\\alpha-1)(q^{\\alpha+1}-1)(q^\\beta-1)(q^{\\beta+1}-1)}{(q-1)(q^2-1)(q^\\gamma-1)(q^{\\gamma+1}-1)}x^2+\\cdots",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "1 +Divide[((q)^\\[Alpha]- 1)*((q)^\\[Beta]- 1),(q - 1)*((q)^\\[Gamma]- 1)]*x +Divide[((q)^\\[Alpha]- 1)*((q)^(\\[Alpha]+ 1)- 1)*((q)^\\[Beta]- 1)*((q)^(\\[Beta]+ 1)- 1),(q - 1)*((q)^(2)- 1)*((q)^\\[Gamma]- 1)*((q)^(\\[Gamma]+ 1)- 1)]*(x)^(2)+ \\[Ellipsis]",
"translationInformation" : {
"subEquations" : [ "1 +Divide[((q)^\\[Alpha]- 1)*((q)^\\[Beta]- 1),(q - 1)*((q)^\\[Gamma]- 1)]*x +Divide[((q)^\\[Alpha]- 1)*((q)^(\\[Alpha]+ 1)- 1)*((q)^\\[Beta]- 1)*((q)^(\\[Beta]+ 1)- 1),(q - 1)*((q)^(2)- 1)*((q)^\\[Gamma]- 1)*((q)^(\\[Gamma]+ 1)- 1)]*(x)^(2)+ \\[Ellipsis]" ],
"freeVariables" : [ "\\[Alpha]", "\\[Beta]", "\\[Gamma]", "q", "x" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\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" : "1 +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('beta'))- 1))/((q - 1)*((q)**(Symbol('gamma'))- 1))*x +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('alpha')+ 1)- 1)*((q)**(Symbol('beta'))- 1)*((q)**(Symbol('beta')+ 1)- 1))/((q - 1)*((q)**(2)- 1)*((q)**(Symbol('gamma'))- 1)*((q)**(Symbol('gamma')+ 1)- 1))*(x)**(2)+ null",
"translationInformation" : {
"subEquations" : [ "1 +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('beta'))- 1))/((q - 1)*((q)**(Symbol('gamma'))- 1))*x +(((q)**(Symbol('alpha'))- 1)*((q)**(Symbol('alpha')+ 1)- 1)*((q)**(Symbol('beta'))- 1)*((q)**(Symbol('beta')+ 1)- 1))/((q - 1)*((q)**(2)- 1)*((q)**(Symbol('gamma'))- 1)*((q)**(Symbol('gamma')+ 1)- 1))*(x)**(2)+ null" ],
"freeVariables" : [ "Symbol('alpha')", "Symbol('beta')", "Symbol('gamma')", "q", "x" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\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" : "1 +(((q)^(alpha)- 1)*((q)^(beta)- 1))/((q - 1)*((q)^(gamma)- 1))*x +(((q)^(alpha)- 1)*((q)^(alpha + 1)- 1)*((q)^(beta)- 1)*((q)^(beta + 1)- 1))/((q - 1)*((q)^(2)- 1)*((q)^(gamma)- 1)*((q)^(gamma + 1)- 1))*(x)^(2)+ ..",
"translationInformation" : {
"subEquations" : [ "1 +(((q)^(alpha)- 1)*((q)^(beta)- 1))/((q - 1)*((q)^(gamma)- 1))*x +(((q)^(alpha)- 1)*((q)^(alpha + 1)- 1)*((q)^(beta)- 1)*((q)^(beta + 1)- 1))/((q - 1)*((q)^(2)- 1)*((q)^(gamma)- 1)*((q)^(gamma + 1)- 1))*(x)^(2)+ .." ],
"freeVariables" : [ "alpha", "beta", "gamma", "q", "x" ],
"tokenTranslations" : {
"\\gamma" : "Could be the Euler-Mascheroni constant.\nBut it is also a Greek letter. Be aware, that this program translated the letter as a normal Greek letter and not as a constant!\nUse the DLMF-Macro \\EulerConstant to translate \\gamma as a constant.\n",
"\\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" : [ "q^{n}", "q" ],
"isPartOf" : [ ],
"definiens" : [ ]
}