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\left(x;\tfrac12,\tfrac12,\tfrac12,\tfrac12\right) = i^n n!F_n\left(2ix\right).}
... is translated to the CAS output ...
Semantic latex: \contHahnpolyp{n}@{x}{\tfrac12}{\tfrac12}{\tfrac12}{\tfrac12} = \iunit^n n! F_n(2 \iunit x)
Confidence: 0.8820248930976
Mathematica
Translation: I^(n)*Divide[Pochhammer[Divide[1,2] + Divide[1,2], n]*Pochhammer[Divide[1,2] + Divide[1,2], n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2] + Divide[1,2]] - 1, Divide[1,2] + I*(x)}, {Divide[1,2] + Divide[1,2], Divide[1,2] + Divide[1,2]}, 1] == (I)^(n)* (n)!*Subscript[F, n][2*I*x]
Information
Sub Equations
- I^(n)*Divide[Pochhammer[Divide[1,2] + Divide[1,2], n]*Pochhammer[Divide[1,2] + Divide[1,2], n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2] + Divide[1,2]] - 1, Divide[1,2] + I*(x)}, {Divide[1,2] + Divide[1,2], Divide[1,2] + Divide[1,2]}, 1] = (I)^(n)* (n)!*Subscript[F, n][2*I*x]
Free variables
- 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:
- Imaginary unit was translated to: I
- 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: \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
- Bateman polynomial
- special case
- continuous Hahn polynomial
- x
Complete translation information:
{
"id" : "FORMULA_86218bc3a2e52c29e278595fce6c50f9",
"formula" : "p_n\\left(x;\\tfrac12,\\tfrac12,\\tfrac12,\\tfrac12\\right) = i^n n!F_n\\left(2ix\\right)",
"semanticFormula" : "\\contHahnpolyp{n}@{x}{\\tfrac12}{\\tfrac12}{\\tfrac12}{\\tfrac12} = \\iunit^n n! F_n(2 \\iunit x)",
"confidence" : 0.8820248930976001,
"translations" : {
"Mathematica" : {
"translation" : "I^(n)*Divide[Pochhammer[Divide[1,2] + Divide[1,2], n]*Pochhammer[Divide[1,2] + Divide[1,2], n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2] + Divide[1,2]] - 1, Divide[1,2] + I*(x)}, {Divide[1,2] + Divide[1,2], Divide[1,2] + Divide[1,2]}, 1] == (I)^(n)* (n)!*Subscript[F, n][2*I*x]",
"translationInformation" : {
"subEquations" : [ "I^(n)*Divide[Pochhammer[Divide[1,2] + Divide[1,2], n]*Pochhammer[Divide[1,2] + Divide[1,2], n], (n)!] * HypergeometricPFQ[{-(n), n + 2*Re[Divide[1,2] + Divide[1,2]] - 1, Divide[1,2] + I*(x)}, {Divide[1,2] + Divide[1,2], Divide[1,2] + Divide[1,2]}, 1] = (I)^(n)* (n)!*Subscript[F, n][2*I*x]" ],
"freeVariables" : [ "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: ",
"\\iunit" : "Imaginary unit was translated to: I",
"F" : "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: \\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" : 1,
"word" : 20
} ],
"includes" : [ "p_{n}(x;a,b,c,d)", "F_{n}" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Bateman polynomial",
"score" : 0.6859086196238077
}, {
"definition" : "special case",
"score" : 0.6859086196238077
}, {
"definition" : "continuous Hahn polynomial",
"score" : 0.6460746792928004
}, {
"definition" : "x",
"score" : 0.6460746792928004
} ]
}