Theorems for Free!

Philip Wadler. Theorems for Free!. In FPCA. pages 347-359, 1989. [doi]

Abstract

From the type of a polymorphic function we can derive a theorem that it satisfies. Every function of the same type satisfies the same theorem. This provides a free source of useful theorems, courtesy of Reynolds’ abstraction theorem for the polymorphic lambda calculus.