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 r = 0, 1, \ldots, n - 1}

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

Semantic latex: r = 0, 1, \ldots, n - 1

Confidence: 0

Mathematica

Translation: r == 0 1 , \[Ellipsis], n - 1

Information

Free variables

  • n
  • r

Tests

Symbolic

Test expression: r

ERROR:

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

SymPy

Translation: r == 0 1 , null , n - 1

Information

Free variables

  • n
  • r

Tests

Symbolic
Numeric

Maple

Translation: r = 0; 1 , .. , n - 1

Information

Free variables

  • n
  • r

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • Orthogonal polynomial
  • scalar product
  • coefficient
  • degree
  • i.e. monic
  • infinity
  • maximal degree
  • recurrence relation
  • nontrivial polynomial of degree

Complete translation information:

{
  "id" : "FORMULA_d690b4ff9fbb6944eda4257a4ef6279e",
  "formula" : "r = 0, 1, \\ldots, n - 1",
  "semanticFormula" : "r = 0, 1, \\ldots, n - 1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "r == 0\n 1 , \\[Ellipsis], n - 1",
      "translationInformation" : {
        "freeVariables" : [ "n", "r" ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "r",
          "rhs" : "",
          "testExpression" : "r",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "r == 0\n 1 , null , n - 1",
      "translationInformation" : {
        "freeVariables" : [ "n", "r" ]
      }
    },
    "Maple" : {
      "translation" : "r = 0; 1 , .. , n - 1",
      "translationInformation" : {
        "freeVariables" : [ "n", "r" ]
      }
    }
  },
  "positions" : [ {
    "section" : 8,
    "sentence" : 0,
    "word" : 36
  } ],
  "includes" : [ "n - 1", "n", "r", "1" ],
  "isPartOf" : [ "\\int_a^b \\omega(x) \\, x^k p_n(x) \\, dx = 0, \\quad \\text{for all } k = 0, 1, \\ldots, n - 1" ],
  "definiens" : [ {
    "definition" : "Orthogonal polynomial",
    "score" : 0.8426021531523621
  }, {
    "definition" : "scalar product",
    "score" : 0.8426021531523621
  }, {
    "definition" : "coefficient",
    "score" : 0.6687181434333315
  }, {
    "definition" : "degree",
    "score" : 0.6687181434333315
  }, {
    "definition" : "i.e. monic",
    "score" : 0.6687181434333315
  }, {
    "definition" : "infinity",
    "score" : 0.6687181434333315
  }, {
    "definition" : "maximal degree",
    "score" : 0.6687181434333315
  }, {
    "definition" : "recurrence relation",
    "score" : 0.6687181434333315
  }, {
    "definition" : "nontrivial polynomial of degree",
    "score" : 0.3249086196238076
  } ]
}

Specify your own input