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

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

Semantic latex: \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}

Confidence: 0

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_344eb24e15f951c06ade87ab88b2d89a",
  "formula" : "\\begin{align}\n& {-}\\sqrt{(l_3 \\mp s_3)(l_3 \\pm s_3 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 & s_2 & s_3 \\pm 1\n\\end{pmatrix}=\n \\\\\n&\\quad = \\sqrt{(l_1 \\mp s_1)(l_1 \\pm s_1 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 \\pm 1 & s_2 & s_3\n\\end{pmatrix}\n+ \\sqrt{(l_2 \\mp s_2)(l_2 \\pm s_2 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 & s_2 \\pm 1 & s_3\n\\end{pmatrix}.\n\\end{align}",
  "semanticFormula" : "\\begin{align}\n& {-}\\sqrt{(l_3 \\mp s_3)(l_3 \\pm s_3 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 & s_2 & s_3 \\pm 1\n\\end{pmatrix}=\n \\\\\n&\\quad = \\sqrt{(l_1 \\mp s_1)(l_1 \\pm s_1 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 \\pm 1 & s_2 & s_3\n\\end{pmatrix}\n+ \\sqrt{(l_2 \\mp s_2)(l_2 \\pm s_2 + 1)} \n\\begin{pmatrix}\n  l_1 & l_2 & l_3 \\\\\n  s_1 & s_2 \\pm 1 & s_3\n\\end{pmatrix}.\n\\end{align}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) An unknown or missing element occurred: Reached unknown or not yet supported expression tag: matrix"
        }
      },
      "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" : [ ],
  "includes" : [ "l_3", "l_2", "l_1" ],
  "isPartOf" : [ "\\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}" ],
  "definiens" : [ ]
}

Specify your own input