Logical Relations for Partial Features and Automatic Differentiation Correctness
Abstract
We present a simple technique for semantic, open logical relations arguments about languages with recursive types, which, as we show, follows from a principled foundation in categorical semantics. We demonstrate how it can be used to give a very straightforward proof of correctness of practical forward- and reverse-mode dual numbers style automatic differentiation (AD) on ML-family languages. The key idea is to combine it with a suitable open logical relations technique for reasoning about differentiable partial functions (a suitable lifting of the partiality monad to logical relations), which we introduce.
- Publication:
-
arXiv e-prints
- Pub Date:
- October 2022
- DOI:
- 10.48550/arXiv.2210.08530
- arXiv:
- arXiv:2210.08530
- Bibcode:
- 2022arXiv221008530L
- Keywords:
-
- Computer Science - Programming Languages;
- Computer Science - Logic in Computer Science;
- Mathematics - Category Theory;
- Mathematics - Logic;
- 68N15;
- 68N18;
- 68Q55;
- 68W30;
- 18D20;
- 18A25;
- D.3;
- F.3.1;
- F.3.2;
- D.3.1
- E-Print:
- 25 pages (18 pages + references and appendices), conference paper (the corresponding extended work can be found at arXiv:2210.07724), submitted to FoSSaCS. arXiv admin note: substantial text overlap with arXiv:2210.07724