Semantic preserving bijective mappings for expressions involving special functions between computer algebra systems and document preparation systems

Pages415-439
Date20 May 2019
Published date20 May 2019
DOIhttps://doi.org/10.1108/AJIM-08-2018-0185
AuthorAndré Greiner-Petter,Moritz Schubotz,Howard S. Cohl,Bela Gipp
Subject MatterLibrary & information science
Semantic preserving bijective
mappings for expressions involving
special functions between
computer algebra systems and
document preparation systems
André Greiner-Petter and Moritz Schubotz
School of Electrical, Information and Media Engineering,
University of Wuppertal, Wuppertal, Germany
Howard S. Cohl
Applied and Computational Mathematics Division,
National Institute of Standards and Technology, Mission Viejo, California, USA, and
Bela Gipp
School of Electrical, Information and Media Engineering,
University of Wuppertal, Wuppertal, Germany
Abstract
Purpose Modern mathematicians and scientists of math-related disciplines often use Document
Preparation Systems (DPS) to write and Computer Algebra Systems (CAS) to calculate mathematical
expressions. Usually, they translate the expressions manually between DPS and CAS. This process is
time-consuming and error-prone. The purpose of this paper is to automate this translation. This paper uses
Maple and Mathematica as the CAS, and LaTeX as the DPS.
Design/methodology/approach Bruce Miller at the National Institute of Standards and Technology
(NIST) developed a collection of special LaTeX macros that create links from mathematical symbols to their
definitions in the NIST Digital Library of Mathematical Functions (DLMF). The authors are using these
macros to perform rule-based translations between the formulae in the DLMF and CAS. Moreover, the
authors develop software to ease the creation of new rules and to discover inconsistencies.
Findings The authors created 396 mappings and translated 58.8 percent of DLMF formulae (2,405
expressions) successfully between Maple and DLMF. For a significant percentage, the special function
definitions in Maple and the DLMF were different. An atomic symbol in one system maps to a composite
expression in the other system. The translator was also successfully used for automatic verification of
mathematical online compendia and CAS. The evaluation techniques discovered two errors in the DLMF and
one defect in Maple.
Originality/value This paper introduces the first translation tool for special functions between LaTeX and
CAS. The approach improves error-prone manual translations and can be used to verify mathematical online
compendia and CAS.
Keywords Translation, Computer Algebra System (CAS), Document Preparation System (DPS), LaTeX,
Presentation to Computation (P2C), Special functions
Paper type Research paper
1. Introduction
A typical workflow of a scientist who writes a scientific publication is to use Document
Preparation Systems (DPS) to write the paper and one or more Computer Algebra Systems
(CAS) for verification, analysis and visualization. Especially in the Science, Technology,
Engineering and Mathematics literature, LaTeX has become the de facto standard for
Aslib Journal of Information
Management
Vol. 71 No. 3, 2019
pp. 415-439
© Emerald PublishingLimited
2050-3806
DOI 10.1108/AJIM-08-2018-0185
Received 1 August 2018
Revised 3 December 2018
Accepted 24 January 2019
The current issue and full text archive of this journal is available on Emerald Insight at:
www.emeraldinsight.com/2050-3806.htm
This work was supported by the German Research Foundation (DFG Grant GI-1259-1).
415
Semantic
preserving
bijective
mappings
writing scientific publications over the past 30 years (Knuth, 1997, 1998, p. 559; Alex, 2007).
LaTeX enables printing of mathematical formulae in a structure similar to handwritten
style. For example, consider the specific Jacobi polynomial (DLMF, 2019, Table 18.3.1):
Pa;bðÞ
ncos aYðÞðÞ;(1)
where nis a nonnegative integer, α,βW1, and a;YA. This mathematical expression
can be written in LaTeX as:
P_n4\alpha;\betaðÞ

\cos a\ThetaðÞðÞ:
While LaTeX focuses on displaying mathematics, a CAS concentrates on computations
and user friendly syntax. Especially important for a CAS is to embed unambiguous
semantic information within the input. Each system uses different representations and
syntax, so that a writer needs to continually translate mathematical expressions from
one representation to another and back again. Table I shows four different representations
for Expression (1).
Translations from generic LaTeX to CAS are difficult to realize since the full semantic
information is not easily constructed from the input. Bruce Miller at the National Institute of
Standards and Technology (NIST) has created a set of semantic LaTeX macros (Miller and
Youssef, 2003). Most macros tie specific character sequences to well-defined mathematical
objects and are linked with corresponding definitions in the Digital Library of Mathematical
Functions (DLMF). The Digital Repository of Mathematical Formulae (DRMF ) is an
outgrowth of the DLMF with the goal to facilitate interaction among a community of
mathematicians and scientists (Cohl et al., 2014, 2015). The DRMF extends the set of
semantic macros. These macros embed necessary semantic information into LaTeX
expressions. The macros may also contain @ symbols preceding the variables of the
function. The number of @ symbols is used to switch between different notation styles, e.g.,
cos(x) and cos x. One example of such a macro is given in Table I for the semantic LaTeX
representation of the Jacobi polynomial. The macros provide isolated access to important
parts of the mathematical function, such as the arguments.
Even with embedded semantic information, a translation between systems can be
difficult. A typical example of complex problems occurs for multivalued functions
(Davenport, 2010). A CAS usually defines branch cuts to compute principal values of
multivalued functions (England et al., 2014), which makes the implementation of a
theoretically continuous function to a discontinuous presentation of it. In general,
positioning branch cuts follows conventions, but can be positioned arbitrarily in many
cases. Communicating and explaining the decision for defined branch cuts is a
critical issue for CAS and can vary between various systems (Corless et al., 2000).
Figure 1 illustrates two examples of different branch cut positioning for the inverse
trigonometric arccotangent function. While Maple [1] (square brackets refer to notes which
Systems Representations
Generic LaTeX P_n
4
{(\alpha, \beta)}(\cos(a\Theta))
Semantic LaTeX \JacobiP{\alpha}{\beta}{n}@{\cos@{a\Theta}}
Maple JacobiP (n, alpha, beta, cos (a*Theta))
Mathematica JacobiP [n, \[Alpha], \[Beta], Cos [a \[CapitalTheta]]]
Notes: Generic LaTeX is the default LaTeX expression; semantic LaTeX uses special semantic macros to
embed semantic information; and CAS representations are unique to themselves
Table I.
Different
representations for (1)
416
AJIM
71,3

To continue reading

Request your trial

VLEX uses login cookies to provide you with a better browsing experience. If you click on 'Accept' or continue browsing this site we consider that you accept our cookie policy. ACCEPT