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 \Phi_{n+1}(z)=z\Phi_n(z)-\overline\alpha_n\Phi_n^*(z)}

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

Semantic latex: \Phi_{n+1}(z) = z \Phi_n(z) - \conj{\alpha}

Confidence: 0.78713822532466

Mathematica

Translation: Subscript[\[CapitalPhi], n + 1][z] == z*Subscript[\[CapitalPhi], n][z]- Conjugate[\[Alpha]]

Information

Sub Equations

  • Subscript[\[CapitalPhi], n + 1][z] = z*Subscript[\[CapitalPhi], n][z]- Conjugate[\[Alpha]]

Free variables

  • Subscript[\[CapitalPhi], n + 1]
  • Subscript[\[CapitalPhi], n]
  • \[Alpha]
  • n
  • z

Symbol info

  • 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).
  • Conjugate complex number; Example: \conj{z}

Will be translated to: Conjugate[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E11 Mathematica: https://reference.wolfram.com/language/ref/Conjugate.html

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: Phi[n + 1](z) = z*Phi[n](z)- conjugate(alpha)

Information

Sub Equations

  • Phi[n + 1](z) = z*Phi[n](z)- conjugate(alpha)

Free variables

  • Phi[n + 1]
  • Phi[n]
  • alpha
  • n
  • z

Symbol info

  • 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).
  • Conjugate complex number; Example: \conj{z}

Will be translated to: conjugate($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.9#E11 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=conjugate

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • polynomial
  • coefficient
  • complex number with absolute value
  • Szegő 's recurrence
  • Verblunsky coefficient

Complete translation information:

{
  "id" : "FORMULA_ae75280cde2032160f44943bd80b1862",
  "formula" : "\\Phi_{n+1}(z)=z\\Phi_n(z)-\\overline\\alpha_n\\Phi_n^*(z)",
  "semanticFormula" : "\\Phi_{n+1}(z) = z \\Phi_n(z) - \\conj{\\alpha}",
  "confidence" : 0.7871382253246626,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[\\[CapitalPhi], n + 1][z] == z*Subscript[\\[CapitalPhi], n][z]- Conjugate[\\[Alpha]]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[\\[CapitalPhi], n + 1][z] = z*Subscript[\\[CapitalPhi], n][z]- Conjugate[\\[Alpha]]" ],
        "freeVariables" : [ "Subscript[\\[CapitalPhi], n + 1]", "Subscript[\\[CapitalPhi], n]", "\\[Alpha]", "n", "z" ],
        "tokenTranslations" : {
          "\\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",
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\conj" : "Conjugate complex number; Example: \\conj{z}\nWill be translated to: Conjugate[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/1.9#E11\nMathematica:  https://reference.wolfram.com/language/ref/Conjugate.html"
        }
      },
      "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: \\conj [\\conj]"
        }
      },
      "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" : "Phi[n + 1](z) = z*Phi[n](z)- conjugate(alpha)",
      "translationInformation" : {
        "subEquations" : [ "Phi[n + 1](z) = z*Phi[n](z)- conjugate(alpha)" ],
        "freeVariables" : [ "Phi[n + 1]", "Phi[n]", "alpha", "n", "z" ],
        "tokenTranslations" : {
          "\\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",
          "\\Phi" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\conj" : "Conjugate complex number; Example: \\conj{z}\nWill be translated to: conjugate($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/1.9#E11\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=conjugate"
        }
      },
      "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" : 2,
    "sentence" : 0,
    "word" : 6
  } ],
  "includes" : [ "\\Phi_n(z)", "\\alpha_n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "polynomial",
    "score" : 0.7125985104912714
  }, {
    "definition" : "coefficient",
    "score" : 0.6859086196238077
  }, {
    "definition" : "complex number with absolute value",
    "score" : 0.6859086196238077
  }, {
    "definition" : "Szegő 's recurrence",
    "score" : 0.5988174995334326
  }, {
    "definition" : "Verblunsky coefficient",
    "score" : 0.5500952380952381
  } ]
}

Specify your own input