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^{b-1}_{s=a}w_n^{(c)}(s,a,b)w_m^{(c)}(s,a,b)\rho(s)[\Delta x(s-\frac{1}{2}) ]=\delta_{nm}d_n^2}

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

Semantic latex: \sum_{s=a}^{b-1} w_n^{(c)}(s , a , b) w_m^{(c)}(s , a , b) \rho(s) [\Delta x(s - \frac{1}{2})] = \delta_{nm} d_n^2

Confidence: 0

Mathematica

Translation: Sum[(Subscript[w, n])^(c)[s , a , b]* (Subscript[w, m])^(c)[s , a , b]* \[Rho][s]*(\[CapitalDelta]*x*(s -Divide[1,2])), {s, a, b - 1}, GenerateConditions->None] == Subscript[\[Delta], n, m]*(Subscript[d, n])^(2)

Information

Sub Equations

  • Sum[(Subscript[w, n])^(c)[s , a , b]* (Subscript[w, m])^(c)[s , a , b]* \[Rho][s]*(\[CapitalDelta]*x*(s -Divide[1,2])), {s, a, b - 1}, GenerateConditions->None] = Subscript[\[Delta], n, m]*(Subscript[d, n])^(2)

Free variables

  • Subscript[\[Delta], n, m]
  • Subscript[d, n]
  • \[CapitalDelta]
  • \[Rho]
  • a
  • b
  • c
  • m
  • n
  • x

Symbol info

  • 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).
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

SymPy

Translation: Sum((Symbol('{w}_{n}'))**(c)(s , a , b)* (Symbol('{w}_{m}'))**(c)(s , a , b)* Symbol('rho')(s)*(Symbol('Delta')*x*(s -(1)/(2))), (s, a, b - 1)) == Symbol('{Symbol('delta')}_{n, m}')*(Symbol('{d}_{n}'))**(2)

Information

Sub Equations

  • Sum((Symbol('{w}_{n}'))**(c)(s , a , b)* (Symbol('{w}_{m}'))**(c)(s , a , b)* Symbol('rho')(s)*(Symbol('Delta')*x*(s -(1)/(2))), (s, a, b - 1)) = Symbol('{Symbol('delta')}_{n, m}')*(Symbol('{d}_{n}'))**(2)

Free variables

  • Symbol('Delta')
  • Symbol('rho')
  • Symbol('{Symbol('delta')}_{n, m}')
  • Symbol('{d}_{n}')
  • a
  • b
  • c
  • m
  • n
  • x

Symbol info

  • 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).
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: sum((w[n])^(c)(s , a , b)* (w[m])^(c)(s , a , b)* rho(s)*(Delta*x*(s -(1)/(2))), s = a..b - 1) = delta[n, m]*(d[n])^(2)

Information

Sub Equations

  • sum((w[n])^(c)(s , a , b)* (w[m])^(c)(s , a , b)* rho(s)*(Delta*x*(s -(1)/(2))), s = a..b - 1) = delta[n, m]*(d[n])^(2)

Free variables

  • Delta
  • a
  • b
  • c
  • d[n]
  • delta[n, m]
  • m
  • n
  • rho
  • x

Symbol info

  • 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).
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • orthogonality condition
  • Dual Hahn polynomial

Complete translation information:

{
  "id" : "FORMULA_657ec9a2e460e61adc6857260291be56",
  "formula" : "\\sum^{b-1}_{s=a}w_n^{(c)}(s,a,b)w_m^{(c)}(s,a,b)\\rho(s)[\\Delta x(s-\\frac{1}{2}) ]=\\delta_{nm}d_n^2",
  "semanticFormula" : "\\sum_{s=a}^{b-1} w_n^{(c)}(s , a , b) w_m^{(c)}(s , a , b) \\rho(s) [\\Delta x(s - \\frac{1}{2})] = \\delta_{nm} d_n^2",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Sum[(Subscript[w, n])^(c)[s , a , b]* (Subscript[w, m])^(c)[s , a , b]* \\[Rho][s]*(\\[CapitalDelta]*x*(s -Divide[1,2])), {s, a, b - 1}, GenerateConditions->None] == Subscript[\\[Delta], n, m]*(Subscript[d, n])^(2)",
      "translationInformation" : {
        "subEquations" : [ "Sum[(Subscript[w, n])^(c)[s , a , b]* (Subscript[w, m])^(c)[s , a , b]* \\[Rho][s]*(\\[CapitalDelta]*x*(s -Divide[1,2])), {s, a, b - 1}, GenerateConditions->None] = Subscript[\\[Delta], n, m]*(Subscript[d, n])^(2)" ],
        "freeVariables" : [ "Subscript[\\[Delta], n, m]", "Subscript[d, n]", "\\[CapitalDelta]", "\\[Rho]", "a", "b", "c", "m", "n", "x" ],
        "tokenTranslations" : {
          "\\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",
          "\\rho" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "w" : "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((Symbol('{w}_{n}'))**(c)(s , a , b)* (Symbol('{w}_{m}'))**(c)(s , a , b)* Symbol('rho')(s)*(Symbol('Delta')*x*(s -(1)/(2))), (s, a, b - 1)) == Symbol('{Symbol('delta')}_{n, m}')*(Symbol('{d}_{n}'))**(2)",
      "translationInformation" : {
        "subEquations" : [ "Sum((Symbol('{w}_{n}'))**(c)(s , a , b)* (Symbol('{w}_{m}'))**(c)(s , a , b)* Symbol('rho')(s)*(Symbol('Delta')*x*(s -(1)/(2))), (s, a, b - 1)) = Symbol('{Symbol('delta')}_{n, m}')*(Symbol('{d}_{n}'))**(2)" ],
        "freeVariables" : [ "Symbol('Delta')", "Symbol('rho')", "Symbol('{Symbol('delta')}_{n, m}')", "Symbol('{d}_{n}')", "a", "b", "c", "m", "n", "x" ],
        "tokenTranslations" : {
          "\\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",
          "\\rho" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "w" : "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((w[n])^(c)(s , a , b)* (w[m])^(c)(s , a , b)* rho(s)*(Delta*x*(s -(1)/(2))), s = a..b - 1) = delta[n, m]*(d[n])^(2)",
      "translationInformation" : {
        "subEquations" : [ "sum((w[n])^(c)(s , a , b)* (w[m])^(c)(s , a , b)* rho(s)*(Delta*x*(s -(1)/(2))), s = a..b - 1) = delta[n, m]*(d[n])^(2)" ],
        "freeVariables" : [ "Delta", "a", "b", "c", "d[n]", "delta[n, m]", "m", "n", "rho", "x" ],
        "tokenTranslations" : {
          "\\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",
          "\\rho" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "w" : "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" : [ "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "orthogonality condition",
    "score" : 0.722
  }, {
    "definition" : "Dual Hahn polynomial",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input