English

Logical Relations for Partial Features and Automatic Differentiation Correctness

Programming Languages 2022-10-25 v2 Logic in Computer Science Category Theory Logic

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.

Keywords

Cite

@article{arxiv.2210.08530,
  title  = {Logical Relations for Partial Features and Automatic Differentiation Correctness},
  author = {Fernando Lucatelli Nunes and Matthijs Vákár},
  journal= {arXiv preprint arXiv:2210.08530},
  year   = {2022}
}

Comments

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

R2 v1 2026-06-28T03:44:49.558Z