LaTeX to CAS translator

Jump to navigation Jump to search

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)}(z)}

... is translated to the CAS output ...

Semantic latex: \JacobipolyP{\alpha}{\beta}{n}@{z}

Confidence: 0.66074870781611

Mathematica

Translation: JacobiP[n, \[Alpha], \[Beta], z]

Information

Sub Equations

  • JacobiP[n, \[Alpha], \[Beta], z]

Free variables

  • \[Alpha]
  • \[Beta]
  • n
  • z

Symbol info

  • Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}

Will be translated to: JacobiP[$2, $0, $1, $3] Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 Mathematica: https://reference.wolfram.com/language/ref/JacobiP.html?q=JacobiP

  • 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.

Tests

Symbolic
Numeric

SymPy

Translation: jacobi(n, Symbol('alpha'), Symbol('beta'), z)

Information

Sub Equations

  • jacobi(n, Symbol('alpha'), Symbol('beta'), z)

Free variables

  • Symbol('alpha')
  • Symbol('beta')
  • n
  • z

Symbol info

  • Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}

Will be translated to: jacobi($2, $0, $1, $3) Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 SymPy: https://docs.sympy.org/latest/modules/functions/special.html#jacobi-polynomials

  • 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.

Tests

Symbolic
Numeric

Maple

Translation: JacobiP(n, alpha, beta, z)

Information

Sub Equations

  • JacobiP(n, alpha, beta, z)

Free variables

  • alpha
  • beta
  • n
  • z

Symbol info

  • Jacobi polynomial; Example: \JacobipolyP{\alpha}{\beta}{n}@{x}

Will be translated to: JacobiP($2, $0, $1, $3) Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=JacobiP

  • 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.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • equation
  • article
  • other MOI
  • dependency graph from Jacobi polynomial
  • definition
  • outgoing dependency
  • context of Jacobi polynomial
  • part of any other MOI
  • next equation in the same article
  • different variant
  • introduction
  • Pochhammer 's symbol
  • Jacobi polynomial
  • counterexample
  • ingoing dependency
  • hypergeometric function
  • Jacobi polynomial in arxiv.org

Complete translation information:

{
  "id" : "FORMULA_10732488962d5582cd2744ace59c270b",
  "formula" : "P_n^{(\\alpha,\\beta)}(z)",
  "semanticFormula" : "\\JacobipolyP{\\alpha}{\\beta}{n}@{z}",
  "confidence" : 0.660748707816107,
  "translations" : {
    "Mathematica" : {
      "translation" : "JacobiP[n, \\[Alpha], \\[Beta], z]",
      "translationInformation" : {
        "subEquations" : [ "JacobiP[n, \\[Alpha], \\[Beta], z]" ],
        "freeVariables" : [ "\\[Alpha]", "\\[Beta]", "n", "z" ],
        "tokenTranslations" : {
          "\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: JacobiP[$2, $0, $1, $3]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/18.3#T1.t1.r2\nMathematica:  https://reference.wolfram.com/language/ref/JacobiP.html?q=JacobiP",
          "\\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"
        }
      },
      "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" : "jacobi(n, Symbol('alpha'), Symbol('beta'), z)",
      "translationInformation" : {
        "subEquations" : [ "jacobi(n, Symbol('alpha'), Symbol('beta'), z)" ],
        "freeVariables" : [ "Symbol('alpha')", "Symbol('beta')", "n", "z" ],
        "tokenTranslations" : {
          "\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: jacobi($2, $0, $1, $3)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/18.3#T1.t1.r2\nSymPy: https://docs.sympy.org/latest/modules/functions/special.html#jacobi-polynomials",
          "\\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"
        }
      },
      "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" : "JacobiP(n, alpha, beta, z)",
      "translationInformation" : {
        "subEquations" : [ "JacobiP(n, alpha, beta, z)" ],
        "freeVariables" : [ "alpha", "beta", "n", "z" ],
        "tokenTranslations" : {
          "\\JacobipolyP" : "Jacobi polynomial; Example: \\JacobipolyP{\\alpha}{\\beta}{n}@{x}\nWill be translated to: JacobiP($2, $0, $1, $3)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/18.3#T1.t1.r2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=JacobiP",
          "\\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"
        }
      },
      "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" : 6,
    "sentence" : 13,
    "word" : 18
  } ],
  "includes" : [ "P_n^{(\\alpha,\\beta)}(x)", "\\alpha", "\\beta", "n", "z", "\\alpha, \\beta", "P_n^{(\\alpha, \\beta)}(x)", "P" ],
  "isPartOf" : [ "P_n^{(\\alpha,\\beta)}(z)=\\frac{(\\alpha+1)_n}{n!}\\,{}_2F_1\\left(-n,1+\\alpha+\\beta+n;\\alpha+1;\\tfrac{1}{2}(1-z)\\right)", "P_n^{(\\alpha,\\beta)}(z)=\\frac{(\\alpha+1)_n}{n!}{}_2F_1\\left(-n,1+\\alpha+\\beta+n;\\alpha+1;\\tfrac{1}{2}(1-z)\\right)", "P_n^{(\\alpha,\\beta)} (z) = \\frac{\\Gamma (\\alpha+n+1)}{n!\\Gamma (\\alpha+\\beta+n+1)} \\sum_{m=0}^n \\binom{n}{m} \\frac{\\Gamma (\\alpha + \\beta + n + m + 1)}{\\Gamma (\\alpha + m + 1)} \\left(\\frac{z-1}{2}\\right)^m", "P_n^{(\\alpha,\\beta)}(x)", "P_n^{(\\alpha, \\beta)}(x)" ],
  "definiens" : [ {
    "definition" : "equation",
    "score" : 0.8855802092325457
  }, {
    "definition" : "article",
    "score" : 0.7560800417889251
  }, {
    "definition" : "other MOI",
    "score" : 0.6629879847031728
  }, {
    "definition" : "dependency graph from Jacobi polynomial",
    "score" : 0.6231540443721655
  }, {
    "definition" : "definition",
    "score" : 0.5758968646127977
  }, {
    "definition" : "outgoing dependency",
    "score" : 0.5758968646127977
  }, {
    "definition" : "context of Jacobi polynomial",
    "score" : 0.5718328188515018
  }, {
    "definition" : "part of any other MOI",
    "score" : 0.5271746031746032
  }, {
    "definition" : "next equation in the same article",
    "score" : 0.34602378366733294
  }, {
    "definition" : "different variant",
    "score" : 0.34586835176111275
  }, {
    "definition" : "introduction",
    "score" : 0.3191837070106504
  }, {
    "definition" : "Pochhammer 's symbol",
    "score" : 0.31917846089364893
  }, {
    "definition" : "Jacobi polynomial",
    "score" : 0.299185307454904
  }, {
    "definition" : "counterexample",
    "score" : 0.27949995246886183
  }, {
    "definition" : "ingoing dependency",
    "score" : 0.23209258692027535
  }, {
    "definition" : "hypergeometric function",
    "score" : 0.23208734080327384
  }, {
    "definition" : "Jacobi polynomial in arxiv.org",
    "score" : 0.18336507936507934
  } ]
}

Specify your own input