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 a=1}

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

Semantic latex: a=1

Confidence: 0

Mathematica

Translation: a == 1

Information

Sub Equations

  • a = 1

Free variables

  • a

Tests

Symbolic

Test expression: (a)-(1)

ERROR:

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

SymPy

Translation: a == 1

Information

Sub Equations

  • a = 1

Free variables

  • a

Tests

Symbolic
Numeric

Maple

Translation: a = 1

Information

Sub Equations

  • a = 1

Free variables

  • a

Tests

Symbolic
Numeric

Dependency Graph Information

Is part of

Description

  • derivative
  • result

Complete translation information:

{
  "id" : "FORMULA_3872c9ae3f427af0be0ead09d07ae2cf",
  "formula" : "a=1",
  "semanticFormula" : "a=1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "a == 1",
      "translationInformation" : {
        "subEquations" : [ "a = 1" ],
        "freeVariables" : [ "a" ]
      },
      "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" : "a",
          "rhs" : "1",
          "testExpression" : "(a)-(1)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "a == 1",
      "translationInformation" : {
        "subEquations" : [ "a = 1" ],
        "freeVariables" : [ "a" ]
      }
    },
    "Maple" : {
      "translation" : "a = 1",
      "translationInformation" : {
        "subEquations" : [ "a = 1" ],
        "freeVariables" : [ "a" ]
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 7,
    "word" : 25
  } ],
  "includes" : [ ],
  "isPartOf" : [ "\\left . H_n=(-1)^n \\frac{\\partial^nH_a}{\\partial a^n} \\right |_{a=1}" ],
  "definiens" : [ {
    "definition" : "derivative",
    "score" : 0.8335022225110844
  }, {
    "definition" : "result",
    "score" : 0.6954080343007951
  } ]
}

Specify your own input