Representing mathematical expressions has wide applications in computer science. One obvious application is in programming languages, where representing expressions is key to interpret or compile a program. One less obvious application is in machine learning, where the representation is used, as we will see, to drive the learning process.
We begin by introducing a simple representation for expressions, via tuples. On this representation we can define symbolic operations such as symbolic differentiation, variable substitution, and more.