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 Q_v^\mu(x)= \cos(\mu\pi)\left(\frac{1+x}{1-x}\right)^{\mu/2}\frac{F(v+1,-v;1-\mu;1/2-2/x)} {\Gamma(1-\mu ) }}
... is translated to the CAS output ...
Semantic latex: Q_v^\mu(x) = \cos(\mu \cpi)(\frac{1+x}{1-x})^{\mu/2} \frac{F(v+1,-v;1-\mu;1/2-2/x)} {\Gamma(1-\mu ) }
Confidence: 0
Mathematica
Translation: (Subscript[Q, v])^\[Mu][x] == Cos[\[Mu]*Pi]*(Divide[1 + x,1 - x])^(\[Mu]/2)*Divide[F[v + 1 , - v ; 1 - \[Mu]; 1/2 - 2/x],\[CapitalGamma]*(1 - \[Mu])]
Information
Sub Equations
- (Subscript[Q, v])^\[Mu][x] = Cos[\[Mu]*Pi]*(Divide[1 + x,1 - x])^(\[Mu]/2)*Divide[F[v + 1 , - v ; 1 - \[Mu]; 1/2 - 2/x],\[CapitalGamma]*(1 - \[Mu])]
Free variables
- \[CapitalGamma]
- \[Mu]
- v
- x
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: Cos[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Mathematica: https://reference.wolfram.com/language/ref/Cos.html
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
SymPy
Translation: (Symbol('{Q}_{v}'))**(Symbol('mu'))(x) == cos(Symbol('mu')*pi)*((1 + x)/(1 - x))**(Symbol('mu')/2)*(F(v + 1 , - v ; 1 - Symbol('mu'); 1/2 - 2/x))/(Symbol('Gamma')*(1 - Symbol('mu')))
Information
Sub Equations
- (Symbol('{Q}_{v}'))**(Symbol('mu'))(x) = cos(Symbol('mu')*pi)*((1 + x)/(1 - x))**(Symbol('mu')/2)*(F(v + 1 , - v ; 1 - Symbol('mu'); 1/2 - 2/x))/(Symbol('Gamma')*(1 - Symbol('mu')))
Free variables
- Symbol('Gamma')
- Symbol('mu')
- v
- x
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: pi
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Maple
Translation: (Q[v])^(mu)(x) = cos(mu*Pi)*((1 + x)/(1 - x))^(mu/2)*(F(v + 1 , - v ; 1 - mu ; 1/2 - 2/x))/(Gamma*(1 - mu))
Information
Sub Equations
- (Q[v])^(mu)(x) = cos(mu*Pi)*((1 + x)/(1 - x))^(mu/2)*(F(v + 1 , - v ; 1 - mu ; 1/2 - 2/x))/(Gamma*(1 - mu))
Free variables
- Gamma
- mu
- v
- x
Symbol info
- Cosine; Example: \cos@@{z}
Will be translated to: cos($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Pi was translated to: Pi
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- mu
- frac
- v
- TeX Source
- f
- Formula
- Gamma
- Gold ID
- link
- mu/2
- pi
- Q_v
- x
Complete translation information:
{
"id" : "FORMULA_b5ab87b9cd2da05be00884345889d9e3",
"formula" : "Q_v^\\mu(x)= \\cos(\\mu\\pi)\\left(\\frac{1+x}{1-x}\\right)^{\\mu/2}\\frac{F(v+1,-v;1-\\mu;1/2-2/x)} {\\Gamma(1-\\mu ) }",
"semanticFormula" : "Q_v^\\mu(x) = \\cos(\\mu \\cpi)(\\frac{1+x}{1-x})^{\\mu/2} \\frac{F(v+1,-v;1-\\mu;1/2-2/x)} {\\Gamma(1-\\mu ) }",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(Subscript[Q, v])^\\[Mu][x] == Cos[\\[Mu]*Pi]*(Divide[1 + x,1 - x])^(\\[Mu]/2)*Divide[F[v + 1 , - v ; 1 - \\[Mu]; 1/2 - 2/x],\\[CapitalGamma]*(1 - \\[Mu])]",
"translationInformation" : {
"subEquations" : [ "(Subscript[Q, v])^\\[Mu][x] = Cos[\\[Mu]*Pi]*(Divide[1 + x,1 - x])^(\\[Mu]/2)*Divide[F[v + 1 , - v ; 1 - \\[Mu]; 1/2 - 2/x],\\[CapitalGamma]*(1 - \\[Mu])]" ],
"freeVariables" : [ "\\[CapitalGamma]", "\\[Mu]", "v", "x" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: Cos[$0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMathematica: https://reference.wolfram.com/language/ref/Cos.html",
"Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"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" : "(Symbol('{Q}_{v}'))**(Symbol('mu'))(x) == cos(Symbol('mu')*pi)*((1 + x)/(1 - x))**(Symbol('mu')/2)*(F(v + 1 , - v ; 1 - Symbol('mu'); 1/2 - 2/x))/(Symbol('Gamma')*(1 - Symbol('mu')))",
"translationInformation" : {
"subEquations" : [ "(Symbol('{Q}_{v}'))**(Symbol('mu'))(x) = cos(Symbol('mu')*pi)*((1 + x)/(1 - x))**(Symbol('mu')/2)*(F(v + 1 , - v ; 1 - Symbol('mu'); 1/2 - 2/x))/(Symbol('Gamma')*(1 - Symbol('mu')))" ],
"freeVariables" : [ "Symbol('Gamma')", "Symbol('mu')", "v", "x" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cos",
"Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: pi",
"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" : [ ]
}
},
"Maple" : {
"translation" : "(Q[v])^(mu)(x) = cos(mu*Pi)*((1 + x)/(1 - x))^(mu/2)*(F(v + 1 , - v ; 1 - mu ; 1/2 - 2/x))/(Gamma*(1 - mu))",
"translationInformation" : {
"subEquations" : [ "(Q[v])^(mu)(x) = cos(mu*Pi)*((1 + x)/(1 - x))^(mu/2)*(F(v + 1 , - v ; 1 - mu ; 1/2 - 2/x))/(Gamma*(1 - mu))" ],
"freeVariables" : [ "Gamma", "mu", "v", "x" ],
"tokenTranslations" : {
"\\cos" : "Cosine; Example: \\cos@@{z}\nWill be translated to: cos($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cos",
"Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\cpi" : "Pi was translated to: Pi",
"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" : [ ]
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 0,
"word" : 8
} ],
"includes" : [ "+1", ";1/2-2", "+1}{", "+ 1 , -", "; 1/2 - 2", "+ 1, -" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "mu",
"score" : 0.932084296835645
}, {
"definition" : "frac",
"score" : 0.8214845700845856
}, {
"definition" : "v",
"score" : 0.8214845700845856
}, {
"definition" : "TeX Source",
"score" : 0.722
}, {
"definition" : "f",
"score" : 0.6601229053380933
}, {
"definition" : "Formula",
"score" : 0.6601229053380933
}, {
"definition" : "Gamma",
"score" : 0.6601229053380933
}, {
"definition" : "Gold ID",
"score" : 0.6601229053380933
}, {
"definition" : "link",
"score" : 0.6601229053380933
}, {
"definition" : "mu/2",
"score" : 0.6601229053380933
}, {
"definition" : "pi",
"score" : 0.6601229053380933
}, {
"definition" : "Q_v",
"score" : 0.6601229053380933
}, {
"definition" : "x",
"score" : 0.6601229053380933
} ]
}