NRPyLaTeX: A LaTeX interface to computer algebra systems for general relativity

11/10/2021
by   Kenneth J. Sible, et al.
0

While each computer algebra system (CAS) contains its own unique syntax for inputting mathematical expressions, LaTeX is perhaps the most widespread language for typesetting mathematics. NRPyLaTeX (NL) enables direct LaTeX input of complex tensorial expressions (written in Einstein notation) relevant to general relativity and differential geometry into the SymPy CAS. As SymPy also supports output compatible with the Mathematica and Maple CASs, NL lowers the learning curve for inputting and manipulating tensorial expressions in three widely used CASs. LaTeX however is a typesetting language, and as such is not designed to resolve ambiguities in mathematical expressions. To address this, NL implements a convenient configuration interface that, e.g., defines variables with certain attributes. Configuration commands appear as LaTeX comments, so that entire NL workflows can fit seamlessly into the LaTeX source code of scientific papers without interfering with the rendered mathematical expressions. Further, NL adopts NRPy+'s rigid syntax for indexed symbols (e.g., tensors), which enables NL output to be directly converted into highly optimized C/C++-code kernels using NRPy+. Finally NL has robust and user-friendly error-handling, which catches common tensor indexing errors and reports unresolved ambiguities, further expediting the input and validation of LaTeX expressions into a CAS.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/30/2020

Automatic Mathematical Information Retrieval to Perform Translations up to Computer Algebra Systems

In mathematics, LaTeX is the de facto standard to prepare documents, e.g...
research
08/25/2022

Hiding canonicalisation in tensor computer algebra

Simplification of expressions in computer algebra systems often involves...
research
11/19/2018

Simplification of tensor expressions in computer algebra

Computer algebra is widely used in various fields of mathematics, physic...
research
09/17/2023

Generalized Gain and Impedance Expressions for Single-Transistor Amplifiers

This expository manuscript presents generalized expressions for the low-...
research
09/17/2021

MathTools: An Open API for Convenient MathML Handling

Mathematical formulae carry complex and essential semantic information i...
research
01/04/2023

Grammar construction methods for extended deterministic expressions

Extended regular expressions with counting and interleaving are widely u...
research
08/08/2020

dxo: A System for Relational Algebra and Differentiation

We present dxo, a relational system for algebra and differentiation, wri...

Please sign up or login with your details

Forgot password? Click here to reset