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 \lambda = \frac{p}{q}}

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

Semantic latex: \lambda = \frac{p}{q}

Confidence: 0

Mathematica

Translation: \[Lambda] == Divide[p,q]

Information

Sub Equations

  • \[Lambda] = Divide[p,q]

Free variables

  • \[Lambda]
  • p
  • q

Tests

Symbolic

Test expression: (\[Lambda])-(Divide[p,q])

ERROR:

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

SymPy

Translation: Symbol('lambda') == (p)/(q)

Information

Sub Equations

  • Symbol('lambda') = (p)/(q)

Free variables

  • Symbol('lambda')
  • p
  • q

Tests

Symbolic
Numeric

Maple

Translation: lambda = (p)/(q)

Information

Sub Equations

  • lambda = (p)/(q)

Free variables

  • lambda
  • p
  • q

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_a544e08b39888731d96facc749a4a7ad",
  "formula" : "\\lambda = \\frac{p}{q}",
  "semanticFormula" : "\\lambda = \\frac{p}{q}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Lambda] == Divide[p,q]",
      "translationInformation" : {
        "subEquations" : [ "\\[Lambda] = Divide[p,q]" ],
        "freeVariables" : [ "\\[Lambda]", "p", "q" ]
      },
      "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" : "\\[Lambda]",
          "rhs" : "Divide[p,q]",
          "testExpression" : "(\\[Lambda])-(Divide[p,q])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('lambda') == (p)/(q)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('lambda') = (p)/(q)" ],
        "freeVariables" : [ "Symbol('lambda')", "p", "q" ]
      }
    },
    "Maple" : {
      "translation" : "lambda = (p)/(q)",
      "translationInformation" : {
        "subEquations" : [ "lambda = (p)/(q)" ],
        "freeVariables" : [ "lambda", "p", "q" ]
      }
    }
  },
  "positions" : [ {
    "section" : 4,
    "sentence" : 1,
    "word" : 1
  } ],
  "includes" : [ "\\lambda" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input