How to Safely Use Extensionality in Liquid Haskell
Refinement type checkers are a powerful way to reason about functional programs. % For example, one can prove properties of a slow, specification implementation and port the proofs to an optimized pure implementation that behaves the same. % But to reason about higher-order programs, we must reason about equalities between functions: we need a consistent encoding of functional extensionality.
A natural but naive phrasing of the functional extensionality axiom ($\texttt{funExt}$) is inconsistent in refinement type systems with semantic subtyping and polymorphism, that is, if we assume $\texttt{funExt}$, then we can prove false. We demonstrate the inconsistency and develop a new approach to equality in Liquid Haskell: we define a propositional equality in a library we call $\texttt{PEq}$. Using $\texttt{PEq}$ avoids the inconsistency while still proving useful equalities at higher types; we demonstrate its use in several case studies. We validate $\texttt{PEq}$ by building a small model and developing its metatheory. Additionally, we prove metaproperties of $\texttt{PEq}$ inside Liquid Haskell itself using an unnamed folklore technique, which we dub `classy induction’.
Thu 15 SepDisplayed time zone: Belgrade, Bratislava, Budapest, Ljubljana, Prague change
11:00 - 12:30 | |||
11:00 30mTalk | Coinduction Inductively: Mechanizing Coinductive Proofs in Liquid Haskell Haskell Lykourgos Mastorou National Technical University of Athens, Nikolaos Papaspyrou National Technical University of Athens, Niki Vazou IMDEA Software Institute | ||
11:30 30mTalk | How to Safely Use Extensionality in Liquid Haskell Haskell | ||
12:00 30mTalk | Liquid Proof Macros Haskell Henry Blanchette , Niki Vazou IMDEA Software Institute, Leonidas Lampropoulos University of Maryland, College Park |