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 \,\Phi(e^{2\pi i\lambda}, s,\alpha)=L(\lambda, \alpha,s).}

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

Semantic latex: \Phi(\expe^{2 \cpi \iunit \lambda} , s , \alpha) = L(\lambda , \alpha , s)

Confidence: 0

Mathematica

Translation: \[CapitalPhi][Exp[2*Pi*I*\[Lambda]], s , \[Alpha]] == L[\[Lambda], \[Alpha], s]

Information

Sub Equations

  • \[CapitalPhi][Exp[2*Pi*I*\[Lambda]], s , \[Alpha]] = L[\[Lambda], \[Alpha], s]

Free variables

  • \[Alpha]
  • \[CapitalPhi]
  • \[Lambda]
  • s

Symbol info

  • Pi was translated to: Pi
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

  • Imaginary unit was translated to: I
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic

Test expression: (\[CapitalPhi]*(Exp[2*Pi*I*\[Lambda]], s , \[Alpha]))-(L*(\[Lambda], \[Alpha], s))

ERROR:

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

SymPy

Translation: Symbol('Phi')(exp(2*pi*I*Symbol('lambda')), s , Symbol('alpha')) == L(Symbol('lambda'), Symbol('alpha'), s)

Information

Sub Equations

  • Symbol('Phi')(exp(2*pi*I*Symbol('lambda')), s , Symbol('alpha')) = L(Symbol('lambda'), Symbol('alpha'), s)

Free variables

  • Symbol('Phi')
  • Symbol('alpha')
  • Symbol('lambda')
  • s

Symbol info

  • Pi was translated to: pi
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

  • Imaginary unit was translated to: I
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: Phi(exp(2*Pi*I*lambda), s , alpha) = L(lambda , alpha , s)

Information

Sub Equations

  • Phi(exp(2*Pi*I*lambda), s , alpha) = L(lambda , alpha , s)

Free variables

  • Phi
  • alpha
  • lambda
  • s

Symbol info

  • Pi was translated to: Pi
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

  • Imaginary unit was translated to: I
  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_1b1ca6b821f52e2304f313603a7672a1",
  "formula" : "\\Phi(e^{2\\pi i\\lambda}, s,\\alpha)=L(\\lambda, \\alpha,s)",
  "semanticFormula" : "\\Phi(\\expe^{2 \\cpi \\iunit \\lambda} , s , \\alpha) = L(\\lambda , \\alpha , s)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "\\[CapitalPhi][Exp[2*Pi*I*\\[Lambda]], s , \\[Alpha]] == L[\\[Lambda], \\[Alpha], s]",
      "translationInformation" : {
        "subEquations" : [ "\\[CapitalPhi][Exp[2*Pi*I*\\[Lambda]], s , \\[Alpha]] = L[\\[Lambda], \\[Alpha], s]" ],
        "freeVariables" : [ "\\[Alpha]", "\\[CapitalPhi]", "\\[Lambda]", "s" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi",
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\Phi" : "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" : "\\[CapitalPhi]*(Exp[2*Pi*I*\\[Lambda]], s , \\[Alpha])",
          "rhs" : "L*(\\[Lambda], \\[Alpha], s)",
          "testExpression" : "(\\[CapitalPhi]*(Exp[2*Pi*I*\\[Lambda]], s , \\[Alpha]))-(L*(\\[Lambda], \\[Alpha], s))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('Phi')(exp(2*pi*I*Symbol('lambda')), s , Symbol('alpha')) == L(Symbol('lambda'), Symbol('alpha'), s)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('Phi')(exp(2*pi*I*Symbol('lambda')), s , Symbol('alpha')) = L(Symbol('lambda'), Symbol('alpha'), s)" ],
        "freeVariables" : [ "Symbol('Phi')", "Symbol('alpha')", "Symbol('lambda')", "s" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: pi",
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "Phi(exp(2*Pi*I*lambda), s , alpha) = L(lambda , alpha , s)",
      "translationInformation" : {
        "subEquations" : [ "Phi(exp(2*Pi*I*lambda), s , alpha) = L(lambda , alpha , s)" ],
        "freeVariables" : [ "Phi", "alpha", "lambda", "s" ],
        "tokenTranslations" : {
          "\\cpi" : "Pi was translated to: Pi",
          "L" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "\\iunit" : "Imaginary unit was translated to: I",
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\lambda", "\\Phi(z,s,a)", "L(\\lambda, \\alpha, s)", "\\,\\Phi(e^{2\\pi i\\lambda}, s,\\alpha)=L(\\lambda, \\alpha,s)", "s" ],
  "isPartOf" : [ "\\,\\Phi(e^{2\\pi i\\lambda}, s,\\alpha)=L(\\lambda, \\alpha,s)" ],
  "definiens" : [ ]
}

Specify your own input