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 Q_n(x;\alpha,\beta,N)= {}_3F_2(-n,-x,n+\alpha+\beta+1;\alpha+1,-N+1;1).}

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

Semantic latex: Q_n(x;\alpha,\beta,N)= {}_3F_2(-n,-x,n+\alpha+\beta+1;\alpha+1,-N+1;1)

Confidence: 0

Mathematica

Translation: Subscript[Q, n][x ; \[Alpha], \[Beta], N] == Subscript[, 3]*Subscript[F, 2][- n , - x , n + \[Alpha]+ \[Beta]+ 1 ; \[Alpha]+ 1 , - N + 1 ; 1]

Information

Sub Equations

  • Subscript[Q, n][x ; \[Alpha], \[Beta], N] = Subscript[, 3]*Subscript[F, 2][- n , - x , n + \[Alpha]+ \[Beta]+ 1 ; \[Alpha]+ 1 , - N + 1 ; 1]

Free variables

  • N
  • \[Alpha]
  • \[Beta]
  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{Q}_{n}')(x ; Symbol('alpha'), Symbol('beta'), N) == Symbol('{}_{3}')*Symbol('{F}_{2}')(- n , - x , n + Symbol('alpha')+ Symbol('beta')+ 1 ; Symbol('alpha')+ 1 , - N + 1 ; 1)

Information

Sub Equations

  • Symbol('{Q}_{n}')(x ; Symbol('alpha'), Symbol('beta'), N) = Symbol('{}_{3}')*Symbol('{F}_{2}')(- n , - x , n + Symbol('alpha')+ Symbol('beta')+ 1 ; Symbol('alpha')+ 1 , - N + 1 ; 1)

Free variables

  • N
  • Symbol('alpha')
  • Symbol('beta')
  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

Maple

Translation: Q[n](x ; alpha , beta , N) = [3]*F[2](- n , - x , n + alpha + beta + 1 ; alpha + 1 , - N + 1 ; 1)

Information

Sub Equations

  • Q[n](x ; alpha , beta , N) = [3]*F[2](- n , - x , n + alpha + beta + 1 ; alpha + 1 , - N + 1 ; 1)

Free variables

  • N
  • alpha
  • beta
  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

  • Failed to parse (syntax error): {\displaystyle + 1}{1}}

Description

  • Formula
  • link
  • Gold ID

Complete translation information:

{
  "id" : "FORMULA_9bdd99f0399c64cd90fa016b3f9e0ad9",
  "formula" : "Q_n(x;\\alpha,\\beta,N)= {}_3F_2(-n,-x,n+\\alpha+\\beta+1;\\alpha+1,-N+1;1)",
  "semanticFormula" : "Q_n(x;\\alpha,\\beta,N)= {}_3F_2(-n,-x,n+\\alpha+\\beta+1;\\alpha+1,-N+1;1)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[Q, n][x ; \\[Alpha], \\[Beta], N] == Subscript[, 3]*Subscript[F, 2][- n , - x , n + \\[Alpha]+ \\[Beta]+ 1 ; \\[Alpha]+ 1 , - N + 1 ; 1]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[Q, n][x ; \\[Alpha], \\[Beta], N] = Subscript[, 3]*Subscript[F, 2][- n , - x , n + \\[Alpha]+ \\[Beta]+ 1 ; \\[Alpha]+ 1 , - N + 1 ; 1]" ],
        "freeVariables" : [ "N", "\\[Alpha]", "\\[Beta]", "n", "x" ],
        "tokenTranslations" : {
          "Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "F" : "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('{Q}_{n}')(x ; Symbol('alpha'), Symbol('beta'), N) == Symbol('{}_{3}')*Symbol('{F}_{2}')(- n , - x , n + Symbol('alpha')+ Symbol('beta')+ 1 ; Symbol('alpha')+ 1 , - N + 1 ; 1)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{Q}_{n}')(x ; Symbol('alpha'), Symbol('beta'), N) = Symbol('{}_{3}')*Symbol('{F}_{2}')(- n , - x , n + Symbol('alpha')+ Symbol('beta')+ 1 ; Symbol('alpha')+ 1 , - N + 1 ; 1)" ],
        "freeVariables" : [ "N", "Symbol('alpha')", "Symbol('beta')", "n", "x" ],
        "tokenTranslations" : {
          "Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "F" : "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" : "Q[n](x ; alpha , beta , N) = [3]*F[2](- n , - x , n + alpha + beta + 1 ; alpha + 1 , - N + 1 ; 1)",
      "translationInformation" : {
        "subEquations" : [ "Q[n](x ; alpha , beta , N) = [3]*F[2](- n , - x , n + alpha + beta + 1 ; alpha + 1 , - N + 1 ; 1)" ],
        "freeVariables" : [ "N", "alpha", "beta", "n", "x" ],
        "tokenTranslations" : {
          "Q" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "F" : "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" : 1,
    "sentence" : 0,
    "word" : 8
  } ],
  "includes" : [ "+1", "+1;1)", "+ 1}{", "+ 1 , -", "+ 1}{1}" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "Formula",
    "score" : 0.7125985104912714
  }, {
    "definition" : "link",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Gold ID",
    "score" : 0.6460746792928004
  } ]
}

Specify your own input