Equational logic has been a central theme in mathematical reasoning and in reasoning about programs. We introduce a quantitative analogue of equational reasoning that allows one to reason about approximate equality. The equality symbol is annotated with a real number that describes how far apart two terms can be. We develop the counterparts of standard results of equational logic, in particular, a completeness theorem. We define quantitative algebras and free quantitative algebras which yield monads on categories of metric spaces. We show that key examples of probability metrics, in particular, the Kantorovich metric and the Wasserstein p-metrics, arise from simple quantitative theories. Finally we develop a quantitative version of the theory of effects in programming languages.
|Title of host publication||Foundations of Probabilistic Programming|
|Editors||Gilles Barthe, Joost-Pieter Katoen, Alexandra Silva|
|Publisher||Cambridge University Press|
|Publication date||Dec 2020|
|Publication status||Published - Dec 2020|