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 t=\log(z)+2k\pi i,k\in Z.}
... is translated to the CAS output ...
Semantic latex: t = \log(z) + 2 k \cpi \iunit , k \in Z
Confidence: 0
Mathematica
Translation: t == Log[z]+ 2*k*Pi*I k \[Element]Z
Information
Free variables
- Z
- k
- t
- z
Symbol info
- Imaginary unit was translated to: I
- Pi was translated to: Pi
- Logarithm; Example: \log@@{z}
Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html
Tests
Symbolic
Test expression: t
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Test expression: Log[z]+ 2*k*Pi*I k
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: t == log(z)+ 2*k*pi*I k null Z
Information
Free variables
- Z
- k
- t
- z
Symbol info
- Imaginary unit was translated to: I
- Pi was translated to: pi
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log
Tests
Symbolic
Numeric
Maple
Translation: t = log(z)+ 2*k*Pi*I; k in Z
Information
Free variables
- Z
- k
- t
- z
Symbol info
- Imaginary unit was translated to: I
- Pi was translated to: Pi
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- contour
- point
- integral representation
Complete translation information:
{
"id" : "FORMULA_37931e2188c1f2d32bec820484ed332a",
"formula" : "t=\\log(z)+2k\\pi i,k\\in Z",
"semanticFormula" : "t = \\log(z) + 2 k \\cpi \\iunit , k \\in Z",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "t == Log[z]+ 2*k*Pi*I\n k \\[Element]Z",
"translationInformation" : {
"freeVariables" : [ "Z", "k", "t", "z" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: Pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMathematica: https://reference.wolfram.com/language/ref/Log.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 2,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 2,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "t",
"rhs" : "",
"testExpression" : "t",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
}, {
"lhs" : "Log[z]+ 2*k*Pi*I\n k",
"rhs" : "",
"testExpression" : "Log[z]+ 2*k*Pi*I\n k",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "t == log(z)+ 2*k*pi*I\n k null Z",
"translationInformation" : {
"freeVariables" : [ "Z", "k", "t", "z" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log"
}
}
},
"Maple" : {
"translation" : "t = log(z)+ 2*k*Pi*I; k in Z",
"translationInformation" : {
"freeVariables" : [ "Z", "k", "t", "z" ],
"tokenTranslations" : {
"\\iunit" : "Imaginary unit was translated to: I",
"\\cpi" : "Pi was translated to: Pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log"
}
}
}
},
"positions" : [ {
"section" : 2,
"sentence" : 1,
"word" : 20
} ],
"includes" : [ "z", "p, q \\in \\mathbb{Z}" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "contour",
"score" : 0.7828725372816522
}, {
"definition" : "point",
"score" : 0.722
}, {
"definition" : "integral representation",
"score" : 0.5816270233429564
} ]
}