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

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

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

Confidence: 0

Mathematica

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

Information

Sub Equations

  • q = Exp[2*Pi*I*\[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*Pi*I*\[Tau]])

ERROR:

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

SymPy

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

Information

Sub Equations

  • q = exp(2*pi*I*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*Pi*I*tau)

Information

Sub Equations

  • q = exp(2*Pi*I*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

Includes

Description

  • graded character of any element
  • expansion
  • Hauptmodul for the group
  • conjugacy class 4c of the monster group
  • function
  • monster vertex algebra

Complete translation information:

{
  "id" : "FORMULA_3b1932bf3b4b66a9cfc46591d75908d4",
  "formula" : "q=e^{2\\pi i\\tau }",
  "semanticFormula" : "q = \\expe^{2 \\cpi \\iunit \\tau}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "q == Exp[2*Pi*I*\\[Tau]]",
      "translationInformation" : {
        "subEquations" : [ "q = Exp[2*Pi*I*\\[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*Pi*I*\\[Tau]]",
          "testExpression" : "(q)-(Exp[2*Pi*I*\\[Tau]])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "q == exp(2*pi*I*Symbol('tau'))",
      "translationInformation" : {
        "subEquations" : [ "q = exp(2*pi*I*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*Pi*I*tau)",
      "translationInformation" : {
        "subEquations" : [ "q = exp(2*Pi*I*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" : 4,
    "sentence" : 0,
    "word" : 20
  } ],
  "includes" : [ "\\tau", "q = e^{\\pi i \\tau}", "q" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "graded character of any element",
    "score" : 0.7125985104912714
  }, {
    "definition" : "expansion",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Hauptmodul for the group",
    "score" : 0.6859086196238077
  }, {
    "definition" : "conjugacy class 4c of the monster group",
    "score" : 0.6460746792928004
  }, {
    "definition" : "function",
    "score" : 0.6460746792928004
  }, {
    "definition" : "monster vertex algebra",
    "score" : 0.5049074255814494
  } ]
}

Specify your own input