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_n^{(\alpha,\beta)}=\lim_{t\to\infty}t^{-n}p_n\left(\tfrac12xt; \tfrac12(\alpha+1-it), \tfrac12(\beta+1+it), \tfrac12(\alpha+1+it), \tfrac12(\beta+1-it)\right).}
... is translated to the CAS output ...
Semantic latex: P_n^{(\alpha,\beta)} = \lim_{t\to\infty} t^{-n} \contHahnpolyp{n}@{\tfrac12 xt}{\tfrac12(\alpha + 1 - \iunit t)}{\tfrac12(\beta + 1 + \iunit t)}{\tfrac12(\alpha + 1 + \iunit t)}{\tfrac12(\beta + 1 - \iunit t)}
Confidence: 0.90419950349709
Mathematica
Translation: (Subscript[P, n])^(\[Alpha], \[Beta]) == Limit[(t)^(- n)* I^(n)*Divide[Pochhammer[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Alpha]+ 1 + I*t), n]*Pochhammer[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 - I*t), n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 + I*t)] - 1, Divide[1,2]*(\[Alpha]+ 1 - I*t) + I*(Divide[1,2]*x*t)}, {Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Alpha]+ 1 + I*t), Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 - I*t)}, 1], t -> Infinity, GenerateConditions->None]
Information
Sub Equations
- (Subscript[P, n])^(\[Alpha], \[Beta]) = Limit[(t)^(- n)* I^(n)*Divide[Pochhammer[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Alpha]+ 1 + I*t), n]*Pochhammer[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 - I*t), n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 + I*t)] - 1, Divide[1,2]*(\[Alpha]+ 1 - I*t) + I*(Divide[1,2]*x*t)}, {Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Alpha]+ 1 + I*t), Divide[1,2]*(\[Alpha]+ 1 - I*t) + Divide[1,2]*(\[Beta]+ 1 - I*t)}, 1], t -> Infinity, GenerateConditions->None]
Free variables
- Subscript[P, n]
- \[Alpha]
- \[Beta]
- n
- x
Symbol info
- Continuous Hahn polynomial; Example: \contHahnpolyp{n}@{x}{a}{b}{\conj{a}}{\conj{b}}
Will be translated to: Alternative translations: [I^($0)*Divide[Pochhammer[$2 + $4, $0]*Pochhammer[$2 + $5, $0], ($0)!] * HypergeometricPFQ[{-($0), $0 + 2*Re[$2 + $3] - 1, $2 + I*($1)}, {$2 + $4, $2 + $5}, 1]]Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.19#P2.p1 Mathematica:
- Could be the second Feigenbaum constant.
But this system doesn't know how to translate it as a constant. It was translated as a general letter.
- Imaginary unit was translated to: I
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \contHahnpolyp [\contHahnpolyp]
Tests
Symbolic
Numeric
Maple
Translation:
Information
Symbol info
- (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \contHahnpolyp [\contHahnpolyp]
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- case of the continuous Hahn polynomial
- Jacobi polynomial
- x
Complete translation information:
{
"id" : "FORMULA_ff971744100fef3b34b2c93b6adc3efb",
"formula" : "P_n^{(\\alpha,\\beta)}=\\lim_{t\\to\\infty}t^{-n}p_n\\left(\\tfrac12xt; \\tfrac12(\\alpha+1-it), \\tfrac12(\\beta+1+it), \\tfrac12(\\alpha+1+it), \\tfrac12(\\beta+1-it)\\right)",
"semanticFormula" : "P_n^{(\\alpha,\\beta)} = \\lim_{t\\to\\infty} t^{-n} \\contHahnpolyp{n}@{\\tfrac12 xt}{\\tfrac12(\\alpha + 1 - \\iunit t)}{\\tfrac12(\\beta + 1 + \\iunit t)}{\\tfrac12(\\alpha + 1 + \\iunit t)}{\\tfrac12(\\beta + 1 - \\iunit t)}",
"confidence" : 0.9041995034970904,
"translations" : {
"Mathematica" : {
"translation" : "(Subscript[P, n])^(\\[Alpha], \\[Beta]) == Limit[(t)^(- n)* I^(n)*Divide[Pochhammer[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Alpha]+ 1 + I*t), n]*Pochhammer[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 - I*t), n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 + I*t)] - 1, Divide[1,2]*(\\[Alpha]+ 1 - I*t) + I*(Divide[1,2]*x*t)}, {Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Alpha]+ 1 + I*t), Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 - I*t)}, 1], t -> Infinity, GenerateConditions->None]",
"translationInformation" : {
"subEquations" : [ "(Subscript[P, n])^(\\[Alpha], \\[Beta]) = Limit[(t)^(- n)* I^(n)*Divide[Pochhammer[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Alpha]+ 1 + I*t), n]*Pochhammer[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 - I*t), n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 + I*t)] - 1, Divide[1,2]*(\\[Alpha]+ 1 - I*t) + I*(Divide[1,2]*x*t)}, {Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Alpha]+ 1 + I*t), Divide[1,2]*(\\[Alpha]+ 1 - I*t) + Divide[1,2]*(\\[Beta]+ 1 - I*t)}, 1], t -> Infinity, GenerateConditions->None]" ],
"freeVariables" : [ "Subscript[P, n]", "\\[Alpha]", "\\[Beta]", "n", "x" ],
"tokenTranslations" : {
"\\contHahnpolyp" : "Continuous Hahn polynomial; Example: \\contHahnpolyp{n}@{x}{a}{b}{\\conj{a}}{\\conj{b}}\nWill be translated to: \nAlternative translations: [I^($0)*Divide[Pochhammer[$2 + $4, $0]*Pochhammer[$2 + $5, $0], ($0)!] * HypergeometricPFQ[{-($0), $0 + 2*Re[$2 + $3] - 1, $2 + I*($1)}, {$2 + $4, $2 + $5}, 1]]Relevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.19#P2.p1\nMathematica: ",
"\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
"\\iunit" : "Imaginary unit was translated to: I"
}
},
"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: \\contHahnpolyp [\\contHahnpolyp]"
}
},
"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: \\contHahnpolyp [\\contHahnpolyp]"
}
},
"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" : 5,
"sentence" : 2,
"word" : 20
} ],
"includes" : [ "p_{n}(x;a,b,c,d)", "F_{n}", "P_{n}^{(\\alpha,\\beta)}" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "case of the continuous Hahn polynomial",
"score" : 0.7125985104912714
}, {
"definition" : "Jacobi polynomial",
"score" : 0.6460746792928004
}, {
"definition" : "x",
"score" : 0.5988174995334326
} ]
}