From Lambda Calculus to Verified Reasoning
Introduction
Chapter 1: The Functional Paradigm
- Computation Without Mutation: The Philosophical Basis
- Functional Programming and Mathematical Functions
- Historical Origins: Lambda Calculus, Lisp and the Search for Purity
- Referential Transparency and the Predictability of Programs
- The Connection Between Purity and Provable Correctness
Chapter 2: Lambda Calculus as the Foundation
- Syntax of the Lambda Calculus: Terms, Abstraction and Application
- Beta Reduction and the Mechanics of Computation
- Alpha Conversion and the Problem of Variable Capture
- Church Encodings: Numbers, Booleans and Pairs in Pure Lambda Terms
- Confluence, Normal Forms and the Halting Problem
Chapter 3: Evaluation Strategies and Control Flow
- Call-by-Value: The Eager Evaluation Model
- Call-by-Name and Call-by-Need: Lazy Evaluation Explained
- Normal Order vs Applicative Order Reduction
- Thunks, Sharing and the Cost of Laziness
- Strictness Analysis and the Pragmatics of Real Implementations
Chapter 4: Core Functional Concepts
- Pure Functions and the Elimination of Side Effects
- Immutability and Data as Mathematical Objects
- Lexical Scoping and the Structure of Environments
- Closures and Captured Environments in Practice
- First-Class and Higher-Order Functions
Chapter 5: Recursion and Functional Algorithms
- Recursion as the Replacement for Imperative Loops
- Structural Recursion and Data-Driven Termination
- Tail Recursion and Continuation-Passing Style
- Recursive Algorithms on Lists and Trees
- Proving Termination and Correctness of Recursive Functions
Chapter 6: Algebraic Data Types and Pattern Matching
- Product Types and Records as Tuples
- Sum Types and the Representation of Alternatives
- Algebraic Data Types in Practice
- Pattern Matching as Structural Decomposition
- Exhaustiveness Checking and Safe Case Analysis
Chapter 7: Type Systems and Type Theory
- What Type Systems Do: Safety, Documentation and Computation
- Parametric Polymorphism and Generic Programming
- Hindley-Milner Type Inference and the Algorithm W
- Type Expressiveness and the Spectrum of Type Systems
- From Type Safety to Type-Directed Reasoning
Chapter 8: Type Classes and Ad-hoc Polymorphism
- The Problem Type Classes Solve: Overloading Without Chaos
- Type Class Declarations, Instances and Resolution
- Functional Dependencies and Associated Types
- Type Classes as a Foundation for Abstraction
- Connection to Category Theory and Functorial Structure
Chapter 9: Category Theory and Functional Abstractions
- Categories, Objects and Morphisms: The Basic Structure
- Functors and the Preservation of Structure
- Applicative Functors and Pure Functions in Context
- Monads as Composable Computations
- Monoids and Foldable Structures
Chapter 10: Effect Systems and Managing Impurity
- The Problem of Effects in a Pure Language
- The IO Monad and Separating Pure and Impure
- State Monads and Computational Effects
- Alternative Effect Systems: Algebraic Effects and Handlers
- Pure Functional Concurrency and Software Transactional Memory
Chapter 11: Functional Program Architecture
- Composing Modules and Managing Dependencies
- Error Handling with Maybe, Either and Validation
- Functional Design Patterns: Visitors, Interpreters and Beyond
- Property-Based Testing and Generative Verification
- The Functional Architecture of Large Systems
Chapter 12: Propositional and Predicate Logic
- Propositions, Truth Values and Logical Connectives
- Truth Tables, Tautologies and Logical Equivalence
- Propositional Satisfiability and the Satisfiability Problem
- Predicates, Quantifiers and First-Order Logic
- Axioms, Inference Rules and Derivations
Chapter 13: Proof Systems and Natural Deduction
- Formal Proof Systems: From Axioms to Theorems
- Natural Deduction: Introduction and Elimination Rules
- Sequent Calculus and the Structure of Proofs
- Constructive vs Non-Constructive Proofs
- Proof Search and Automated Deduction
Chapter 14: Constructive Logic and Intuitionism
- The Intuitionistic Critique of Classical Logic
- Constructive Existence and the Brouwer-Heyting-Kolmogorov Interpretation
- Double Negation and the Law of Excluded Middle
- Continuity, Choice Principles and Intuitionistic Mathematics
- Implications for Computation and Proof Assistants
Chapter 15: Mathematical Induction and Recursive Definitions
- Mathematical Induction and the Well-Ordering Principle
- Strong Induction and Complete Induction
- Structural Induction on Inductive Types
- Recursive Definitions and Well-Founded Recursion
- Coinduction and Infinite Structures
Chapter 16: The Curry-Howard Correspondence
- The Historical Development of the Correspondence
- Propositions as Types: Mapping Logic to Type Theory
- Proofs as Programs: Constructing Inhabitants of Types
- Logical Connectives and Their Type-Theoretic Counterparts
- Quantifiers, Dependent Types and the Extended Correspondence
Chapter 17: Dependent Type Theory
- Dependent Types and the Blurring of Data and Prop
- Pi Types and Dependent Function Spaces
- Inductive Types and Recursive Structures
- Inductive Families and Indexed Types
- Universes, Hierarchy and Consistency
Chapter 18: The Calculus of Inductive Constructions
- The Structure of the Calculus of Inductive Constructions
- Typing Rules and the Judgemental Structure
- Inductive Definitions and Pattern Matching in CIC
- Computation, Conversion and Definitional Equality
- Strong Normalization and Logical Consistency
Chapter 19: Introduction to Proof Assistants
- What a Proof Assistant Does and Does Not Do
- Trusted Kernels and the Architecture of Verification
- Proof Terms, Checkers and the Role of Automation
- Axioms, Assumptions and the Trust Boundary
- Choosing a Proof Assistant for Your Purpose
Chapter 20: Lean: Installation, Workflow and Basics
- Installing Lean and Configuring the Development Environment
- Project Structure, Imports and Modules
- Basic Syntax, Declarations and Definitions
- Defining Functions and Inductive Types
- Writing Your First Theorems and Proofs
Chapter 21: Interactive Proof Development in Lean
- Term Mode vs Tactic Mode
- Basic Tactics: Assumption, Apply, Intros and Exact
- Rewriting, Simplification and Calculation
- Induction and Case Analysis Tactics
- Working with Algebraic Structures and Libraries
- Debugging Failed Proofs and Type Errors
Chapter 22: Advanced Lean and Formalization Case Studies
- Formalizing Recursive Algorithms and Their Correctness
- Verified Data Structures: Lists, Trees and Maps
- Algebraic Structures: Groups, Rings and Fields
- Relational Properties and Program Verification
- Large-Scale Formalization and Library Design
Chapter 23: Comparative Perspectives and Future Directions
- Comparing Lean, Coq and Agda: Foundations and Ecosystems
- Connections to Haskell, Idris and Dependent Programming
- SMT Solvers, Automated Theorem Proving and Hybrid Approaches
- Industrial Applications: Verified Compilers and Security
- Open Problems and Research Frontiers