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 f(t+p) = f(t)}

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

Semantic latex: f(t+p) = f(t)

Confidence: 0

Mathematica

Translation: f[t + p] == f[t]

Information

Sub Equations

  • f[t + p] = f[t]

Free variables

  • p
  • t

Symbol info

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

Tests

Symbolic

Test expression: (f*(t + p))-(f*(t))

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

SymPy

Translation: f(t + p) == f(t)

Information

Sub Equations

  • f(t + p) = f(t)

Free variables

  • p
  • t

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: f(t + p) = f(t)

Information

Sub Equations

  • f(t + p) = f(t)

Free variables

  • p
  • t

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Description

  • t
  • TeX source
  • Formula
  • Gold ID
  • f
  • link
  • p

Complete translation information:

{
  "id" : "FORMULA_3a6745862e8f6ef2b93c343ad82b40c0",
  "formula" : "f(t+p) = f(t)",
  "semanticFormula" : "f(t+p) = f(t)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "f[t + p] == f[t]",
      "translationInformation" : {
        "subEquations" : [ "f[t + p] = f[t]" ],
        "freeVariables" : [ "p", "t" ],
        "tokenTranslations" : {
          "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" : "ERROR",
        "numberOfTests" : 1,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 1,
        "crashed" : false,
        "testCalculationsGroup" : [ {
          "lhs" : "f*(t + p)",
          "rhs" : "f*(t)",
          "testExpression" : "(f*(t + p))-(f*(t))",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "f(t + p) == f(t)",
      "translationInformation" : {
        "subEquations" : [ "f(t + p) = f(t)" ],
        "freeVariables" : [ "p", "t" ],
        "tokenTranslations" : {
          "f" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    },
    "Maple" : {
      "translation" : "f(t + p) = f(t)",
      "translationInformation" : {
        "subEquations" : [ "f(t + p) = f(t)" ],
        "freeVariables" : [ "p", "t" ],
        "tokenTranslations" : {
          "f" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      }
    }
  },
  "positions" : [ {
    "section" : 1,
    "sentence" : 0,
    "word" : 8
  } ],
  "includes" : [ ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "t",
    "score" : 0.7828725372816522
  }, {
    "definition" : "TeX source",
    "score" : 0.722
  }, {
    "definition" : "Formula",
    "score" : 0.6954080343007951
  }, {
    "definition" : "Gold ID",
    "score" : 0.6687181434333315
  }, {
    "definition" : "f",
    "score" : 0.6288842031023242
  }, {
    "definition" : "link",
    "score" : 0.6288842031023242
  }, {
    "definition" : "p",
    "score" : 0.5816270233429564
  } ]
}

Specify your own input