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 \sum_{j_3} (2j_3+1) \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6 \end{Bmatrix} \begin{Bmatrix} j_1 & j_2 & j_3\\ j_4 & j_5 & j_6' \end{Bmatrix} = \frac{\delta_{j_6^{}j_6'}}{2j_6+1} \begin{Bmatrix} j_1 & j_5 & j_6 \end{Bmatrix} \begin{Bmatrix} j_4 & j_2 & j_6 \end{Bmatrix}. }

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

Semantic latex: \sum_{j_3}(2 j_3 + 1) \Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6'} = \frac{\delta_{j_6^{}j_6'}}{2j_6+1} \begin{Bmatrix} j_1 & j_5 & j_6 \end{Bmatrix} \begin{Bmatrix} j_4 & j_2 & j_6 \end{Bmatrix}

Confidence: 0.68720618419147

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places.

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_01913e840e5d7f0a907a40bfd9827023",
  "formula" : "\\sum_{j_3} (2j_3+1)\n \\begin{Bmatrix}\n    j_1 & j_2 & j_3\\\\\n    j_4 & j_5 & j_6\n \\end{Bmatrix}\n \\begin{Bmatrix}\n    j_1 & j_2 & j_3\\\\\n    j_4 & j_5 & j_6'\n \\end{Bmatrix}\n  = \\frac{\\delta_{j_6^{}j_6'}}{2j_6+1} \\begin{Bmatrix} j_1 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_2 & j_6 \\end{Bmatrix}",
  "semanticFormula" : "\\sum_{j_3}(2 j_3 + 1) \\Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6} \\Wignersixjsym{j_1}{j_2}{j_3}{j_4}{j_5}{j_6'} = \\frac{\\delta_{j_6^{}j_6'}}{2j_6+1} \\begin{Bmatrix} j_1 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_2 & j_6 \\end{Bmatrix}",
  "confidence" : 0.687206184191471,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Primes can only be translated behind semantic macros (differentiation primes) but not in other places."
        }
      },
      "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) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
        }
      },
      "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) No translation possible for given token: Cannot extract information from feature set: \\Wignersixjsym [\\Wignersixjsym]"
        }
      },
      "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" : [ "\\sum_{j_3} (2j_3+1) \\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6' \\end{Bmatrix}  = \\frac{\\delta_{j_6^{}j_6'}}{2j_6+1} \\begin{Bmatrix} j_1 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_2 & j_6 \\end{Bmatrix}", "j_{3}", "j", "\\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6 \\end{Bmatrix}" ],
  "isPartOf" : [ "\\sum_{j_3} (2j_3+1) \\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix}    j_1 & j_2 & j_3\\\\    j_4 & j_5 & j_6' \\end{Bmatrix}  = \\frac{\\delta_{j_6^{}j_6'}}{2j_6+1} \\begin{Bmatrix} j_1 & j_5 & j_6 \\end{Bmatrix} \\begin{Bmatrix} j_4 & j_2 & j_6 \\end{Bmatrix}" ],
  "definiens" : [ ]
}

Specify your own input