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

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

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

Confidence: 0

Mathematica

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

Information

Free variables

  • N
  • m
  • n

Tests

Symbolic

Test expression: n , m

ERROR:

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

SymPy

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

Information

Free variables

  • N
  • m
  • n

Tests

Symbolic
Numeric

Maple

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

Information

Free variables

  • N
  • m
  • n

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • orthogonality condition
  • Dual Hahn polynomial

Complete translation information:

{
  "id" : "FORMULA_9bd8649e9bfc6f2c36dc624c42d4959d",
  "formula" : "n,m=0,1,...,N-1",
  "semanticFormula" : "n,m=0,1,...,N-1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "n , m == 0\n 1 , \\[Ellipsis], N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "m", "n" ]
      },
      "symbolicResults" : {
        "overallResult" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "n , m",
          "rhs" : "",
          "testExpression" : "n , m",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "n , m == 0\n 1 , null , N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "m", "n" ]
      }
    },
    "Maple" : {
      "translation" : "n , m = 0; 1 , .. , N - 1",
      "translationInformation" : {
        "freeVariables" : [ "N", "m", "n" ]
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 0,
    "word" : 10
  }, {
    "section" : 2,
    "sentence" : 2,
    "word" : 7
  } ],
  "includes" : [ "n=0,1,...,N-1", "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "orthogonality condition",
    "score" : 0.7931026863672672
  }, {
    "definition" : "Dual Hahn polynomial",
    "score" : 0.6288842031023242
  } ]
}

Specify your own input