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 \mathit{He}_n^{[\alpha]}(x)}

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

Semantic latex: \mathit{He}_n^{[\alpha]}(x)

Confidence: 0

Mathematica

Translation: (Subscript[He, n])^(\[Alpha])[x]

Information

Sub Equations

  • (Subscript[He, n])^(\[Alpha])[x]

Free variables

  • \[Alpha]
  • n
  • x

Symbol info

  • Could be the second 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: (Symbol('{He}_{n}'))**(Symbol('alpha'))(x)

Information

Sub Equations

  • (Symbol('{He}_{n}'))**(Symbol('alpha'))(x)

Free variables

  • Symbol('alpha')
  • n
  • x

Symbol info

  • Could be the second 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: (He[n])^(alpha)(x)

Information

Sub Equations

  • (He[n])^(alpha)(x)

Free variables

  • alpha
  • n
  • x

Symbol info

  • Could be the second 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

Is part of

Description

  • variance
  • generalized Hermite polynomial
  • positive number
  • scaling
  • polynomial sequence
  • umbral composition
  • identity
  • coefficient
  • term
  • moment of the normal distribution
  • sequence
  • absolute value
  • moment of normal probability distribution
  • normal distribution
  • special case of the cross-sequence identity
  • group under the operation
  • Hermite polynomial of negative variance
  • value
  • minus sign

Complete translation information:

{
  "id" : "FORMULA_916cc84e1ef0503a8203854322a0adaa",
  "formula" : "\\mathit{He}_n^{[\\alpha]}(x)",
  "semanticFormula" : "\\mathit{He}_n^{[\\alpha]}(x)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(Subscript[He, n])^(\\[Alpha])[x]",
      "translationInformation" : {
        "subEquations" : [ "(Subscript[He, n])^(\\[Alpha])[x]" ],
        "freeVariables" : [ "\\[Alpha]", "n", "x" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "He" : "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('{He}_{n}'))**(Symbol('alpha'))(x)",
      "translationInformation" : {
        "subEquations" : [ "(Symbol('{He}_{n}'))**(Symbol('alpha'))(x)" ],
        "freeVariables" : [ "Symbol('alpha')", "n", "x" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "He" : "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" : "(He[n])^(alpha)(x)",
      "translationInformation" : {
        "subEquations" : [ "(He[n])^(alpha)(x)" ],
        "freeVariables" : [ "alpha", "n", "x" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "He" : "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" : 17,
    "sentence" : 1,
    "word" : 12
  }, {
    "section" : 18,
    "sentence" : 1,
    "word" : 17
  } ],
  "includes" : [ "He", "n", "x", "\\alpha" ],
  "isPartOf" : [ "\\mathit{He}_n^{[\\alpha]}(x) = \\alpha^{\\frac{n}{2}}\\mathit{He}_n\\left(\\frac{x}{\\sqrt{\\alpha}}\\right) = \\left(\\frac{\\alpha}{2}\\right)^{\\frac{n}{2}} H_n\\left( \\frac{x}{\\sqrt{2 \\alpha}}\\right) = e^{-\\frac{\\alpha D^2}{2}} \\left(x^n\\right)", "\\mathit{He}_n^{[\\alpha]}(x) = \\sum_{k=0}^n h^{[\\alpha]}_{n,k} x^k", "\\left(\\mathit{He}_n^{[\\alpha]} \\circ \\mathit{He}^{[\\beta]}\\right)(x) = \\mathit{He}_n^{[\\alpha+\\beta]}(x)", "\\mathit{He}_n^{[\\alpha+\\beta]}(x + y) = \\sum_{k=0}^n \\binom{n}{k} \\mathit{He}_k^{[\\alpha]}(x) \\mathit{He}_{n-k}^{[\\beta]}(y)", "\\mathit{He}_n^{[-\\alpha]}(x)", "E[X^n] = \\mathit{He}_n^{[-\\sigma^2]}(\\mu)", "\\sum_{k=0}^n \\binom{n}{k} \\mathit{He}_k^{[\\alpha]}(x) \\mathit{He}_{n-k}^{[-\\alpha]}(y) = \\mathit{He}_n^{[0]}(x + y) = (x + y)^n" ],
  "definiens" : [ {
    "definition" : "variance",
    "score" : 0.7567828878819742
  }, {
    "definition" : "generalized Hermite polynomial",
    "score" : 0.722
  }, {
    "definition" : "positive number",
    "score" : 0.6629879847031728
  }, {
    "definition" : "scaling",
    "score" : 0.6629879847031728
  }, {
    "definition" : "polynomial sequence",
    "score" : 0.5954181816892302
  }, {
    "definition" : "umbral composition",
    "score" : 0.5583345920624354
  }, {
    "definition" : "identity",
    "score" : 0.4555357896715027
  }, {
    "definition" : "coefficient",
    "score" : 0.4391501501950797
  }, {
    "definition" : "term",
    "score" : 0.40399210270803576
  }, {
    "definition" : "moment of the normal distribution",
    "score" : 0.34589919335754316
  }, {
    "definition" : "sequence",
    "score" : 0.3198499638698394
  }, {
    "definition" : "absolute value",
    "score" : 0.319333892799869
  }, {
    "definition" : "moment of normal probability distribution",
    "score" : 0.31920930249007934
  }, {
    "definition" : "normal distribution",
    "score" : 0.31920930249007934
  }, {
    "definition" : "special case of the cross-sequence identity",
    "score" : 0.3191837070106504
  }, {
    "definition" : "group under the operation",
    "score" : 0.2800160235388322
  }, {
    "definition" : "Hermite polynomial of negative variance",
    "score" : 0.2800160235388322
  }, {
    "definition" : "value",
    "score" : 0.2793753621590721
  }, {
    "definition" : "minus sign",
    "score" : 0.18403658234126982
  } ]
}

Specify your own input