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 (a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a \,F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0 ~, }

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

Semantic latex: (a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0 ~

Confidence: 0

Mathematica

Translation: (a - Subscript[b, 1]- Subscript[b, 2])*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2], c ; x , y]- a*Subscript[F, 1][a + 1 , Subscript[b, 1], Subscript[b, 2], c ; x , y]+ Subscript[b, 1]*Subscript[F, 1][a , Subscript[b, 1]+ 1 , Subscript[b, 2], c ; x , y]+ Subscript[b, 2]*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2]+ 1 , c ; x , y] == 0

Information

Sub Equations

  • (a - Subscript[b, 1]- Subscript[b, 2])*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2], c ; x , y]- a*Subscript[F, 1][a + 1 , Subscript[b, 1], Subscript[b, 2], c ; x , y]+ Subscript[b, 1]*Subscript[F, 1][a , Subscript[b, 1]+ 1 , Subscript[b, 2], c ; x , y]+ Subscript[b, 2]*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2]+ 1 , c ; x , y] = 0

Free variables

  • Subscript[b, 1]
  • Subscript[b, 2]
  • a
  • c
  • x
  • y

Symbol info

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

Tests

Symbolic
Numeric

SymPy

Translation: (a - Symbol('{b}_{1}')- Symbol('{b}_{2}'))*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)- a*Symbol('{F}_{1}')(a + 1 , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{1}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}')+ 1 , Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{2}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}')+ 1 , c ; x , y) == 0

Information

Sub Equations

  • (a - Symbol('{b}_{1}')- Symbol('{b}_{2}'))*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)- a*Symbol('{F}_{1}')(a + 1 , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{1}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}')+ 1 , Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{2}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}')+ 1 , c ; x , y) = 0

Free variables

  • Symbol('{b}_{1}')
  • Symbol('{b}_{2}')
  • a
  • c
  • x
  • y

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: (a - b[1]- b[2])*F[1](a , b[1], b[2], c ; x , y)- a*F[1](a + 1 , b[1], b[2], c ; x , y)+ b[1]*F[1](a , b[1]+ 1 , b[2], c ; x , y)+ b[2]*F[1](a , b[1], b[2]+ 1 , c ; x , y) = 0

Information

Sub Equations

  • (a - b[1]- b[2])*F[1](a , b[1], b[2], c ; x , y)- a*F[1](a + 1 , b[1], b[2], c ; x , y)+ b[1]*F[1](a , b[1]+ 1 , b[2], c ; x , y)+ b[2]*F[1](a , b[1], b[2]+ 1 , c ; x , y) = 0

Free variables

  • a
  • b[1]
  • b[2]
  • c
  • x
  • y

Symbol info

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

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_63bd49b79ef2a04a7ede16fac543f544",
  "formula" : "(a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0 ~",
  "semanticFormula" : "(a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0 ~",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "(a - Subscript[b, 1]- Subscript[b, 2])*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2], c ; x , y]- a*Subscript[F, 1][a + 1 , Subscript[b, 1], Subscript[b, 2], c ; x , y]+ Subscript[b, 1]*Subscript[F, 1][a , Subscript[b, 1]+ 1 , Subscript[b, 2], c ; x , y]+ Subscript[b, 2]*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2]+ 1 , c ; x , y] == 0",
      "translationInformation" : {
        "subEquations" : [ "(a - Subscript[b, 1]- Subscript[b, 2])*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2], c ; x , y]- a*Subscript[F, 1][a + 1 , Subscript[b, 1], Subscript[b, 2], c ; x , y]+ Subscript[b, 1]*Subscript[F, 1][a , Subscript[b, 1]+ 1 , Subscript[b, 2], c ; x , y]+ Subscript[b, 2]*Subscript[F, 1][a , Subscript[b, 1], Subscript[b, 2]+ 1 , c ; x , y] = 0" ],
        "freeVariables" : [ "Subscript[b, 1]", "Subscript[b, 2]", "a", "c", "x", "y" ],
        "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "(a - Symbol('{b}_{1}')- Symbol('{b}_{2}'))*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)- a*Symbol('{F}_{1}')(a + 1 , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{1}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}')+ 1 , Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{2}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}')+ 1 , c ; x , y) == 0",
      "translationInformation" : {
        "subEquations" : [ "(a - Symbol('{b}_{1}')- Symbol('{b}_{2}'))*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)- a*Symbol('{F}_{1}')(a + 1 , Symbol('{b}_{1}'), Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{1}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}')+ 1 , Symbol('{b}_{2}'), c ; x , y)+ Symbol('{b}_{2}')*Symbol('{F}_{1}')(a , Symbol('{b}_{1}'), Symbol('{b}_{2}')+ 1 , c ; x , y) = 0" ],
        "freeVariables" : [ "Symbol('{b}_{1}')", "Symbol('{b}_{2}')", "a", "c", "x", "y" ],
        "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "(a - b[1]- b[2])*F[1](a , b[1], b[2], c ; x , y)- a*F[1](a + 1 , b[1], b[2], c ; x , y)+ b[1]*F[1](a , b[1]+ 1 , b[2], c ; x , y)+ b[2]*F[1](a , b[1], b[2]+ 1 , c ; x , y) = 0",
      "translationInformation" : {
        "subEquations" : [ "(a - b[1]- b[2])*F[1](a , b[1], b[2], c ; x , y)- a*F[1](a + 1 , b[1], b[2], c ; x , y)+ b[1]*F[1](a , b[1]+ 1 , b[2], c ; x , y)+ b[2]*F[1](a , b[1], b[2]+ 1 , c ; x , y) = 0" ],
        "freeVariables" : [ "a", "b[1]", "b[2]", "c", "x", "y" ],
        "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" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "y", "F_{1}", "_{2}F_{1}", "_{1}F_{1}", "F", "x", "(a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a \\,F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0" ],
  "isPartOf" : [ "(a-b_1-b_2) F_1(a,b_1,b_2,c; x,y) - a \\,F_1(a+1,b_1,b_2,c; x,y) + b_1 F_1(a,b_1+1,b_2,c; x,y) + b_2 F_1(a,b_1,b_2+1,c; x,y) = 0" ],
  "definiens" : [ ]
}

Specify your own input