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 \alpha = \beta = 0 }

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

Semantic latex: \alpha = \beta = 0

Confidence: 0

Mathematica

Translation: \[Alpha] == \[Beta] == 0

Information

Sub Equations

  • \[Alpha] = \[Beta]
  • \[Beta] = 0

Free variables

  • \[Alpha]
  • \[Beta]

Symbol info

  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic

Test expression: (\[Alpha])-(\[Beta])

ERROR:

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

Test expression: (\[Beta])-(0)

ERROR:

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

SymPy

Translation: Symbol('alpha') == Symbol('beta') == 0

Information

Sub Equations

  • Symbol('alpha') = Symbol('beta')
  • Symbol('beta') = 0

Free variables

  • Symbol('alpha')
  • Symbol('beta')

Symbol info

  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Maple

Translation: alpha = beta = 0

Information

Sub Equations

  • alpha = beta
  • beta = 0

Free variables

  • alpha
  • beta

Symbol info

  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

Tests

Symbolic
Numeric

Dependency Graph Information

Description

  • Legendre polynomial

Complete translation information:

{
  "id" : "FORMULA_c67a4e52a3d370768609f2e25781a9d2",
  "formula" : "\\alpha = \\beta = 0",
  "semanticFormula" : "\\alpha = \\beta = 0",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[Alpha] == \\[Beta] == 0",
      "translationInformation" : {
        "subEquations" : [ "\\[Alpha] = \\[Beta]", "\\[Beta] = 0" ],
        "freeVariables" : [ "\\[Alpha]", "\\[Beta]" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 2,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 2,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "\\[Alpha]",
          "rhs" : "\\[Beta]",
          "testExpression" : "(\\[Alpha])-(\\[Beta])",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        }, {
          "lhs" : "\\[Beta]",
          "rhs" : "0",
          "testExpression" : "(\\[Beta])-(0)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('alpha') == Symbol('beta') == 0",
      "translationInformation" : {
        "subEquations" : [ "Symbol('alpha') = Symbol('beta')", "Symbol('beta') = 0" ],
        "freeVariables" : [ "Symbol('alpha')", "Symbol('beta')" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    },
    "Maple" : {
      "translation" : "alpha = beta = 0",
      "translationInformation" : {
        "subEquations" : [ "alpha = beta", "beta = 0" ],
        "freeVariables" : [ "alpha", "beta" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 1,
    "word" : 1
  } ],
  "includes" : [ ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "Legendre polynomial",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input