Journal of Automated Reasoning

, Volume 51, Issue 4, pp 357-370

First online:

Open Access This content is freely available online to anyone, anywhere at any time.

Proof Pearl—A Mechanized Proof of GHC’s Mergesort

  • Christian SternagelAffiliated withSchool of Information Science, Japan Advanced Institute of Science and Technology Email author 


We present our Isabelle/HOL formalization of GHC’s sorting algorithm for lists, proving its correctness and stability. This constitutes another example of applying a state-of-the-art proof assistant to real-world code. Furthermore, it allows users to take advantage of the formalized algorithm in generated code.


Mergesort Theorem proving Code generation