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 q = e^{2i\pi\tau}}

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

Semantic latex: q = \expe^{2 \iunit \cpi \tau}

Confidence: 0

Mathematica

Translation: q == Exp[2*I*Pi*\[Tau]]

Information

Sub Equations

  • q = Exp[2*I*Pi*\[Tau]]

Free variables

  • \[Tau]
  • q

Symbol info

  • Recognizes e with power as the exponential function. It was translated as a function.
  • Imaginary unit was translated to: I
  • Pi was translated to: Pi

Tests

Symbolic

Test expression: (q)-(Exp[2*I*Pi*\[Tau]])

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

SymPy

Translation: q == exp(2*I*pi*Symbol('tau'))

Information

Sub Equations

  • q = exp(2*I*pi*Symbol('tau'))

Free variables

  • Symbol('tau')
  • q

Symbol info

  • Recognizes e with power as the exponential function. It was translated as a function.
  • Imaginary unit was translated to: I
  • Pi was translated to: pi

Tests

Symbolic
Numeric

Maple

Translation: q = exp(2*I*Pi*tau)

Information

Sub Equations

  • q = exp(2*I*Pi*tau)

Free variables

  • q
  • tau

Symbol info

  • Recognizes e with power as the exponential function. It was translated as a function.
  • Imaginary unit was translated to: I
  • Pi was translated to: Pi

Tests

Symbolic
Numeric

Dependency Graph Information

Description

  • power series
  • theta function of an integral lattice
  • coefficient
  • number of lattice vector
  • norm

Complete translation information:

{
  "id" : "FORMULA_2107779565348eb246bd0cd86956f98a",
  "formula" : "q = e^{2i\\pi\\tau}",
  "semanticFormula" : "q = \\expe^{2 \\iunit \\cpi \\tau}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "q == Exp[2*I*Pi*\\[Tau]]",
      "translationInformation" : {
        "subEquations" : [ "q = Exp[2*I*Pi*\\[Tau]]" ],
        "freeVariables" : [ "\\[Tau]", "q" ],
        "tokenTranslations" : {
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "q",
          "rhs" : "Exp[2*I*Pi*\\[Tau]]",
          "testExpression" : "(q)-(Exp[2*I*Pi*\\[Tau]])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "q == exp(2*I*pi*Symbol('tau'))",
      "translationInformation" : {
        "subEquations" : [ "q = exp(2*I*pi*Symbol('tau'))" ],
        "freeVariables" : [ "Symbol('tau')", "q" ],
        "tokenTranslations" : {
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\cpi" : "Pi was translated to: pi"
        }
      }
    },
    "Maple" : {
      "translation" : "q = exp(2*I*Pi*tau)",
      "translationInformation" : {
        "subEquations" : [ "q = exp(2*I*Pi*tau)" ],
        "freeVariables" : [ "q", "tau" ],
        "tokenTranslations" : {
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\cpi" : "Pi was translated to: Pi"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 3,
    "word" : 15
  } ],
  "includes" : [ ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "power series",
    "score" : 0.7125985104912714
  }, {
    "definition" : "theta function of an integral lattice",
    "score" : 0.6460746792928004
  }, {
    "definition" : "coefficient",
    "score" : 0.5988174995334326
  }, {
    "definition" : "number of lattice vector",
    "score" : 0.5988174995334326
  }, {
    "definition" : "norm",
    "score" : 0.5049074255814494
  } ]
}

Specify your own input