Library UseTactics
UseTactics: Tactic Library for Coq: A Gentle
Introduction
Coq comes with a set of builtin tactics, such as reflexivity, intros, inversion and so on. While it is possible
to conduct
Library UseAuto
UseAuto: Theory and Practice of Automation in
Coq Proofs
In a machine-checked proof, every single detail has to be justified. This can result in huge proof scripts.
Fortunately, Coq co
Library Types
Types: Type Systems
Require Export Smallstep.
Our next topic, a large one, is type systems - static program analyses that classify expressions according
to the "shapes" of their results.
Library Typechecking
MoreStlc: A Typechecker for STLC
Require Export Stlc.
The has_type relation of the STLC defines what it means for a term to belong to a type (in some context).
But it doesn't, by
Library Sub
Sub: Subtyping
Require Export MoreStlc.
Concepts
We now turn to the study of subtyping, perhaps the most characteristic feature of the static type systems
of recently designed programming
Library Stlc
Stlc: The Simply Typed Lambda-Calculus
Require Export Types.
The Simply Typed Lambda-Calculus
The simply typed lambda-calculus (STLC) is a tiny core calculus embodying the key concept of
Library Smallstep
Smallstep: Small-step Operational Semantics
Require Export Imp.
The evaluators we have seen so far (e.g., the ones for aexps, bexps, and commands) have been formulated
in a "big-step
Library SfLib
SfLib: Software Foundations Library
Here we collect together several useful definitions and theorems from Basics.v, List.v, Poly.v, Ind.v, and
Logic.v that are not already in the Coq sta
Library Rel
Rel: Properties of Relations
Require Export SfLib.
A (binary) relation is just a parameterized proposition. As you know from your undergraduate discrete
math course, there are a lot of way
Library References
References: Typing Mutable References
Require Export Smallstep.
So far, we have considered a variety of pure language features, including functional abstraction, basic
types such as
Library RecordSub
RecordSub: Subtyping with Records
Require Export MoreStlc.
Core Definitions
Syntax
Inductive ty : Type :=
| TTop : ty | TBase : id ty | TArrow : ty ty ty
| TRNil : ty |
TRCons : id t
Library Records
Records: Adding Records to STLC
Require Export Stlc.
Adding Records
We saw in chapter MoreStlc how records can be treated as syntactic sugar for nested uses of products.
This is fine f
Library Prop
Prop: Propositions and Evidence
Require Export Poly.
In previous chapters, we have seen many examples of factual claims (propositions) and ways of
presenting evidence of their truth (proo
Library Preface
Preface
This electronic book is a one-semester course on Software Foundations - the mathematical theory of
programming and programming languages - suitable for graduate or upper-level
Library Poly
Poly: Polymorphism and Higher-Order
Functions
Require Export Lists.
Polymorphism
Polymorphic Lists
Up to this point, we've been working with lists of numbers. Of course, interesting progr
Library PE
PE: Partial Evaluation
Equiv.v introduced constant folding as an example of a program transformation and proved that it
preserves the meaning of the program. Constant folding operates on ma
Library Norm
Norm: Normalization of STLC
Require Import Stlc.
(This chapter is optional.) In this chapter, we consider another fundamental theoretical property of the
simply typed lambda-calculus: the
Library MoreStlc
MoreStlc: More on the Simply Typed LambdaCalculus
Require Export Stlc.
Simple Extensions to STLC
The simply typed lambda-calculus has enough structure to make its theoretical properti
Library Logic
Logic: Logic in Coq
Require Export "Prop".
Coq's built-in logic is extremely small: only Inductive definitions, universal quantification ( ), and
implication () are primitive, while all
Library Lists
Lists: Working with Structured Data
The next line imports all of our definitions from the previous chapter.
Require Export Basics.
For it to work, you need to use coqc to compile Basics.
Library LibTactics
LibTactics: A Collection of Handy GeneralPurpose Tactics
This file contains a set of tactics that extends the set of builtin tactics provided with the standard
distribution of Coq.
Software Foundations
Benjamin C. Pierce Chris Casinghino Michael Greenberg Ctlin Hricu Vilhelm Sjberg Brent
Yorgey
with Loris d'Antoni, Andrew W. Appel, Arthur Chargueraud, Anthony Cowley, Jeffrey Fos
Library ImpParser
ImpParser: Lexing and Parsing in Coq
The development of the Imp language in Imp.v completely ignores issues of concrete syntax - how an
ascii string that a programmer might write get
Library ImpCEvalFun
ImpCEvalFun: Evaluation Function for Imp
Evaluation Function
Require Import Imp.
Here's a first try at an evaluation function for commands, omitting WHILE.
Fixpoint ceval_step1 (st
Library Imp
Imp: Simple Imperative Programs
In this chapter, we begin a new direction that will continue for the rest of the course. Up to now we've
been mostly studying Coq itself, but from now on we
Library HoareList
HoareList: Hoare Logic with Lists
Require Export SfLib.
Imp Programs with Lists
There are only so many numeric functions with interesting properties that have simple proofs. (Of cour
Library HoareAsLogic
HoareAsLogic: Hoare Logic as a Logic
Require Export Hoare.
The presentation of Hoare logic in chapter Hoare could be described as "model-theoretic": the proof rules
for each of th