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 \Gamma(x+y)}

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

Semantic latex: \EulerGamma@{x + y}

Confidence: 0.61788109628084

Mathematica

Translation: Gamma[x + y]

Information

Sub Equations

  • Gamma[x + y]

Free variables

  • x
  • y

Symbol info

  • 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
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(x + y)

Information

Sub Equations

  • GAMMA(x + y)

Free variables

  • x
  • y

Symbol info

  • 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

Is part of

Description

  • simple derivation of the relation
  • result
  • side
  • product
  • Emil Artin 's book The Gamma function
  • page
  • one
  • factorial
  • relation
  • variable
  • digamma function
  • beta function
  • infinite product
  • infinite sum
  • argument
  • close relationship to the gamma function
  • function
  • key property of the beta function

Complete translation information:

{
  "id" : "FORMULA_b5b0b2c1b74fcdb61b57699fe820eadb",
  "formula" : "\\Gamma(x+y)",
  "semanticFormula" : "\\EulerGamma@{x + y}",
  "confidence" : 0.6178810962808362,
  "translations" : {
    "Mathematica" : {
      "translation" : "Gamma[x + y]",
      "translationInformation" : {
        "subEquations" : [ "Gamma[x + y]" ],
        "freeVariables" : [ "x", "y" ],
        "tokenTranslations" : {
          "\\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" : "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: \\EulerGamma [\\EulerGamma]"
        }
      },
      "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" : "GAMMA(x + y)",
      "translationInformation" : {
        "subEquations" : [ "GAMMA(x + y)" ],
        "freeVariables" : [ "x", "y" ],
        "tokenTranslations" : {
          "\\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"
        }
      },
      "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" : 2,
    "sentence" : 1,
    "word" : 25
  } ],
  "includes" : [ "y", "x", "\\Gamma" ],
  "isPartOf" : [ "\\Beta(x,y)=\\frac{\\Gamma(x)\\,\\Gamma(y)}{\\Gamma(x+y)}", "\\begin{align}\\Gamma(x)\\Gamma(y) &= \\int_{z=0}^\\infty\\int_{t=0}^1 e^{-z} (zt)^{x-1}(z(1-t))^{y-1}z\\,dt \\,dz \\\\[6pt] &= \\int_{z=0}^\\infty e^{-z}z^{x+y-1} \\,dz\\cdot\\int_{t=0}^1 t^{x-1}(1-t)^{y-1}\\,dt\\\\ &=\\Gamma(x+y) \\cdot \\Beta(x,y).\\end{align}", "\\Gamma(x) \\Gamma(y) = \\int_{\\R}f(u)\\,du\\cdot \\int_{\\R} g(u) \\,du = \\int_{\\R}(f*g)(u)\\,du =\\Beta(x, y)\\,\\Gamma(x+y)", "\\frac{\\partial}{\\partial x} \\mathrm{B}(x, y) = \\mathrm{B}(x, y) \\left( \\frac{\\Gamma'(x)}{\\Gamma(x)} - \\frac{\\Gamma'(x + y)}{\\Gamma(x + y)} \\right) = \\mathrm{B}(x, y) \\big(\\psi(x) - \\psi(x + y)\\big)", "\\Beta(x,y) = \\frac{x+y}{x y} \\prod_{n=1}^\\infty \\left( 1+ \\dfrac{x y}{n (x+y+n)}\\right)^{-1}", "\\Beta(\\alpha_1,\\alpha_2,\\ldots\\alpha_n) = \\frac{\\Gamma(\\alpha_1)\\,\\Gamma(\\alpha_2) \\cdots \\Gamma(\\alpha_n)}{\\Gamma(\\alpha_1 + \\alpha_2 + \\cdots + \\alpha_n)}" ],
  "definiens" : [ {
    "definition" : "simple derivation of the relation",
    "score" : 0.6699230544300447
  }, {
    "definition" : "result",
    "score" : 0.6687181434333315
  }, {
    "definition" : "side",
    "score" : 0.6687181434333315
  }, {
    "definition" : "product",
    "score" : 0.5816270233429564
  }, {
    "definition" : "Emil Artin 's book The Gamma function",
    "score" : 0.5561420434722057
  }, {
    "definition" : "page",
    "score" : 0.5561420434722057
  }, {
    "definition" : "one",
    "score" : 0.5377290372506534
  }, {
    "definition" : "factorial",
    "score" : 0.5329047619047619
  }, {
    "definition" : "relation",
    "score" : 0.5329047619047619
  }, {
    "definition" : "variable",
    "score" : 0.5329047619047619
  }, {
    "definition" : "digamma function",
    "score" : 0.451864458892933
  }, {
    "definition" : "beta function",
    "score" : 0.3719881238007382
  }, {
    "definition" : "infinite product",
    "score" : 0.3616715029761905
  }, {
    "definition" : "infinite sum",
    "score" : 0.3522700134674619
  }, {
    "definition" : "argument",
    "score" : 0.35159851049127144
  }, {
    "definition" : "close relationship to the gamma function",
    "score" : 0.3065627745308957
  }, {
    "definition" : "function",
    "score" : 0.28507467929280045
  }, {
    "definition" : "key property of the beta function",
    "score" : 0.2593055947715278
  } ]
}

Specify your own input