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 \ln x \ge 11}

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

Semantic latex: \ln x \ge 11

Confidence: 0

Mathematica

Translation: Log[x] >= 11

Information

Sub Equations

  • Log[x] >= 11

Free variables

  • x

Symbol info

  • Natural logarithm; Example: \ln@@{z}

Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html

Tests

Symbolic

Test expression: Log[x]\geq11

ERROR:

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

SymPy

Translation: ln(x) >= 11

Information

Sub Equations

  • ln(x) >= 11

Free variables

  • x

Symbol info

  • Natural logarithm; Example: \ln@@{z}

Will be translated to: ln($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log

Tests

Symbolic
Numeric

Maple

Translation: ln(x) >= 11

Information

Sub Equations

  • ln(x) >= 11

Free variables

  • x

Symbol info

  • Natural logarithm; Example: \ln@@{z}

Will be translated to: ln($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • bracket li
  • e.g.

Complete translation information:

{
  "id" : "FORMULA_812f3620404da7b9d58cb31283bb3bc1",
  "formula" : "\\ln x \\ge 11",
  "semanticFormula" : "\\ln x \\ge 11",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Log[x] >= 11",
      "translationInformation" : {
        "subEquations" : [ "Log[x] >= 11" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/4.2#E2\nMathematica:  https://reference.wolfram.com/language/ref/Log.html"
        }
      },
      "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" : "Log[x]",
          "rhs" : "11",
          "testExpression" : "Log[x]\\geq11",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "ln(x) >= 11",
      "translationInformation" : {
        "subEquations" : [ "ln(x) >= 11" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: ln($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.2#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log"
        }
      }
    },
    "Maple" : {
      "translation" : "ln(x) >= 11",
      "translationInformation" : {
        "subEquations" : [ "ln(x) >= 11" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "\\ln" : "Natural logarithm; Example: \\ln@@{z}\nWill be translated to: ln($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=ln"
        }
      }
    }
  },
  "positions" : [ {
    "section" : 5,
    "sentence" : 6,
    "word" : 13
  } ],
  "includes" : [ "x" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "bracket li",
    "score" : 0.6859086196238077
  }, {
    "definition" : "e.g.",
    "score" : 0.6460746792928004
  } ]
}

Specify your own input