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 \sum_{i=0}^n\binom{n}{i}(q-1)^i\mathcal{K}_r(i; n,q)\mathcal{K}_s(i; n,q) = q^n(q-1)^r\binom{n}{r}\delta_{r,s}. }

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

Semantic latex: \sum_{i=0}^n\binom{n}{i}(q-1)^i\mathcal{K}_r(i; n,q)\mathcal{K}_s(i; n,q) = q^n(q-1)^r\binom{n}{r}\delta_{r,s}

Confidence: 0

Mathematica

Translation: Sum[Binomial[n,i]*(q - 1)^(i)* Subscript[K, r][i ; n , q]* Subscript[K, s][i ; n , q], {i, 0, n}, GenerateConditions->None] == (q)^(n)*(q - 1)^(r)*Binomial[n,r]*Subscript[\[Delta], r , s]

Information

Sub Equations

  • Sum[Binomial[n,i]*(q - 1)^(i)* Subscript[K, r][i ; n , q]* Subscript[K, s][i ; n , q], {i, 0, n}, GenerateConditions->None] = (q)^(n)*(q - 1)^(r)*Binomial[n,r]*Subscript[\[Delta], r , s]

Free variables

  • Subscript[\[Delta], r , s]
  • n
  • q
  • r
  • s

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Mathematica uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

  • Could be the first Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

SymPy

Translation: Sum(binomial(n,i)*(q - 1)**(i)* Symbol('{K}_{r}')(i ; n , q)* Symbol('{K}_{s}')(i ; n , q), (i, 0, n)) == (q)**(n)*(q - 1)**(r)*binomial(n,r)*Symbol('{Symbol('delta')}_{r , s}')

Information

Sub Equations

  • Sum(binomial(n,i)*(q - 1)**(i)* Symbol('{K}_{r}')(i ; n , q)* Symbol('{K}_{s}')(i ; n , q), (i, 0, n)) = (q)**(n)*(q - 1)**(r)*binomial(n,r)*Symbol('{Symbol('delta')}_{r , s}')

Free variables

  • Symbol('{Symbol('delta')}_{r , s}')
  • n
  • q
  • r
  • s

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that SymPy uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

  • Could be the first Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

Maple

Translation: sum(binomial(n,i)*(q - 1)^(i)* K[r](i ; n , q)* K[s](i ; n , q), i = 0..n) = (q)^(n)*(q - 1)^(r)*binomial(n,r)*delta[r , s]

Information

Sub Equations

  • sum(binomial(n,i)*(q - 1)^(i)* K[r](i ; n , q)* K[s](i ; n , q), i = 0..n) = (q)^(n)*(q - 1)^(r)*binomial(n,r)*delta[r , s]

Free variables

  • delta[r , s]
  • n
  • q
  • r
  • s

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Maple uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

  • Could be the first Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • non-negative integer

Complete translation information:

{
  "id" : "FORMULA_d65b1937893f9781b6fe503c1b692ff3",
  "formula" : "\\sum_{i=0}^n\\binom{n}{i}(q-1)^i\\mathcal{K}_r(i; n,q)\\mathcal{K}_s(i; n,q) = q^n(q-1)^r\\binom{n}{r}\\delta_{r,s}",
  "semanticFormula" : "\\sum_{i=0}^n\\binom{n}{i}(q-1)^i\\mathcal{K}_r(i; n,q)\\mathcal{K}_s(i; n,q) = q^n(q-1)^r\\binom{n}{r}\\delta_{r,s}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Sum[Binomial[n,i]*(q - 1)^(i)* Subscript[K, r][i ; n , q]* Subscript[K, s][i ; n , q], {i, 0, n}, GenerateConditions->None] == (q)^(n)*(q - 1)^(r)*Binomial[n,r]*Subscript[\\[Delta], r , s]",
      "translationInformation" : {
        "subEquations" : [ "Sum[Binomial[n,i]*(q - 1)^(i)* Subscript[K, r][i ; n , q]* Subscript[K, s][i ; n , q], {i, 0, n}, GenerateConditions->None] = (q)^(n)*(q - 1)^(r)*Binomial[n,r]*Subscript[\\[Delta], r , s]" ],
        "freeVariables" : [ "Subscript[\\[Delta], r , s]", "n", "q", "r", "s" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Mathematica uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n",
          "\\delta" : "Could be the first Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "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" : "Sum(binomial(n,i)*(q - 1)**(i)* Symbol('{K}_{r}')(i ; n , q)* Symbol('{K}_{s}')(i ; n , q), (i, 0, n)) == (q)**(n)*(q - 1)**(r)*binomial(n,r)*Symbol('{Symbol('delta')}_{r , s}')",
      "translationInformation" : {
        "subEquations" : [ "Sum(binomial(n,i)*(q - 1)**(i)* Symbol('{K}_{r}')(i ; n , q)* Symbol('{K}_{s}')(i ; n , q), (i, 0, n)) = (q)**(n)*(q - 1)**(r)*binomial(n,r)*Symbol('{Symbol('delta')}_{r , s}')" ],
        "freeVariables" : [ "Symbol('{Symbol('delta')}_{r , s}')", "n", "q", "r", "s" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that SymPy uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n",
          "\\delta" : "Could be the first Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "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" : "sum(binomial(n,i)*(q - 1)^(i)* K[r](i ; n , q)* K[s](i ; n , q), i = 0..n) = (q)^(n)*(q - 1)^(r)*binomial(n,r)*delta[r , s]",
      "translationInformation" : {
        "subEquations" : [ "sum(binomial(n,i)*(q - 1)^(i)* K[r](i ; n , q)* K[s](i ; n , q), i = 0..n) = (q)^(n)*(q - 1)^(r)*binomial(n,r)*delta[r , s]" ],
        "freeVariables" : [ "delta[r , s]", "n", "q", "r", "s" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Maple uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n",
          "\\delta" : "Could be the first Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "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" : 4,
    "sentence" : 0,
    "word" : 5
  } ],
  "includes" : [ "q", "r,s", "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "non-negative integer",
    "score" : 0.7125985104912714
  } ]
}

Specify your own input