The Program That Cannot Lie: From Lambda Calculus to Dependent Types, Following the Curry-Howard Correspondence
English | October 19, 2026 | ASIN: B0HNHR44TX | 244 Pages | Epub | 366.62 KB
A program that passes a type checker is, as it stands, a proof. This is the Curry-Howard correspondence.In this book you write, from scratch in Python, an evaluator and a type checker for a language that has nothing but lambda. Put the rules of your own type checker next to the inference rules of logic, and they turn out to be the same table. This book lets you check that with your own hands.What you will learnHow "A implies B" becomes a function type, "and" a pair, "or" a tagged union, and "not" a function into the empty typeWhy typing rules and the rules of natural deduction form the same tableWhy removing detours from a proof (cut elimination) is exactly running a program (beta reduction)Why the law of excluded middle cannot normally be written, and how it becomes call/ccHow ∀ and ∃ become dependent types, and how a working program can be extracted from an existence proofWhy the Y combinator has no type, and why a language whose programs always halt cannot write its own interpreterAll the code in the book is Python, and every example has been run and its output checked. The appendix contains the complete type checkers for simple types, System F, and dependent types.In the previous book, The Program That Talks About Itself, self-reference was the tool that led to the incompleteness theorems. In this book, types forbid self-reference, and that is why a program cannot lie. You do not need to have read the previous book.It is written for programmers who want to be convinced, all the way down, that proofs and programs are the same thing.
Recommend Download Link Hight Speed | Please Say Thanks Keep Topic Live
Links are Interchangeable - Single Extraction