Software FoundationsBenjamin C. Pierce
Software Foundations
by Benjamin C. Pierce · first published 2010
77mentions
58recommended by
60HN commenters
2011–2026first – last mentioned
97% recommend3% neutral
Coq-based course on logical foundations, programming language theory and verification (free online).
Affiliate links. As an Amazon Associate I earn from qualifying purchases.




The same can be done also with Coq[1], it is easy to learn[2], actively developed[3], and better documented[4]. You can also visit their discussion board[5]. Regarding the usual Lean vs Coq "war" and so-called "setoid hell" you can read a lengthy discussion on their GitHub[6]. [1] http://coq.inria.fr/ [2] https://learnxinyminutes.com/docs/coq/ [3] https://github.com/coq/coq [4] https://softwar
on “Doing a math assignment with the Lean theorem prover” ↗Software Foundations (https://softwarefoundations.cis.upenn.edu) is pretty informal and understandable, what it isn't is short. But it's a very useful resource. The best general introduction is probably still Types and Programming Languages: (https://www.cis.upenn.edu/~bcpierce/tapl/index.html) It's a great book, but it doesn't get to dependent types.
on “Learn Coq in Y Minutes” ↗The literature on formal methods has evolved a lot. In particular there is some great broad introductory material using either Coq or Isabelle: * https://softwarefoundations.cis.upenn.edu/ * http://www.concrete-semantics.org/ * http://adam.chlipala.net/frap/ Even the Little series covers types and proofs now: * https://mitpress.mit.edu/books/little-typer * https://mitpress.mit.edu/books/litt
on “Concrete Semantics” ↗Two schools: * Coq/dependent types. Check out Software Foundations by Benjamin Pierce, et. al. Everything's online. Also see Idris, which has a good book from Manning. * SMT-solver-based verification of existing languages. See SPARK/Ada (there's a good book but I can't…
on “Ask HN: What was the best CS paper you read in 2017?” ↗I would strongly recommend looking at “standard” dependently-typed theories and languages (or even proof assistants without dependent types), instead of trying to plunge into homotopy theory. Learning how dependent types work will be much more illuminating than trying to catch up on the algebraic topology. While the link between topology and formal logic is certainly interesting, I think you’ll be
on “Homotopy Type Theory (2012) [pdf]” ↗Another good reference, that also introduces some PLT notation, is Loh 2001, "Introduction to the Dependently-Typed Lambda Calculus" [1], as well as the textbook by Pierce [2], which has a formally-verified spiritual successor [3]. [1] http://www.cs.ru.nl/~wouters/Publications/Tutorial.pdf [2] https://www.cis.upenn.edu/~bcpierce/tapl/ [3] https://softwarefoundations.cis.upenn.edu/plf-current/inde
on “Lambda Calculus Examples (2009) [pdf]” ↗If you want to get started with Coq there are two good resources. One is Software Foundations[sf] by Benjamin Pierce. There's also Certified Programming with Dependent Types[cpdt] by Adam Chlipala. I would say [cpdt] is more advanced than [sf], so I think it's best to start with [sf] and then…
on “Formal Methods of Software Design: an online course by Eric Hehner” ↗You might already know about this, but if you're looking to learn Coq, I would recommend the Software Foundations series (https://softwarefoundations.cis.upenn.edu/).
on “Finding bugs in Haskell code by proving it” ↗Three extra classics: * https://books.google.es/books?id=YseqCAAAQBAJ * http://www.concrete-semantics.org/ * https://softwarefoundations.cis.upenn.edu/
on “Coming Soon: Machine-Checked Proofs in Everyday Development” ↗Software Foundations [1]. Hands down one of the top programming textbooks to date. [1] https://softwarefoundations.cis.upenn.edu/
on “Ask HN: What are the best textbooks in your field of expertise?” ↗Start with the one with the best documentation. It's hard to beat Software Foundations: https://softwarefoundations.cis.upenn.edu/, which happens to be for Coq. If you search the web for "Software Foundations in X", you will find partial ports of some of the initial chapters to pretty much any other proof assistant. Maybe nowadays they are full, complete ones that would allow you to use Isabelle
on “Can Computers Prove Theorems?” ↗Try http://adam.chlipala.net/frap/ It's a really great book as an introduction to semantics and proofs. A great alternative is http://www.concrete-semantics.org/. Concrete Semantics uses Isabelle, which is based on ZFC set theory. Whereas FRAP uses Coq, that employs constructive types. https://softwarefoundations.cis.upenn.edu is also fantastic, covers some of the same topics, and proceeds a b
on “Formal Reasoning About Programs (2017) [pdf]” ↗There's many topics in this area. Ones that are well known in industry are algorithmic complexity theory and type theory. Ones that are less well known include the two resources below. http://www4.di.uminho.pt/~jno/ps/pdbc.pdf https://softwarefoundations.cis.upenn.edu I suggest you get use to ML style languages before diving into those two resources (Haskell is a good choice) as it's not easy t
on “Systems design explains the world: volume 1” ↗Since there are no other comments here, I will post this link to the Software Foundations book [1] by Benjamin Pierce et al., which may be of interest to anyone who wants to learn Coq. > The Software Foundations series is a broad introduction to the mathematical underpinnings of reliable software. > The principal novelty of the series is that every detail is one hundred percent formalized and ma
on “A library of formalised undecidable problems in Coq” ↗There's an excellent online book that introduces Coq and how to use it for verification of programs: https://softwarefoundations.cis.upenn.edu/. There's also a more advanced book, http://adam.chlipala.net/cpdt/, that goes into more detail. In comparison, Lean has little teaching material for formal verification of programs.
on “The Dawn of Formalized Mathematics” ↗