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{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} = (-1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4; j_3 j_6). }
... is translated to the CAS output ...
Semantic latex: \Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} =(- 1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4 ; j_3 j_6)
Confidence: 0.68720618419147
Mathematica
Translation: SixJSymbol[{Subscript[j, 1], Subscript[j, 2], Subscript[j, 3]}, {Subscript[j, 4], Subscript[j, 5], Subscript[j, 6]}] == (- 1)^(Subscript[j, 1]+ Subscript[j, 2]+ Subscript[j, 4]+ Subscript[j, 5])* W[Subscript[j, 1]*Subscript[j, 2]*Subscript[j, 5]*Subscript[j, 4]; Subscript[j, 3]*Subscript[j, 6]]
Information
Sub Equations
- SixJSymbol[{Subscript[j, 1], Subscript[j, 2], Subscript[j, 3]}, {Subscript[j, 4], Subscript[j, 5], Subscript[j, 6]}] = (- 1)^(Subscript[j, 1]+ Subscript[j, 2]+ Subscript[j, 4]+ Subscript[j, 5])* W[Subscript[j, 1]*Subscript[j, 2]*Subscript[j, 5]*Subscript[j, 4]; Subscript[j, 3]*Subscript[j, 6]]
Free variables
- Subscript[j, 1]
- Subscript[j, 2]
- Subscript[j, 3]
- Subscript[j, 4]
- Subscript[j, 5]
- Subscript[j, 6]
Symbol info
- 6j symbol; Example: \Wignersixjsym@@{j_{1}}{j_{2}}{j_{3}}{l_{1}}{l_{2}}{l_{3}}
Will be translated to: SixJSymbol[{$0, $1, $2}, {$3, $4, $5}] Relevant links to definitions: DLMF: http://dlmf.nist.gov/34.4#E1 Mathematica: https://reference.wolfram.com/language/ref/SixJSymbol.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: \Wignersixjsym [\Wignersixjsym]
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \Wignersixjsym [\Wignersixjsym]
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_2adf8c65c26732d041027c052dbc970f",
"formula" : "\\begin{Bmatrix}\n j_1 & j_2 & j_3\\\\\n j_4 & j_5 & j_6\n \\end{Bmatrix}\n = (-1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4; j_3 j_6)",
"semanticFormula" : "\\Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} =(- 1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4 ; j_3 j_6)",
"confidence" : 0.687206184191471,
"translations" : {
"Mathematica" : {
"translation" : "SixJSymbol[{Subscript[j, 1], Subscript[j, 2], Subscript[j, 3]}, {Subscript[j, 4], Subscript[j, 5], Subscript[j, 6]}] == (- 1)^(Subscript[j, 1]+ Subscript[j, 2]+ Subscript[j, 4]+ Subscript[j, 5])* W[Subscript[j, 1]*Subscript[j, 2]*Subscript[j, 5]*Subscript[j, 4]; Subscript[j, 3]*Subscript[j, 6]]",
"translationInformation" : {
"subEquations" : [ "SixJSymbol[{Subscript[j, 1], Subscript[j, 2], Subscript[j, 3]}, {Subscript[j, 4], Subscript[j, 5], Subscript[j, 6]}] = (- 1)^(Subscript[j, 1]+ Subscript[j, 2]+ Subscript[j, 4]+ Subscript[j, 5])* W[Subscript[j, 1]*Subscript[j, 2]*Subscript[j, 5]*Subscript[j, 4]; Subscript[j, 3]*Subscript[j, 6]]" ],
"freeVariables" : [ "Subscript[j, 1]", "Subscript[j, 2]", "Subscript[j, 3]", "Subscript[j, 4]", "Subscript[j, 5]", "Subscript[j, 6]" ],
"tokenTranslations" : {
"\\Wignersixjsym" : "6j symbol; Example: \\Wignersixjsym@@{j_{1}}{j_{2}}{j_{3}}{l_{1}}{l_{2}}{l_{3}}\nWill be translated to: SixJSymbol[{$0, $1, $2}, {$3, $4, $5}]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/34.4#E1\nMathematica: https://reference.wolfram.com/language/ref/SixJSymbol.html",
"W" : "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: \\Wignersixjsym [\\Wignersixjsym]"
}
},
"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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
}
},
"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" : [ "j_{3}", "\\begin{Bmatrix} j_1 & j_2 & j_3\\\\ j_4 & j_5 & j_6 \\end{Bmatrix} = (-1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4; j_3 j_6)", "j", "\\begin{Bmatrix} j_1 & j_2 & j_3\\\\ j_4 & j_5 & j_6 \\end{Bmatrix}" ],
"isPartOf" : [ "\\begin{Bmatrix} j_1 & j_2 & j_3\\\\ j_4 & j_5 & j_6 \\end{Bmatrix} = (-1)^{j_1 + j_2 + j_4 + j_5} W(j_1 j_2 j_5 j_4; j_3 j_6)" ],
"definiens" : [ ]
}