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_n^{(\alpha,\beta)}=\lim_{t\to\infty}t^{-n}p_n\left(\tfrac12xt; \tfrac12(\alpha+1-it), \tfrac12(\beta+1+it), \tfrac12(\alpha+1+it), \tfrac12(\beta+1-it)\right)}

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

Semantic latex: P_n^{(\alpha,\beta)} = \lim_{t\to\infty} t^{-n} p_n(\tfrac12 xt ; \tfrac12(\alpha + 1 - \iunit t) , \tfrac12(\beta + 1 + \iunit t) , \tfrac12(\alpha + 1 + \iunit t) , \tfrac12(\beta + 1 - \iunit t))

Confidence: 0

Mathematica

Translation: (Subscript[P, n])^(\[Alpha], \[Beta]) == Limit[(t)^(- n)* Subscript[p, n][Divide[1,2]*x*t ;Divide[1,2]*(\[Alpha]+ 1 - I*t),Divide[1,2]*(\[Beta]+ 1 + I*t),Divide[1,2]*(\[Alpha]+ 1 + I*t),Divide[1,2]*(\[Beta]+ 1 - I*t)], t -> Infinity, GenerateConditions->None]

Information

Sub Equations

  • (Subscript[P, n])^(\[Alpha], \[Beta]) = Limit[(t)^(- n)* Subscript[p, n][Divide[1,2]*x*t ;Divide[1,2]*(\[Alpha]+ 1 - I*t),Divide[1,2]*(\[Beta]+ 1 + I*t),Divide[1,2]*(\[Alpha]+ 1 + I*t),Divide[1,2]*(\[Beta]+ 1 - I*t)], t -> Infinity, GenerateConditions->None]

Free variables

  • Subscript[P, 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.

  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

SymPy

Translation: (Symbol('{P}_{n}'))**(Symbol('alpha'), Symbol('beta')) == limit((t)**(- n)* Symbol('{p}_{n}')((1)/(2)*x*t ;(1)/(2)*(Symbol('alpha')+ 1 - I*t),(1)/(2)*(Symbol('beta')+ 1 + I*t),(1)/(2)*(Symbol('alpha')+ 1 + I*t),(1)/(2)*(Symbol('beta')+ 1 - I*t)), t, oo)

Information

Sub Equations

  • (Symbol('{P}_{n}'))**(Symbol('alpha'), Symbol('beta')) = limit((t)**(- n)* Symbol('{p}_{n}')((1)/(2)*x*t ;(1)/(2)*(Symbol('alpha')+ 1 - I*t),(1)/(2)*(Symbol('beta')+ 1 + I*t),(1)/(2)*(Symbol('alpha')+ 1 + I*t),(1)/(2)*(Symbol('beta')+ 1 - I*t)), t, oo)

Free variables

  • Symbol('alpha')
  • Symbol('beta')
  • Symbol('{P}_{n}')
  • 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.

  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Maple

Translation: (P[n])^(alpha , beta) = limit((t)^(- n)* p[n]((1)/(2)*x*t ;(1)/(2)*(alpha + 1 - I*t),(1)/(2)*(beta + 1 + I*t),(1)/(2)*(alpha + 1 + I*t),(1)/(2)*(beta + 1 - I*t)), t = infinity)

Information

Sub Equations

  • (P[n])^(alpha , beta) = limit((t)^(- n)* p[n]((1)/(2)*x*t ;(1)/(2)*(alpha + 1 - I*t),(1)/(2)*(beta + 1 + I*t),(1)/(2)*(alpha + 1 + I*t),(1)/(2)*(beta + 1 - I*t)), t = infinity)

Free variables

  • P[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.

  • Imaginary unit was translated to: I

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • alpha
  • beta
  • P_n
  • TeX Source
  • Formula
  • Gold ID
  • link
  • n
  • t
  • t \
  • tfrac12
  • tfrac12xt

Complete translation information:

{
  "id" : "FORMULA_ff971744100fef3b34b2c93b6adc3efb",
  "formula" : "P_n^{(\\alpha,\\beta)}=\\lim_{t\\to\\infty}t^{-n}p_n\\left(\\tfrac12xt; \\tfrac12(\\alpha+1-it), \\tfrac12(\\beta+1+it), \\tfrac12(\\alpha+1+it), \\tfrac12(\\beta+1-it)\\right)",
  "semanticFormula" : "P_n^{(\\alpha,\\beta)} = \\lim_{t\\to\\infty} t^{-n} p_n(\\tfrac12 xt ; \\tfrac12(\\alpha + 1 - \\iunit t) , \\tfrac12(\\beta + 1 + \\iunit t) , \\tfrac12(\\alpha + 1 + \\iunit t) , \\tfrac12(\\beta + 1 - \\iunit t))",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(Subscript[P, n])^(\\[Alpha], \\[Beta]) == Limit[(t)^(- n)* Subscript[p, n][Divide[1,2]*x*t ;Divide[1,2]*(\\[Alpha]+ 1 - I*t),Divide[1,2]*(\\[Beta]+ 1 + I*t),Divide[1,2]*(\\[Alpha]+ 1 + I*t),Divide[1,2]*(\\[Beta]+ 1 - I*t)], t -> Infinity, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "(Subscript[P, n])^(\\[Alpha], \\[Beta]) = Limit[(t)^(- n)* Subscript[p, n][Divide[1,2]*x*t ;Divide[1,2]*(\\[Alpha]+ 1 - I*t),Divide[1,2]*(\\[Beta]+ 1 + I*t),Divide[1,2]*(\\[Alpha]+ 1 + I*t),Divide[1,2]*(\\[Beta]+ 1 - I*t)], t -> Infinity, GenerateConditions->None]" ],
        "freeVariables" : [ "Subscript[P, n]", "\\[Alpha]", "\\[Beta]", "n", "x" ],
        "tokenTranslations" : {
          "p" : "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",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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}_{n}'))**(Symbol('alpha'), Symbol('beta')) == limit((t)**(- n)* Symbol('{p}_{n}')((1)/(2)*x*t ;(1)/(2)*(Symbol('alpha')+ 1 - I*t),(1)/(2)*(Symbol('beta')+ 1 + I*t),(1)/(2)*(Symbol('alpha')+ 1 + I*t),(1)/(2)*(Symbol('beta')+ 1 - I*t)), t, oo)",
      "translationInformation" : {
        "subEquations" : [ "(Symbol('{P}_{n}'))**(Symbol('alpha'), Symbol('beta')) = limit((t)**(- n)* Symbol('{p}_{n}')((1)/(2)*x*t ;(1)/(2)*(Symbol('alpha')+ 1 - I*t),(1)/(2)*(Symbol('beta')+ 1 + I*t),(1)/(2)*(Symbol('alpha')+ 1 + I*t),(1)/(2)*(Symbol('beta')+ 1 - I*t)), t, oo)" ],
        "freeVariables" : [ "Symbol('alpha')", "Symbol('beta')", "Symbol('{P}_{n}')", "n", "x" ],
        "tokenTranslations" : {
          "p" : "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",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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[n])^(alpha , beta) = limit((t)^(- n)* p[n]((1)/(2)*x*t ;(1)/(2)*(alpha + 1 - I*t),(1)/(2)*(beta + 1 + I*t),(1)/(2)*(alpha + 1 + I*t),(1)/(2)*(beta + 1 - I*t)), t = infinity)",
      "translationInformation" : {
        "subEquations" : [ "(P[n])^(alpha , beta) = limit((t)^(- n)* p[n]((1)/(2)*x*t ;(1)/(2)*(alpha + 1 - I*t),(1)/(2)*(beta + 1 + I*t),(1)/(2)*(alpha + 1 + I*t),(1)/(2)*(beta + 1 - I*t)), t = infinity)" ],
        "freeVariables" : [ "P[n]", "alpha", "beta", "n", "x" ],
        "tokenTranslations" : {
          "p" : "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",
          "\\iunit" : "Imaginary unit was translated to: I"
        }
      },
      "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 +" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "alpha",
    "score" : 0.8835270181497158
  }, {
    "definition" : "beta",
    "score" : 0.8835270181497158
  }, {
    "definition" : "P_n",
    "score" : 0.8144453757286602
  }, {
    "definition" : "TeX Source",
    "score" : 0.722
  }, {
    "definition" : "Formula",
    "score" : 0.657257825973014
  }, {
    "definition" : "Gold ID",
    "score" : 0.657257825973014
  }, {
    "definition" : "link",
    "score" : 0.657257825973014
  }, {
    "definition" : "n",
    "score" : 0.657257825973014
  }, {
    "definition" : "t",
    "score" : 0.657257825973014
  }, {
    "definition" : "t \\",
    "score" : 0.657257825973014
  }, {
    "definition" : "tfrac12",
    "score" : 0.657257825973014
  }, {
    "definition" : "tfrac12xt",
    "score" : 0.657257825973014
  } ]
}

Specify your own input