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 P_i = \left(x_i,\, y_i\right),\ i = 1,\, 2,\, 3,\, 4,\,}

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

Semantic latex: P_i =(x_i , y_i) , i = 1 , 2 , 3 , 4

Confidence: 0

Mathematica

Translation: Subscript[P, i] == (Subscript[x, i], Subscript[y, i]) i == 1 , 2 , 3 , 4

Information

Free variables

  • Subscript[P, i]
  • Subscript[x, i]
  • Subscript[y, i]
  • i

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Mathematica uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{P}_{i}') == (Symbol('{x}_{i}'), Symbol('{y}_{i}')) i == 1 , 2 , 3 , 4

Information

Free variables

  • Symbol('{P}_{i}')
  • Symbol('{x}_{i}')
  • Symbol('{y}_{i}')
  • i

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that SymPy uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

Maple

Translation: P[i] = (x[i], y[i]); i = 1 , 2 , 3 , 4

Information

Free variables

  • P[i]
  • i
  • x[i]
  • y[i]

Symbol info

  • You use a typical letter for a constant [the imaginary unit == the principal square root of -1].

We keep it like it is! But you should know that Maple uses I for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \iunit

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_e3cadaccea01e05fc9e9e1059ba8f293",
  "formula" : "P_i = \\left(x_i, y_i\\right),i = 1, 2, 3, 4",
  "semanticFormula" : "P_i =(x_i , y_i) , i = 1 , 2 , 3 , 4",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[P, i] == (Subscript[x, i], Subscript[y, i])\n i == 1 , 2 , 3 , 4",
      "translationInformation" : {
        "freeVariables" : [ "Subscript[P, i]", "Subscript[x, i]", "Subscript[y, i]", "i" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Mathematica uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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('{P}_{i}') == (Symbol('{x}_{i}'), Symbol('{y}_{i}'))\n i == 1 , 2 , 3 , 4",
      "translationInformation" : {
        "freeVariables" : [ "Symbol('{P}_{i}')", "Symbol('{x}_{i}')", "Symbol('{y}_{i}')", "i" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that SymPy uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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" : "P[i] = (x[i], y[i]); i = 1 , 2 , 3 , 4",
      "translationInformation" : {
        "freeVariables" : [ "P[i]", "i", "x[i]", "y[i]" ],
        "tokenTranslations" : {
          "i" : "You use a typical letter for a constant [the imaginary unit == the principal square root of -1].\nWe keep it like it is! But you should know that Maple uses I for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\iunit\n"
        }
      },
      "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" : [ "P_i = \\left(x_i,\\, y_i\\right),\\ i = 1,\\, 2,\\, 3,\\, 4,", "= 1", "P_i = \\left(x_i,\\, y_i\\right)", "y", "P", "P_i = \\left(x_i,\\, y_i\\right),\\ i = 1,\\, 2,\\, 3,\\, 4", "x" ],
  "isPartOf" : [ "P_i = \\left(x_i,\\, y_i\\right),\\ i = 1,\\, 2,\\, 3,\\, 4,", "P_i = \\left(x_i,\\, y_i\\right),\\ i = 1,\\, 2,\\, 3,\\, 4" ],
  "definiens" : [ ]
}

Specify your own input