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 \psi(n)}

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

Semantic latex: \digamma@{n}

Confidence: 0.90733333333333

Mathematica

Translation: PolyGamma[n]

Information

Sub Equations

  • PolyGamma[n]

Free variables

  • n

Symbol info

  • Digamma / Psi function; Example: \digamma@{z}

Will be translated to: PolyGamma[$0] Constraints: z not element of {0, -1, -2, ...} Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E2 Mathematica: https://reference.wolfram.com/language/ref/PolyGamma.html

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \digamma [\digamma]

Tests

Symbolic
Numeric

Maple

Translation: Psi(n)

Information

Sub Equations

  • Psi(n)

Free variables

  • n

Symbol info

  • Digamma / Psi function; Example: \digamma@{z}

Will be translated to: Psi($0) Constraints: z not element of {0, -1, -2, ...} Relevant links to definitions: DLMF: http://dlmf.nist.gov/5.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Psi

Tests

Symbolic
Numeric

Dependency Graph Information

Is part of

Description

  • digamma function
  • positive integer
  • n
  • series

Complete translation information:

{
  "id" : "FORMULA_7da287458ef16510a6a1683c9580d63c",
  "formula" : "\\psi(n)",
  "semanticFormula" : "\\digamma@{n}",
  "confidence" : 0.9073333333333333,
  "translations" : {
    "Mathematica" : {
      "translation" : "PolyGamma[n]",
      "translationInformation" : {
        "subEquations" : [ "PolyGamma[n]" ],
        "freeVariables" : [ "n" ],
        "tokenTranslations" : {
          "\\digamma" : "Digamma / Psi function; Example: \\digamma@{z}\nWill be translated to: PolyGamma[$0]\nConstraints: z not element of {0, -1, -2, ...}\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/5.2#E2\nMathematica:  https://reference.wolfram.com/language/ref/PolyGamma.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: \\digamma [\\digamma]"
        }
      },
      "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" : "Psi(n)",
      "translationInformation" : {
        "subEquations" : [ "Psi(n)" ],
        "freeVariables" : [ "n" ],
        "tokenTranslations" : {
          "\\digamma" : "Digamma / Psi function; Example: \\digamma@{z}\nWill be translated to: Psi($0)\nConstraints: z not element of {0, -1, -2, ...}\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/5.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Psi"
        }
      },
      "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" : 5,
    "word" : 26
  } ],
  "includes" : [ ],
  "isPartOf" : [ "\\Phi(z,n,a)=z^{-a}\\left\\{\\sum_{{k=0}\\atop k\\neq n-1}^ \\infty \\zeta(n-k,a)\\frac{\\log^k (z)}{k!}+\\left[\\psi(n)-\\psi(a)-\\log(-\\log(z))\\right]\\frac{\\log^{n-1}(z)}{(n-1)!}\\right\\}" ],
  "definiens" : [ {
    "definition" : "digamma function",
    "score" : 0.722
  }, {
    "definition" : "positive integer",
    "score" : 0.7125985104912714
  }, {
    "definition" : "n",
    "score" : 0.6859086196238077
  }, {
    "definition" : "series",
    "score" : 0.6460746792928004
  } ]
}

Specify your own input