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 n=0,1,...,N-1}

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

Semantic latex: n=0,1,...,N-1

Confidence: 0

Mathematica

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

Information

Free variables

  • N
  • n

Tests

Symbolic

Test expression: n

ERROR:

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

SymPy

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

Information

Free variables

  • N
  • n

Tests

Symbolic
Numeric

Maple

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

Information

Free variables

  • N
  • n

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • non-uniform lattice
  • orthogonality condition
  • parameter
  • Dual Hahn polynomial
  • result
  • numerical stability
  • polynomial

Complete translation information:

{
  "id" : "FORMULA_feeb2d272f8dd139cef4ab574d5ef40b",
  "formula" : "n=0,1,...,N-1",
  "semanticFormula" : "n=0,1,...,N-1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "n == 0\n 1 , \\[Ellipsis], N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "n" ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "n",
          "rhs" : "",
          "testExpression" : "n",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "n == 0\n 1 , null , N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "n" ]
      }
    },
    "Maple" : {
      "translation" : "n = 0; 1 , .. , N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "n" ]
      }
    }
  },
  "positions" : [ {
    "section" : 0,
    "sentence" : 1,
    "word" : 14
  }, {
    "section" : 2,
    "sentence" : 1,
    "word" : 25
  } ],
  "includes" : [ "n" ],
  "isPartOf" : [ "n,m=0,1,...,N-1" ],
  "definiens" : [ {
    "definition" : "non-uniform lattice",
    "score" : 0.6288842031023242
  }, {
    "definition" : "orthogonality condition",
    "score" : 0.6115489028129123
  }, {
    "definition" : "parameter",
    "score" : 0.5816270233429564
  }, {
    "definition" : "Dual Hahn polynomial",
    "score" : 0.5572301969672127
  }, {
    "definition" : "result",
    "score" : 0.2593055947715278
  }, {
    "definition" : "numerical stability",
    "score" : 0.21058333333333334
  }, {
    "definition" : "polynomial",
    "score" : 0.16539552081954464
  } ]
}

Specify your own input