From the course catalog:

A combined course on functional programming and formal proof. Students write programs over a variety of data structures, proving their programs correct with respect to precise logical specifications. Programming topics (and proof topics) range over: recursion (induction); combinatorics; algebraic data types, from lists to trees to abstract syntax trees (structural induction); parsers and interpreters (soundness properties); regular expressions (set theory and language theory).

Prerequisites: CSCI051 PO or equivalent (e.g., 4 or 5 on AP CS exam). Please see the syllabus for more information.

### Textbook

We’ll be using an experimental new volume of Software Foundations, which we're calling for now Discrete Math in Coq. Name suggestions are welcome!

# Lectures

Date Lecture Notes
1 Jan. 21 Basics (Formal) (.v file) (Informal)
2 Jan. 23 Basics Truth tables practice sheet
3 Jan. 28 Basics Basics (Formal) and (Informal) due Thursday at 1 PM
4 Jan. 30 Induction (Formal) (HTML) (.v file) (Informal) You can create a _CoqProject file with no file extension (in emacs might be easiest) with the contents `-Q . DMFP`, then automatic compilation should work next time you open Induction.v. If it doesn't, go ahead and open up Induction.v in Emacs. Now type `M-! coqc -Q . DMFP Basics.v RET`, i.e. use the `M-!` keyboard shortcut, then type `coqc -Q . DMFP Basics.v` and hit return.
5 Feb. 4 Induction Induction practice sheet
6 Feb. 6 Induction
7 Feb. 11 Induction
8 Feb. 13 Lists (Formal) (HTML) (.v file) (Informal .tex file) Induction (Formal) and (Informal) due at 1pm
9 Feb. 18 Lists
10 Feb. 20 Poly (Formal) (HTML) (.v file) (Informal .tex file)
11 Feb. 25 Poly Lists (Formal) and (Informal) due at 1pm
12 Feb. 27 Poly
13 Mar. 3 Tactics (Formal) (HTML) (.v file) (Informal .tex file)
14 Mar. 5 Tactics Poly (Formal) and (Informal) due at 1pm
15 Mar. 10 Review
16 Mar. 12 Midterm
Mar. 17 Spring break
Mar. 19 Spring break
17 Mar. 24 Spring break 2: Too Spring, Too Break
18 Mar. 26 Spring break 3: Pomona Drift
19 Mar. 31 Logic (Formal) (HTML) (.v file) (Informal .tex file) how to prove it sheet
20 Apr. 2 Logic Tactics (Formal) (.v file) and (Informal) due Friday at 7pm
21 Apr. 7 IndProp (Formal) (HTML) (.v file) (Informal .tex file)
22 Apr. 9 IndProp Logic (Formal) (.v file) and (Informal) due Friday at 7pm
23 Apr. 14 Sort (Formal) (HTML) (.v file)
24 Apr. 16 Sort IndProp (Formal) (.v file) and (Informal) due Friday at 7pm
25 Apr. 21 Combinatorics (Formal) (HTML) (.v file (just for reading!)) (Informal)
26 Apr. 23 Combinatorics Sort (Formal) (.v file) due at Friday at 7pm (no informal!)
27 Apr. 28 Countability
28 Apr. 30 Graphs Combo (Informal) due Friday at 7pm
29 May 5 Trees Discrete (Informal) due Friday at 7pm
Final May 13, 9am–9pm PT (GMT-07:00) Final Exam You will have twelve (12) hours to complete the final exam. It is open book. The exam is designed to take about 2.5 hours to complete. If alternate arrangements are necessary, you must contact us by Friday, May 9th. Students who do not turn in a final exam will be given an incomplete (I), which will turn into a "no record, pandemic" (NRP) if the course is not completed by the Fall.