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 \,_1\psi_1}

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

Semantic latex: _1\psi_1

Confidence: 0

Mathematica

Translation: Subscript[$0, 1]*Subscript[\[Psi], 1]

Information

Sub Equations

  • Subscript[$0, 1]*Subscript[\[Psi], 1]

Free variables

  • Subscript[\[Psi], 1]

Symbol info

  • Could be The reciprocal Fibonacci constant.

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

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{$0}_{1}')*Symbol('{Symbol('psi')}_{1}')

Information

Sub Equations

  • Symbol('{$0}_{1}')*Symbol('{Symbol('psi')}_{1}')

Free variables

  • Symbol('{Symbol('psi')}_{1}')

Symbol info

  • Could be The reciprocal Fibonacci constant.

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

Tests

Symbolic
Numeric

Maple

Translation: $0[1]*psi[1]

Information

Sub Equations

  • $0[1]*psi[1]

Free variables

  • psi[1]

Symbol info

  • Could be The reciprocal Fibonacci constant.

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_d4445784b9854c495cae4765ba720417",
  "formula" : "_1\\psi_1",
  "semanticFormula" : "_1\\psi_1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[$0, 1]*Subscript[\\[Psi], 1]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[$0, 1]*Subscript[\\[Psi], 1]" ],
        "freeVariables" : [ "Subscript[\\[Psi], 1]" ],
        "tokenTranslations" : {
          "\\psi" : "Could be The reciprocal Fibonacci constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "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('{$0}_{1}')*Symbol('{Symbol('psi')}_{1}')",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{$0}_{1}')*Symbol('{Symbol('psi')}_{1}')" ],
        "freeVariables" : [ "Symbol('{Symbol('psi')}_{1}')" ],
        "tokenTranslations" : {
          "\\psi" : "Could be The reciprocal Fibonacci constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "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" : "$0[1]*psi[1]",
      "translationInformation" : {
        "subEquations" : [ "$0[1]*psi[1]" ],
        "freeVariables" : [ "psi[1]" ],
        "tokenTranslations" : {
          "\\psi" : "Could be The reciprocal Fibonacci constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "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" : [ "\\psi" ],
  "isPartOf" : [ "\\;_1\\psi_1 \\left[\\begin{matrix} a \\\\ b \\end{matrix} ; q,z \\right] = \\sum_{n=-\\infty}^\\infty \\frac {(a;q)_n} {(b;q)_n} z^n= \\frac {(b/a,q,q/az,az;q)_\\infty }{(b,b/az,q/a,z;q)_\\infty}" ],
  "definiens" : [ ]
}

Specify your own input