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 \begin{align} (1+(q-1)z)^{n-x}(1-z)^x &= \sum_{k=0}^\infty \mathcal{K}_k(x;n,q) {z^k}. \end{align}}

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

Semantic latex: \begin{align} (1+(q-1)z)^{n-x}(1-z)^x &= \sum_{k=0}^\infty \mathcal{K}_k(x;n,q) {z^k}. \end{align}

Confidence: 0

Mathematica

Translation: (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) == Sum[, {k, 0, Infinity}, GenerateConditions->None]

Information

Free variables

  • n
  • q
  • x
  • z

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

SymPy

Translation: (1 +(q - 1)*z)**(n - x)*(1 - z)**(x) (1 +(q - 1)*z)**(n - x)*(1 - z)**(x) == Sum(, (k, 0, oo))

Information

Free variables

  • n
  • q
  • x
  • z

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) = sum(, k = 0..infinity)

Information

Free variables

  • n
  • q
  • x
  • z

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_1d250f27673ff12636f3a8dab168fb54",
  "formula" : "\\begin{align}\n(1+(q-1)z)^{n-x}(1-z)^x &= \\sum_{k=0}^\\infty \\mathcal{K}_k(x;n,q) {z^k}.\n\\end{align}",
  "semanticFormula" : "\\begin{align}\n(1+(q-1)z)^{n-x}(1-z)^x &= \\sum_{k=0}^\\infty \\mathcal{K}_k(x;n,q) {z^k}.\n\\end{align}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(1 +(q - 1)*z)^(n - x)*(1 - z)^(x) (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) == Sum[, {k, 0, Infinity}, GenerateConditions->None]",
      "translationInformation" : {
        "freeVariables" : [ "n", "q", "x", "z" ],
        "tokenTranslations" : {
          "K" : "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" : "(1 +(q - 1)*z)**(n - x)*(1 - z)**(x) (1 +(q - 1)*z)**(n - x)*(1 - z)**(x) == Sum(, (k, 0, oo))",
      "translationInformation" : {
        "freeVariables" : [ "n", "q", "x", "z" ],
        "tokenTranslations" : {
          "K" : "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" : "(1 +(q - 1)*z)^(n - x)*(1 - z)^(x) (1 +(q - 1)*z)^(n - x)*(1 - z)^(x) = sum(, k = 0..infinity)",
      "translationInformation" : {
        "freeVariables" : [ "n", "q", "x", "z" ],
        "tokenTranslations" : {
          "K" : "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" : [ ],
  "includes" : [ "\\begin{align}(1+(q-1)z)^{n-x}(1-z)^x &= \\sum_{k=0}^\\infty \\mathcal{K}_k(x;n,q) {z^k}.\\end{align}", "z", "q", "n" ],
  "isPartOf" : [ "\\begin{align}(1+(q-1)z)^{n-x}(1-z)^x &= \\sum_{k=0}^\\infty \\mathcal{K}_k(x;n,q) {z^k}.\\end{align}" ],
  "definiens" : [ ]
}

Specify your own input