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 \mathcal{K}_2(x; n) = 2x^2 - 2nx + {n\choose 2}}

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

Semantic latex: \mathcal{K}_2(x; n) = 2x^2 - 2nx + {n\choose 2}

Confidence: 0

Mathematica

Translation: Subscript[K, 2][x ; n] == 2*(x)^(2)- 2*n*x +Binomial[n,2]

Information

Sub Equations

  • Subscript[K, 2][x ; n] = 2*(x)^(2)- 2*n*x +Binomial[n,2]

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{K}_{2}')(x ; n) == 2*(x)**(2)- 2*n*x +binomial(n,2)

Information

Sub Equations

  • Symbol('{K}_{2}')(x ; n) = 2*(x)**(2)- 2*n*x +binomial(n,2)

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: K[2](x ; n) = 2*(x)^(2)- 2*n*x +binomial(n,2)

Information

Sub Equations

  • K[2](x ; n) = 2*(x)^(2)- 2*n*x +binomial(n,2)

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • first few polynomial

Complete translation information:

{
  "id" : "FORMULA_f4b7ba31162be204fa60e20f6b46ce0d",
  "formula" : "\\mathcal{K}_2(x; n) = 2x^2 - 2nx + {n\\choose 2}",
  "semanticFormula" : "\\mathcal{K}_2(x; n) = 2x^2 - 2nx + {n\\choose 2}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[K, 2][x ; n] == 2*(x)^(2)- 2*n*x +Binomial[n,2]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[K, 2][x ; n] = 2*(x)^(2)- 2*n*x +Binomial[n,2]" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('{K}_{2}')(x ; n) == 2*(x)**(2)- 2*n*x +binomial(n,2)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{K}_{2}')(x ; n) = 2*(x)**(2)- 2*n*x +binomial(n,2)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "K[2](x ; n) = 2*(x)^(2)- 2*n*x +binomial(n,2)",
      "translationInformation" : {
        "subEquations" : [ "K[2](x ; n) = 2*(x)^(2)- 2*n*x +binomial(n,2)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "K" : "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ {
    "section" : 0,
    "sentence" : 1,
    "word" : 10
  } ],
  "includes" : [ "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "first few polynomial",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input