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 \Gamma(s) = \Gamma(s,0) = \lim_{x\to \infty} \gamma(s,x)}
... is translated to the CAS output ...
Semantic latex: \EulerGamma@{s} = \incGamma@{s}{0} = \lim_{x\to \infty} \incgamma@{s}{x}
Confidence: 0.6984592368392
Mathematica
Translation: Gamma[s] == Gamma[s, 0] == Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None]
Information
Sub Equations
- Gamma[s] = Gamma[s, 0]
- Gamma[s, 0] = Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None]
Free variables
- s
Symbol info
- Incomplete Gamma function (upper); Example: \incGamma@{a}{z}
Will be translated to: Gamma[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Gamma.html
- Incomplete Gamma function (lower); Example: \incgamma@{a}{z}
Will be translated to: Gamma[$0, 0, $1] Constraints: \Re(a) > 0 Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.2#E1 Mathematica: https://reference.wolfram.com/language/ref/Gamma.html
- Euler Gamma function; Example: \EulerGamma@{z}
Will be translated to: Gamma[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E1 Mathematica: https://reference.wolfram.com/language/ref/Gamma.html
Tests
Symbolic
Test expression: (Gamma[s])-(Gamma[s, 0])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Test expression: (Gamma[s, 0])-(Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \EulerGamma [\EulerGamma]
Tests
Symbolic
Numeric
Maple
Translation: GAMMA(s) = GAMMA(s, 0) = limit(GAMMA(s)-GAMMA(s, x), x = infinity)
Information
Sub Equations
- GAMMA(s) = GAMMA(s, 0)
- GAMMA(s, 0) = limit(GAMMA(s)-GAMMA(s, x), x = infinity)
Free variables
- s
Symbol info
- Incomplete Gamma function (upper); Example: \incGamma@{a}{z}
Will be translated to: GAMMA($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA
- Incomplete Gamma function (lower); Example: \incgamma@{a}{z}
Will be translated to: Alternative translations: [GAMMA($0)-GAMMA($0, $1)]Constraints: \Re(a) > 0 Relevant links to definitions: DLMF: http://dlmf.nist.gov/8.2#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA
- Euler Gamma function; Example: \EulerGamma@{z}
Will be translated to: GAMMA($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- ordinary gamma function
Complete translation information:
{
"id" : "FORMULA_5edfdba67467a32db3bf4a148e1888d5",
"formula" : "\\Gamma(s) = \\Gamma(s,0) = \\lim_{x\\to \\infty} \\gamma(s,x)",
"semanticFormula" : "\\EulerGamma@{s} = \\incGamma@{s}{0} = \\lim_{x\\to \\infty} \\incgamma@{s}{x}",
"confidence" : 0.6984592368391956,
"translations" : {
"Mathematica" : {
"translation" : "Gamma[s] == Gamma[s, 0] == Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "Gamma[s] = Gamma[s, 0]", "Gamma[s, 0] = Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None]" ],
"freeVariables" : [ "s" ],
"tokenTranslations" : {
"\\incGamma" : "Incomplete Gamma function (upper); Example: \\incGamma@{a}{z}\nWill be translated to: Gamma[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.2#E2\nMathematica: https://reference.wolfram.com/language/ref/Gamma.html",
"\\incgamma" : "Incomplete Gamma function (lower); Example: \\incgamma@{a}{z}\nWill be translated to: Gamma[$0, 0, $1]\nConstraints: \\Re(a) > 0\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.2#E1\nMathematica: https://reference.wolfram.com/language/ref/Gamma.html",
"\\EulerGamma" : "Euler Gamma function; Example: \\EulerGamma@{z}\nWill be translated to: Gamma[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#E1\nMathematica: https://reference.wolfram.com/language/ref/Gamma.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" : "Gamma[s]",
"rhs" : "Gamma[s, 0]",
"testExpression" : "(Gamma[s])-(Gamma[s, 0])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
}, {
"lhs" : "Gamma[s, 0]",
"rhs" : "Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None]",
"testExpression" : "(Gamma[s, 0])-(Limit[Gamma[s, 0, x], x -> Infinity, GenerateConditions->None])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\EulerGamma [\\EulerGamma]"
}
}
},
"Maple" : {
"translation" : "GAMMA(s) = GAMMA(s, 0) = limit(GAMMA(s)-GAMMA(s, x), x = infinity)",
"translationInformation" : {
"subEquations" : [ "GAMMA(s) = GAMMA(s, 0)", "GAMMA(s, 0) = limit(GAMMA(s)-GAMMA(s, x), x = infinity)" ],
"freeVariables" : [ "s" ],
"tokenTranslations" : {
"\\incGamma" : "Incomplete Gamma function (upper); Example: \\incGamma@{a}{z}\nWill be translated to: GAMMA($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA",
"\\incgamma" : "Incomplete Gamma function (lower); Example: \\incgamma@{a}{z}\nWill be translated to: \nAlternative translations: [GAMMA($0)-GAMMA($0, $1)]Constraints: \\Re(a) > 0\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/8.2#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA",
"\\EulerGamma" : "Euler Gamma function; Example: \\EulerGamma@{z}\nWill be translated to: GAMMA($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/5.2#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=GAMMA"
}
}
}
},
"positions" : [ {
"section" : 2,
"sentence" : 2,
"word" : 11
} ],
"includes" : [ "s", "x", "\\Gamma(z)", "s)", "\\Gamma", "\\gamma(s,z)", "\\gamma", "\\gamma(u,v)", "s,\\gamma", "\\gamma(s, z)", "s,z)", "\\Gamma(s,z)", "\\Gamma(s, z)", "\\Gamma(s)", "\\gamma(s,x)", "\\Gamma(s,x)", "P(s,x)", "Q(s,\\lambda)", "\\Gamma (s,x)", "P(a,x)", "Q(a,x)", "\\gamma(a,x)", "\\Gamma(a,x)" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "ordinary gamma function",
"score" : 0.6460746792928004
} ]
}