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(1-s,\overline{\chi})=\frac{i^ak^{1/2}}{\tau(\chi)}\Lambda(s,\chi),}

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

Semantic latex: \Lambda(1 - s , \Dirichletchar@{n}{k}) = \frac{\iunit^a k^{1/2}}{\tau(\Dirichletchar@{n}{k})} \Lambda(s , \Dirichletchar@{n}{k})

Confidence: 0.52121378887832

Mathematica

Translation: \[CapitalLambda][1 - s , DirichletCharacter[1, k, n]] == Divide[(I)^(a)* (k)^(1/2),\[Tau][DirichletCharacter[1, k, n]]]*\[CapitalLambda][s , DirichletCharacter[1, k, n]]

Information

Sub Equations

  • \[CapitalLambda][1 - s , DirichletCharacter[1, k, n]] = Divide[(I)^(a)* (k)^(1/2),\[Tau][DirichletCharacter[1, k, n]]]*\[CapitalLambda][s , DirichletCharacter[1, k, n]]

Free variables

  • \[CapitalLambda]
  • \[Tau]
  • a
  • k
  • n
  • s

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Imaginary unit was translated to: I
  • Dirichlet character; Example: \Dirichletchar@@{n}{k}

Will be translated to: DirichletCharacter[1, $1, $0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/27.8 Mathematica: https://reference.wolfram.com/language/ref/DirichletCharacter.html

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

Tests

Symbolic

Test expression: (\[CapitalLambda]*(1 - s , DirichletCharacter[1, k, n]))-(Divide[(I)^(a)* (k)^(1/2),\[Tau]*(DirichletCharacter[1, k, n])]*\[CapitalLambda]*(s , DirichletCharacter[1, k, n]))

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

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Complete translation information:

{
  "id" : "FORMULA_891bece57edc5d3a8c3b8ec8f74cbbce",
  "formula" : "\\Lambda(1-s,\\overline{\\chi})=\\frac{i^a k^{1/2}}{\\tau(\\chi)}\\Lambda(s,\\chi)",
  "semanticFormula" : "\\Lambda(1 - s , \\Dirichletchar@{n}{k}) = \\frac{\\iunit^a k^{1/2}}{\\tau(\\Dirichletchar@{n}{k})} \\Lambda(s , \\Dirichletchar@{n}{k})",
  "confidence" : 0.5212137888783196,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[CapitalLambda][1 - s , DirichletCharacter[1, k, n]] == Divide[(I)^(a)* (k)^(1/2),\\[Tau][DirichletCharacter[1, k, n]]]*\\[CapitalLambda][s , DirichletCharacter[1, k, n]]",
      "translationInformation" : {
        "subEquations" : [ "\\[CapitalLambda][1 - s , DirichletCharacter[1, k, n]] = Divide[(I)^(a)* (k)^(1/2),\\[Tau][DirichletCharacter[1, k, n]]]*\\[CapitalLambda][s , DirichletCharacter[1, k, n]]" ],
        "freeVariables" : [ "\\[CapitalLambda]", "\\[Tau]", "a", "k", "n", "s" ],
        "tokenTranslations" : {
          "\\Lambda" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\Dirichletchar" : "Dirichlet character; Example: \\Dirichletchar@@{n}{k}\nWill be translated to: DirichletCharacter[1, $1, $0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/27.8\nMathematica:  https://reference.wolfram.com/language/ref/DirichletCharacter.html",
          "\\tau" : "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" : "\\[CapitalLambda]*(1 - s , DirichletCharacter[1, k, n])",
          "rhs" : "Divide[(I)^(a)* (k)^(1/2),\\[Tau]*(DirichletCharacter[1, k, n])]*\\[CapitalLambda]*(s , DirichletCharacter[1, k, n])",
          "testExpression" : "(\\[CapitalLambda]*(1 - s , DirichletCharacter[1, k, n]))-(Divide[(I)^(a)* (k)^(1/2),\\[Tau]*(DirichletCharacter[1, k, n])]*\\[CapitalLambda]*(s , DirichletCharacter[1, k, n]))",
          "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: \\Dirichletchar [\\Dirichletchar]"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) No translation possible for given token: Cannot extract information from feature set: \\Dirichletchar [\\Dirichletchar]"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "a", "\\chi", "\\tau(\\chi)", "s", "\\zeta(s,q)", "L(s, \\chi)", "L(s,\\chi)", "k" ],
  "isPartOf" : [ ],
  "definiens" : [ ]
}

Specify your own input