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 x=cos(t+u)}

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

Semantic latex: x=cos(t+u)

Confidence: 0

Mathematica

Translation: x == cos[t + u]

Information

Sub Equations

  • x = cos[t + u]

Free variables

  • t
  • u
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic

Test expression: (x)-(cos[t + u])

ERROR:

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

SymPy

Translation: x == cos(t + u)

Information

Sub Equations

  • x = cos(t + u)

Free variables

  • t
  • u
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: x = cos(t + u)

Information

Sub Equations

  • x = cos(t + u)

Free variables

  • t
  • u
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Description

  • polynomial
  • term of basic hypergeometric function
  • Pochhammer symbol

Complete translation information:

{
  "id" : "FORMULA_7036c76d0ea1aec0ed08f5754c66c2ee",
  "formula" : "x=cos(t+u)",
  "semanticFormula" : "x=cos(t+u)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "x == cos[t + u]",
      "translationInformation" : {
        "subEquations" : [ "x = cos[t + u]" ],
        "freeVariables" : [ "t", "u", "x" ],
        "tokenTranslations" : {
          "cos" : "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" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "x",
          "rhs" : "cos[t + u]",
          "testExpression" : "(x)-(cos[t + u])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "x == cos(t + u)",
      "translationInformation" : {
        "subEquations" : [ "x = cos(t + u)" ],
        "freeVariables" : [ "t", "u", "x" ],
        "tokenTranslations" : {
          "cos" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "x = cos(t + u)",
      "translationInformation" : {
        "subEquations" : [ "x = cos(t + u)" ],
        "freeVariables" : [ "t", "u", "x" ],
        "tokenTranslations" : {
          "cos" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 0,
    "word" : 16
  } ],
  "includes" : [ ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "polynomial",
    "score" : 0.6859086196238077
  }, {
    "definition" : "term of basic hypergeometric function",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Pochhammer symbol",
    "score" : 0.5988174995334326
  } ]
}

Specify your own input