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 \mathrm{Li}_0(z)=\frac{z}{1-z}, \qquad \mathrm{Li}_{-n}(z)=z \frac{d}{dz} \mathrm{Li}_{1-n}(z). }
... is translated to the CAS output ...
Semantic latex: L \iunit_0(z) = \frac{z}{1-z} , \qquad L \iunit_{-n}(z) = z \deriv [1]{ }{z} L \iunit_{1-n}(z)
Confidence: 0
Mathematica
Translation: L*Subscript[I, 0]*(z) == Divide[z,1 - z]
Information
Sub Equations
- L*Subscript[I, 0]*(z) = Divide[z,1 - z]
Free variables
- L
- z
Constraints
- L*Subscript[I, - n]*(z) == z*D[L*Subscript[I, 1 - n]*(z), {z, 1}]
Symbol info
- Imaginary unit was translated to: I
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: D[$1, {$2, $0}] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Mathematica: https://reference.wolfram.com/language/ref/D.html
Tests
Symbolic
Numeric
SymPy
Translation: L*Symbol('{I}_{0}')*(z) == (z)/(1 - z)
Information
Sub Equations
- L*Symbol('{I}_{0}')*(z) = (z)/(1 - z)
Free variables
- L
- z
Constraints
- L*Symbol('{I}_{- n}')*(z) == z*diff(L*Symbol('{I}_{1 - n}')*(z), z, 1)
Symbol info
- Imaginary unit was translated to: I
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: diff($1, $2, $0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 SymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives
Tests
Symbolic
Numeric
Maple
Translation: L*I[0]*(z) = (z)/(1 - z)
Information
Sub Equations
- L*I[0]*(z) = (z)/(1 - z)
Free variables
- L
- z
Constraints
- L*I[- n]*(z) = z*diff(L*I[1 - n]*(z), [z$(1)])
Symbol info
- Imaginary unit was translated to: I
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: diff($1, [$2$($0)]) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Maple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- polylogarithm function
Complete translation information:
{
"id" : "FORMULA_da001c88120af84bcf976c1e0637b1ac",
"formula" : "\\mathrm{Li}_0(z)=\\frac{z}{1-z}, \\qquad \\mathrm{Li}_{-n}(z)=z \\frac{d}{dz} \\mathrm{Li}_{1-n}(z)",
"semanticFormula" : "L \\iunit_0(z) = \\frac{z}{1-z} , \\qquad L \\iunit_{-n}(z) = z \\deriv [1]{ }{z} L \\iunit_{1-n}(z)",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "L*Subscript[I, 0]*(z) == Divide[z,1 - z]",
"translationInformation" : {
"subEquations" : [ "L*Subscript[I, 0]*(z) = Divide[z,1 - z]" ],
"freeVariables" : [ "L", "z" ],
"constraints" : [ "L*Subscript[I, - n]*(z) == z*D[L*Subscript[I, 1 - n]*(z), {z, 1}]" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: D[$1, {$2, $0}]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMathematica: https://reference.wolfram.com/language/ref/D.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" : "L*Symbol('{I}_{0}')*(z) == (z)/(1 - z)",
"translationInformation" : {
"subEquations" : [ "L*Symbol('{I}_{0}')*(z) = (z)/(1 - z)" ],
"freeVariables" : [ "L", "z" ],
"constraints" : [ "L*Symbol('{I}_{- n}')*(z) == z*diff(L*Symbol('{I}_{1 - n}')*(z), z, 1)" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: diff($1, $2, $0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nSymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives"
}
},
"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" : "L*I[0]*(z) = (z)/(1 - z)",
"translationInformation" : {
"subEquations" : [ "L*I[0]*(z) = (z)/(1 - z)" ],
"freeVariables" : [ "L", "z" ],
"constraints" : [ "L*I[- n]*(z) = z*diff(L*I[1 - n]*(z), [z$(1)])" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: diff($1, [$2$($0)])\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMaple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff"
}
},
"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" : 6,
"sentence" : 0,
"word" : 7
} ],
"includes" : [ "z" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "polylogarithm function",
"score" : 0.6859086196238077
} ]
}