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 \,\zeta(s)=\Phi (1,s,1).}

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

Semantic latex: \Riemannzeta@{s} = \Phi(1 , s , 1)

Confidence: 0.67147715490595

Mathematica

Translation: Zeta[s] == \[CapitalPhi][1 , s , 1]

Information

Sub Equations

  • Zeta[s] = \[CapitalPhi][1 , s , 1]

Free variables

  • \[CapitalPhi]
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Riemann zeta function; Example: \Riemannzeta@{s}

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

Tests

Symbolic

Test expression: (Zeta[s])-(\[CapitalPhi]*(1 , s , 1))

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: \Riemannzeta [\Riemannzeta]

Tests

Symbolic
Numeric

Maple

Translation: Zeta(s) = Phi(1 , s , 1)

Information

Sub Equations

  • Zeta(s) = Phi(1 , s , 1)

Free variables

  • Phi
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Riemann zeta function; Example: \Riemannzeta@{s}

Will be translated to: Zeta($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/25.2#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Zeta

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_9f644449d757460365fd54d1aa03476c",
  "formula" : "\\zeta(s)=\\Phi (1,s,1)",
  "semanticFormula" : "\\Riemannzeta@{s} = \\Phi(1 , s , 1)",
  "confidence" : 0.671477154905952,
  "translations" : {
    "Mathematica" : {
      "translation" : "Zeta[s] == \\[CapitalPhi][1 , s , 1]",
      "translationInformation" : {
        "subEquations" : [ "Zeta[s] = \\[CapitalPhi][1 , s , 1]" ],
        "freeVariables" : [ "\\[CapitalPhi]", "s" ],
        "tokenTranslations" : {
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\Riemannzeta" : "Riemann zeta function; Example: \\Riemannzeta@{s}\nWill be translated to: Zeta[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/25.2#E1\nMathematica:  https://reference.wolfram.com/language/ref/Zeta.html"
        }
      },
      "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" : "Zeta[s]",
          "rhs" : "\\[CapitalPhi]*(1 , s , 1)",
          "testExpression" : "(Zeta[s])-(\\[CapitalPhi]*(1 , s , 1))",
          "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: \\Riemannzeta [\\Riemannzeta]"
        }
      }
    },
    "Maple" : {
      "translation" : "Zeta(s) = Phi(1 , s , 1)",
      "translationInformation" : {
        "subEquations" : [ "Zeta(s) = Phi(1 , s , 1)" ],
        "freeVariables" : [ "Phi", "s" ],
        "tokenTranslations" : {
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\Riemannzeta" : "Riemann zeta function; Example: \\Riemannzeta@{s}\nWill be translated to: Zeta($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/25.2#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Zeta"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\Phi(z,s,a)", "s", "\\,\\zeta(s)=\\Phi (1,s,1)" ],
  "isPartOf" : [ "\\,\\zeta(s)=\\Phi (1,s,1)" ],
  "definiens" : [ ]
}

Specify your own input