dxo: A System for Relational Algebra and Differentiation

08/08/2020
by   Julie Steele, et al.
0

We present dxo, a relational system for algebra and differentiation, written in miniKanren. dxo operates over math expressions, represented as s-expressions. dxo supports addition, multiplication, exponentiation, variables (represented as tagged symbols), and natural numbers (represented as little-endian binary lists). We show the full code for dxo, and describe in detail the four main relations that compose dxo. We present example problems dxo can solve by combining the main relations. Our differentiation relation, do, can differentiate polynomials, and by running backwards, can also integrate. Similarly, our simplification relation, simpo, can simplify expressions that include addition, multiplication, exponentiation, variables, and natural numbers, and by running backwards, can complicate any expression in simplified form. Our evaluation relation, evalo, takes the same types of expressions as simpo, along with an environment associating variables with natural numbers. By evaluating the expression with respect to the environment, evalo can produce a natural number; by running backwards, evalo can generate expressions (or the associated environments) that evaluate to a given value. reordero also takes the same types of expressions as simpo, and relates reordered expressions.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/08/2019

On matrices and K-relations

We show that the matrix query language MATLANG corresponds to a natural ...
research
08/25/2022

Hiding canonicalisation in tensor computer algebra

Simplification of expressions in computer algebra systems often involves...
research
12/30/2020

Notes on Computational Graph and Jacobian Accumulation

The optimal calculation order of a computational graph can be represente...
research
05/04/2017

Compile-Time Symbolic Differentiation Using C++ Expression Templates

Template metaprogramming is a popular technique for implementing compile...
research
01/14/2019

Complexity Bounds for Relational Algebra over Document Spanners

We investigate the complexity of evaluating queries in Relational Algebr...
research
02/13/2021

Euclidean Affine Functions and Applications to Calendar Algorithms

We study properties of Euclidean affine functions (EAFs), namely those o...
research
11/10/2021

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

While each computer algebra system (CAS) contains its own unique syntax ...

Please sign up or login with your details

Forgot password? Click here to reset