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 \mathcal{K}_k(x; n,q) = \sum_{j=0}^{k}(-q)^j (q-1)^{k-j} \binom {n-j}{k-j} \binom{x}{j}}

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

Semantic latex: \mathcal{K}_k(x; n,q) = \sum_{j=0}^{k}(-q)^j (q-1)^{k-j} \binom {n-j}{k-j} \binom{x}{j}

Confidence: 0

Mathematica

Translation: Subscript[K, k][x ; n , q] == Sum[(- q)^(j)*(q - 1)^(k - j)*Binomial[n - j,k - j]*Binomial[x,j], {j, 0, k}, GenerateConditions->None]

Information

Sub Equations

  • Subscript[K, k][x ; n , q] = Sum[(- q)^(j)*(q - 1)^(k - j)*Binomial[n - j,k - j]*Binomial[x,j], {j, 0, k}, GenerateConditions->None]

Free variables

  • k
  • n
  • q
  • x

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{K}_{k}')(x ; n , q) == Sum((- q)**(j)*(q - 1)**(k - j)*binomial(n - j,k - j)*binomial(x,j), (j, 0, k))

Information

Sub Equations

  • Symbol('{K}_{k}')(x ; n , q) = Sum((- q)**(j)*(q - 1)**(k - j)*binomial(n - j,k - j)*binomial(x,j), (j, 0, k))

Free variables

  • k
  • n
  • q
  • x

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: K[k](x ; n , q) = sum((- q)^(j)*(q - 1)^(k - j)*binomial(n - j,k - j)*binomial(x,j), j = 0..k)

Information

Sub Equations

  • K[k](x ; n , q) = sum((- q)^(j)*(q - 1)^(k - j)*binomial(n - j,k - j)*binomial(x,j), j = 0..k)

Free variables

  • k
  • n
  • q
  • x

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

  • Failed to parse (syntax error): {\displaystyle =0}^}
  • Failed to parse (syntax error): {\displaystyle -1)^}
  • Failed to parse (syntax error): {\displaystyle - 1)^}

Description

  • j
  • q
  • binom
  • k
  • k-j
  • TeX Source
  • Formula
  • Gold ID
  • link
  • mathcal
  • n
  • n-j
  • sum
  • x

Complete translation information:

{
  "id" : "FORMULA_6b7eb62a3e02e45fb1365dd2f07a5bbc",
  "formula" : "\\mathcal{K}_k(x; n,q) = \\sum_{j=0}^{k}(-q)^j (q-1)^{k-j} \\binom {n-j}{k-j} \\binom{x}{j}",
  "semanticFormula" : "\\mathcal{K}_k(x; n,q) = \\sum_{j=0}^{k}(-q)^j (q-1)^{k-j} \\binom {n-j}{k-j} \\binom{x}{j}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[K, k][x ; n , q] == Sum[(- q)^(j)*(q - 1)^(k - j)*Binomial[n - j,k - j]*Binomial[x,j], {j, 0, k}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[K, k][x ; n , q] = Sum[(- q)^(j)*(q - 1)^(k - j)*Binomial[n - j,k - j]*Binomial[x,j], {j, 0, k}, GenerateConditions->None]" ],
        "freeVariables" : [ "k", "n", "q", "x" ],
        "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" : "Symbol('{K}_{k}')(x ; n , q) == Sum((- q)**(j)*(q - 1)**(k - j)*binomial(n - j,k - j)*binomial(x,j), (j, 0, k))",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{K}_{k}')(x ; n , q) = Sum((- q)**(j)*(q - 1)**(k - j)*binomial(n - j,k - j)*binomial(x,j), (j, 0, k))" ],
        "freeVariables" : [ "k", "n", "q", "x" ],
        "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" : "K[k](x ; n , q) = sum((- q)^(j)*(q - 1)^(k - j)*binomial(n - j,k - j)*binomial(x,j), j = 0..k)",
      "translationInformation" : {
        "subEquations" : [ "K[k](x ; n , q) = sum((- q)^(j)*(q - 1)^(k - j)*binomial(n - j,k - j)*binomial(x,j), j = 0..k)" ],
        "freeVariables" : [ "k", "n", "q", "x" ],
        "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" : [ {
    "section" : 1,
    "sentence" : 0,
    "word" : 8
  } ],
  "includes" : [ "=0}^", "-1)^", "- 1)^", "= 0" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "j",
    "score" : 0.8802823775706166
  }, {
    "definition" : "q",
    "score" : 0.8802823775706166
  }, {
    "definition" : "binom",
    "score" : 0.8124341773412527
  }, {
    "definition" : "k",
    "score" : 0.8124341773412527
  }, {
    "definition" : "k-j",
    "score" : 0.8124341773412527
  }, {
    "definition" : "TeX Source",
    "score" : 0.722
  }, {
    "definition" : "Formula",
    "score" : 0.6564392318687055
  }, {
    "definition" : "Gold ID",
    "score" : 0.6564392318687055
  }, {
    "definition" : "link",
    "score" : 0.6564392318687055
  }, {
    "definition" : "mathcal",
    "score" : 0.6564392318687055
  }, {
    "definition" : "n",
    "score" : 0.6564392318687055
  }, {
    "definition" : "n-j",
    "score" : 0.6564392318687055
  }, {
    "definition" : "sum",
    "score" : 0.6564392318687055
  }, {
    "definition" : "x",
    "score" : 0.6564392318687055
  } ]
}

Specify your own input