Software Foundations Logo
Volume 1: Logical Foundations
  • Table of Contents
  • Index
  • Roadmap

Preface

  • Welcome
  • Overview
    • Logic
    • Proof Assistants
    • Functional Programming
    • Further Reading
  • Practicalities
    • System Requirements
    • Exercises
    • Downloading the Coq Files
    • Chapter Dependencies
    • Recommended Citation Format
  • Resources
    • Sample Exams
    • Lecture Videos
  • Note for Instructors
  • Translations
  • Thanks

Functional Programming in Coq    (Basics)

  • Data and Functions
    • Enumerated Types
    • Days of the Week
    • Booleans
    • Types
    • New Types from Old
    • Modules
    • Tuples
    • Numbers
  • Proof by Simplification
  • Proof by Rewriting
  • Proof by Case Analysis
  • Testing Your Solutions

Proof by Induction    (Induction)

  • Review
  • Separate Compilation
  • Proof by Induction
  • Proofs Within Proofs
  • Formal vs. Informal Proof
  • More Exercises

Working with Structured Data    (Lists)

  • Pairs of Numbers
  • Lists of Numbers
  • Reasoning About Lists
    • Induction on Lists
  • Options
  • Partial Maps

Polymorphism and Higher-Order Functions    (Poly)

    • Polymorphic Lists
    • Polymorphic Pairs
    • Polymorphic Options
  • Functions as Data
    • Higher-Order Functions
    • Filter
    • Anonymous Functions
    • Map
    • Fold
    • Functions That Construct Functions

More Basic Tactics    (Tactics)

  • The apply Tactic
  • The apply with Tactic
  • The injection and discriminate Tactics
  • Using Tactics on Hypotheses
  • Varying the Induction Hypothesis
  • Unfolding Definitions
  • Using destruct on Compound Expressions
  • Micro Sermon

Logic in Coq    (Logic)

  • Logical Connectives
    • Conjunction
    • Disjunction
    • Falsehood and Negation
    • Truth
    • Logical Equivalence
    • Setoids and Logical Equivalence
    • Existential Quantification
  • Programming with Propositions
  • Applying Theorems to Arguments
  • Coq vs. Set Theory
    • Functional Extensionality
    • Propositions vs. Booleans
    • Classical vs. Constructive Logic

Inductively Defined Propositions    (IndProp)

  • Inductively Defined Propositions
    • Inductive Definition of Evenness
  • Using Evidence in Proofs
    • Inversion on Evidence
    • Induction on Evidence
  • Inductive Relations
  • Case Study: Regular Expressions
    • The remember Tactic
  • Case Study: Improving Reflection

Total and Partial Maps    (Maps)

  • The Coq Standard Library
  • Identifiers
  • Total Maps
  • Partial maps

The Curry-Howard Correspondence    (ProofObjects)

  • Proof Scripts
  • Quantifiers, Implications, Functions
  • Programming with Tactics
  • Logical Connectives as Inductive Types
    • Conjunction
    • Disjunction
    • Existential Quantification
    • True and False
  • Equality
  • The Coq Trusted Computing Base

Induction Principles    (IndPrinciples)

  • Basics
  • Induction Principles for Propositions
  • Explicit Proof Objects for Induction (Optional)

Properties of Relations    (Rel)

  • Relations
  • Basic Properties
  • Reflexive, Transitive Closure

Simple Imperative Programs    (Imp)

  • Arithmetic and Boolean Expressions
    • Syntax
    • Evaluation
    • Optimization
  • Coq Automation
    • Tacticals
    • Defining New Tactic Notations
    • The omega Tactic
    • A Few More Handy Tactics
  • Evaluation as a Relation
    • Inference Rule Notation
    • Equivalence of the Definitions
    • Computational vs. Relational Definitions
  • Expressions With Variables
    • States
    • Syntax
    • Notations
    • Evaluation
  • Commands
    • Syntax
    • More Examples
  • Evaluating Commands
    • Evaluation as a Function (Failed Attempt)
    • Evaluation as a Relation
    • Determinism of Evaluation
  • Additional Exercises

Lexing and Parsing in Coq    (ImpParser)

  • Internals
    • Lexical Analysis
    • Parsing
  • Examples

An Evaluation Function for Imp    (ImpCEvalFun)

  • A Broken Evaluator
  • A Step-Indexed Evaluator
  • Relational vs. Step-Indexed Evaluation
  • Determinism of Evaluation Again

Extracting ML from Coq    (Extraction)

  • Basic Extraction
  • Controlling Extraction of Specific Types
  • A Complete Example
  • Discussion
  • Going Further

More Automation    (Auto)

  • The auto Tactic
  • Searching For Hypotheses
  • Tactics eapply and eauto

More Automation    (AltAuto)

  • Coq Automation
  • Tacticals
    • A Few More Handy Tactics
    • Defining New Tactics
  • Decision Procedures
    • The Omega Tactic
  • Search Tactics
    • The constructor tactic.
    • The auto Tactic
    • The eapply and eauto variants

Postscript

  • Looking Back
  • Looking Forward
  • Resources

Bibliography    (Bib)

  • Resources cited in this volume