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 l_2}

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

Semantic latex: l_2

Confidence: 0

Mathematica

Translation: Subscript[l, 2]

Information

Sub Equations

  • Subscript[l, 2]

Free variables

  • Subscript[l, 2]

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{l}_{2}')

Information

Sub Equations

  • Symbol('{l}_{2}')

Free variables

  • Symbol('{l}_{2}')

Tests

Symbolic
Numeric

Maple

Translation: l[2]

Information

Sub Equations

  • l[2]

Free variables

  • l[2]

Tests

Symbolic
Numeric

Dependency Graph Information

Is part of

Description

  • integral of the product
  • spherical harmonic
  • integer
  • jm symbol
  • symbol
  • Wigner function
  • better approximation
  • Legendre polynomial
  • Regge symmetry

Complete translation information:

{
  "id" : "FORMULA_fbf668c989f4c01f256df9948afadf24",
  "formula" : "l_2",
  "semanticFormula" : "l_2",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[l, 2]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[l, 2]" ],
        "freeVariables" : [ "Subscript[l, 2]" ]
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('{l}_{2}')",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{l}_{2}')" ],
        "freeVariables" : [ "Symbol('{l}_{2}')" ]
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "l[2]",
      "translationInformation" : {
        "subEquations" : [ "l[2]" ],
        "freeVariables" : [ "l[2]" ]
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ {
    "section" : 6,
    "sentence" : 0,
    "word" : 21
  } ],
  "includes" : [ ],
  "isPartOf" : [ "\\begin{align}& \\int Y_{l_1 m_1}(\\theta, \\varphi) Y_{l_2 m_2}(\\theta, \\varphi) Y_{l_3 m_3}(\\theta, \\varphi)\\,\\sin\\theta\\,\\mathrm{d}\\theta\\,\\mathrm{d}\\varphi \\\\&\\quad = \\sqrt{\\frac{(2l_1 + 1)(2l_2 + 1)(2l_3 + 1)}{4\\pi}}\\begin{pmatrix}  l_1 & l_2 & l_3 \\\\  0 & 0 & 0\\end{pmatrix}\\begin{pmatrix}  l_1 & l_2 & l_3\\\\  m_1 & m_2 & m_3\\end{pmatrix}\\end{align}", "\\begin{align}& {-}\\sqrt{(l_3 \\mp s_3)(l_3 \\pm s_3 + 1)} \\begin{pmatrix}  l_1 & l_2 & l_3 \\\\  s_1 & s_2 & s_3 \\pm 1\\end{pmatrix}= \\\\&\\quad = \\sqrt{(l_1 \\mp s_1)(l_1 \\pm s_1 + 1)} \\begin{pmatrix}  l_1 & l_2 & l_3 \\\\  s_1 \\pm 1 & s_2 & s_3\\end{pmatrix}+ \\sqrt{(l_2 \\mp s_2)(l_2 \\pm s_2 + 1)} \\begin{pmatrix}  l_1 & l_2 & l_3 \\\\  s_1 & s_2 \\pm 1 & s_3\\end{pmatrix}.\\end{align}", "l_1 \\ll l_2, l_3", "\\begin{pmatrix}  l_1 & l_2 & l_3\\\\  m_1 & m_2 & m_3\\end{pmatrix} \\approx (-1)^{l_3+m_3} \\frac{d^{l_1}_{m_1, l_3 - l_2}(\\theta)}{\\sqrt{2l_3 + 1}}", "\\begin{pmatrix}  l_1 & l_2 & l_3\\\\  m_1 & m_2 & m_3\\end{pmatrix} \\approx (-1)^{l_3+m_3} \\frac{ d^{l_1}_{m_1, l_3-l_2}(\\theta)}{\\sqrt{l_2+l_3+1}}", "\\cos(\\theta) = (m_2 - m_3)/(l_2 + l_3 + 1)", "\\frac{1}{2} \\int_{-1}^1 P_{l_1}(x) P_{l_2}(x) P_{l}(x) \\, dx = \\begin{pmatrix}  l & l_1 & l_2 \\\\  0 & 0 & 0\\end{pmatrix}^2" ],
  "definiens" : [ {
    "definition" : "integral of the product",
    "score" : 0.7125985104912714
  }, {
    "definition" : "spherical harmonic",
    "score" : 0.7125985104912714
  }, {
    "definition" : "integer",
    "score" : 0.6460746792928004
  }, {
    "definition" : "jm symbol",
    "score" : 0.5988174995334326
  }, {
    "definition" : "symbol",
    "score" : 0.4690549350834092
  }, {
    "definition" : "Wigner function",
    "score" : 0.4690549350834092
  }, {
    "definition" : "better approximation",
    "score" : 0.3922320700151146
  }, {
    "definition" : "Legendre polynomial",
    "score" : 0.36946048965793815
  }, {
    "definition" : "Regge symmetry",
    "score" : 0.3051409499247395
  } ]
}

Specify your own input