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(\tau)=k^2(\tau)}

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

Semantic latex: \modularlambdatau@{\tau} = k^2(\tau)

Confidence: 0.6805

Mathematica

Translation: ModularLambda[\[Tau]] == (k[\[Tau]])^(2)

Information

Sub Equations

  • ModularLambda[\[Tau]] = (k[\[Tau]])^(2)

Free variables

  • \[Tau]

Symbol info

  • Elliptic modular function; Example: \modularlambdatau@{\tau}

Will be translated to: ModularLambda[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/23.15#E6 Mathematica: https://reference.wolfram.com/language/ref/ModularLambda.html

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic

Test expression: (ModularLambda[\[Tau]])-((k)^(2)*(\[Tau]))

ERROR:

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

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \modularlambdatau [\modularlambdatau]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \modularlambdatau [\modularlambdatau]

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • square of the Jacobi modulus

Complete translation information:

{
  "id" : "FORMULA_468606ea4e229d845345faf052eda070",
  "formula" : "\\lambda(\\tau)=k^2(\\tau)",
  "semanticFormula" : "\\modularlambdatau@{\\tau} = k^2(\\tau)",
  "confidence" : 0.6805,
  "translations" : {
    "Mathematica" : {
      "translation" : "ModularLambda[\\[Tau]] == (k[\\[Tau]])^(2)",
      "translationInformation" : {
        "subEquations" : [ "ModularLambda[\\[Tau]] = (k[\\[Tau]])^(2)" ],
        "freeVariables" : [ "\\[Tau]" ],
        "tokenTranslations" : {
          "\\modularlambdatau" : "Elliptic modular function; Example: \\modularlambdatau@{\\tau}\nWill be translated to: ModularLambda[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/23.15#E6\nMathematica:  https://reference.wolfram.com/language/ref/ModularLambda.html",
          "k" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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" : "ModularLambda[\\[Tau]]",
          "rhs" : "(k)^(2)*(\\[Tau])",
          "testExpression" : "(ModularLambda[\\[Tau]])-((k)^(2)*(\\[Tau]))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\modularlambdatau [\\modularlambdatau]"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\modularlambdatau [\\modularlambdatau]"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 2,
    "sentence" : 0,
    "word" : 12
  } ],
  "includes" : [ "\\tau", "\\lambda(\\tau)", "\\lambda" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "square of the Jacobi modulus",
    "score" : 0.7125985104912714
  } ]
}

Specify your own input