Skip to main content

Fast and Loose Reasoning is Morally Correct

Nils Anders Danielsson‚ Jeremy Gibbons‚ John Hughes and Patrik Jansson

Abstract

We justify reasoning about non-total (partial) functional languages using methods seemingly only valid for total ones; this permits `fast and loose' reasoning without actually being loose. \par Two languages are defined, one total and one partial, with identical syntax. The semantics of the partial language includes partial and infinite values and lifted types, including lifted function spaces. A partial equivalence relation is then defined, the domain of which is the total subset of the partial language. It is proved that if two closed terms have the same semantics in the total language, then they have related semantics in the partial language. It is also shown that the partial equivalence relation gives rise to a bicartesian closed category, which can be used to reason about values in the domain of the relation.

Book Title
Principles of Programming Languages
Month
jan
Pages
206−217
Year
2006