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 P^\mu_{-(1/2)+i\lambda}(x)}
... is translated to the CAS output ...
Semantic latex: \assLegendreP[\mu]{-(1/2)+i\lambda}@{x}
Confidence: 0.75134718564628
Mathematica
Translation: LegendreP[-(1/2)+ i*\[Lambda], \[Mu], 3, x]
Information
Sub Equations
- LegendreP[-(1/2)+ i*\[Lambda], \[Mu], 3, x]
Free variables
- \[Lambda]
- \[Mu]
- i
- x
Symbol info
- associated Legendre polynomial of the first kind; Example: \assLegendreP[mu]{nu}@{z}
Will be translated to: LegendreP[$1, $0, 3, $2] Relevant links to definitions: DLMF: http://dlmf.nist.gov/14.21#Ex1 Mathematica: https://reference.wolfram.com/language/ref/LegendreP.html
- You use a typical letter for a constant [the imaginary unit == the principal square root of -1].
We keep it like it is! But you should know that Mathematica uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \assLegendreP [\assLegendreP]
Tests
Symbolic
Numeric
Maple
Translation: LegendreP(-(1/2)+ i*lambda, mu, x)
Information
Sub Equations
- LegendreP(-(1/2)+ i*lambda, mu, x)
Free variables
- i
- lambda
- mu
- x
Symbol info
- associated Legendre polynomial of the first kind; Example: \assLegendreP[mu]{nu}@{z}
Will be translated to: LegendreP($1, $0, $2) Relevant links to definitions: DLMF: http://dlmf.nist.gov/14.21#Ex1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LegendreP
- You use a typical letter for a constant [the imaginary unit == the principal square root of -1].
We keep it like it is! But you should know that Maple uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Description
- function
- Gustav Ferdinand Mehler
- term of Legendre function
- distance of a point
- series
- axis of a cone
- conical function
- mathematics
- Mehler function
- point
- surface of the cone
Complete translation information:
{
"id" : "FORMULA_7c0f853b035888614415491de677b659",
"formula" : "P^\\mu_{-(1/2)+i\\lambda}(x)",
"semanticFormula" : "\\assLegendreP[\\mu]{-(1/2)+i\\lambda}@{x}",
"confidence" : 0.7513471856462801,
"translations" : {
"Mathematica" : {
"translation" : "LegendreP[-(1/2)+ i*\\[Lambda], \\[Mu], 3, x]",
"translationInformation" : {
"subEquations" : [ "LegendreP[-(1/2)+ i*\\[Lambda], \\[Mu], 3, x]" ],
"freeVariables" : [ "\\[Lambda]", "\\[Mu]", "i", "x" ],
"tokenTranslations" : {
"\\assLegendreP1" : "associated Legendre polynomial of the first kind; Example: \\assLegendreP[mu]{nu}@{z}\nWill be translated to: LegendreP[$1, $0, 3, $2]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/14.21#Ex1\nMathematica: https://reference.wolfram.com/language/ref/LegendreP.html",
"i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Mathematica uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\assLegendreP [\\assLegendreP]"
}
},
"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" : "LegendreP(-(1/2)+ i*lambda, mu, x)",
"translationInformation" : {
"subEquations" : [ "LegendreP(-(1/2)+ i*lambda, mu, x)" ],
"freeVariables" : [ "i", "lambda", "mu", "x" ],
"tokenTranslations" : {
"\\assLegendreP1" : "associated Legendre polynomial of the first kind; Example: \\assLegendreP[mu]{nu}@{z}\nWill be translated to: LegendreP($1, $0, $2)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/14.21#Ex1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=LegendreP",
"i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Maple uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\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" : [ {
"section" : 0,
"sentence" : 0,
"word" : 30
}, {
"section" : 0,
"sentence" : 1,
"word" : 2
} ],
"includes" : [ "Q^\\mu_{-(1/2)+i\\lambda}(x)" ],
"isPartOf" : [ "Q^\\mu_{-(1/2)+i\\lambda}(x)" ],
"definiens" : [ {
"definition" : "function",
"score" : 0.847667420073609
}, {
"definition" : "Gustav Ferdinand Mehler",
"score" : 0.6432331635625809
}, {
"definition" : "term of Legendre function",
"score" : 0.6288842031023242
}, {
"definition" : "distance of a point",
"score" : 0.6033992232315736
}, {
"definition" : "series",
"score" : 0.6033992232315736
}, {
"definition" : "axis of a cone",
"score" : 0.5074197820340112
}, {
"definition" : "conical function",
"score" : 0.48771694939097315
}, {
"definition" : "mathematics",
"score" : 0.48771694939097315
}, {
"definition" : "Mehler function",
"score" : 0.44936883129115235
}, {
"definition" : "point",
"score" : 0.4238838514204018
}, {
"definition" : "surface of the cone",
"score" : 0.3719049079581628
} ]
}