This course provides a mathematical foundation for subsequent study in Computer Science, as well as developing the skills necessary to solve practical problems. CSE 191 is intended to give students a basic facility with logic and proof theory, counting, and graph theory, which serve as the basis for much of Computer Science.
Instructor | Matthew G. Knepley |
Class times | 9:30am to 10:50am on Tuesday & Thursday |
Location | Knox 104 |
A course overview and grading policy are available in accordance with Buffalo academic policy.
Class notes have been prepared for each class, and the lecture will follow the notes. Extensive class notes are also available from the Fall 2017 section of this course. Students may read over the class notes prior to attending lecture, but it may deviate from the notes somewhat.
An alternative text is Mathematics for Computer Science by Eric Lehman, F Thomson Leighton, and Albert R Meyer. The Software Foundations books are also very helpful for working with Coq. In addition, there are some excellent papers about the Curry-Howard Isomorphism
All homework will be submitted to the Autograder system. Two kinds of assignments will be given. Written assignments, which the students will turn in as PDF or scanned image files, and Proof assignments, which will be submitted as Coq files. The written assignments will be denoted with a w, such as Assignment 0w. For all proof questions, you must submit a valid constructive proof. You may not use the following tactics:
except if otherwise indicated in the problem statement. Assignments using these prohibited tactics will be given a zero score. You are encouraged to use the ring tactic and the tactics suggested specifically in the problems.
In the event of the closure of classrooms, CSE 191 will be carried out via distance learning. This is a summary of the course changes which would follow. If you have any questions after reading, please direct them to the Piazza page or to my email. The Syllabus schedule will remain unchanged, meaning the course will cover the same topics, with the same assigned reading and homework. Students will still turn in homework using Autograder as we have previously. Lectures will now be recorded and viewable via the Panopto system, and lecture URLs will be posted on the course webpage. Questions will still be principally answered on Piazza. Office hours will be held using Zoom. The final exam would not be given in-person, but rather be a take-home exam. Students may use any resources at their disposal (books, notes, videos) but may not collaborate with each other. Students will be given 24 hours to complete the exam, and it will be turned in via Autograder just as the homework.
We will go over the course overview and syllabus. I will answer student questions about the course procedures and material. I will also introduce the proof assistant.
Assignment 0w, Due 2/6
This assignment prepares the student to generate PDF homework and turn it in electronically.
Online resources
We discuss propositions, operators, and the propositional calculus.
Online resources
We discuss Coq and the automation of proofs in propositional calculus
Online resources
Assignment 0, Due 2/13
This assignment prepares the student to generate Coq homework and turn it in electronically.
We discuss proving logical equivalence and introduce the proof assistant Coq.
We discuss introduction and elimination rules for propositional calculus.
Online resources
Assignment 1, Due 2/27
This assignment covers proofs in propositional logic and proof automation.
We demonstrate proof tactics on a number of examples, and relate the proof to the traditional method.
Online resources
We introduce predicates and quantifiers, the basis of Predicate Logic. We prove statements in Predicate Logic using Coq, and the contraposition and contradiction proof techniques.
Assignment 2, Due 3/7
This assignment covers predicate logic and the contraposition and contradiction proof techniques.
We review finite and infinite inductive types and the associated induction theorems.
Online resources
We define sets and set operations, and compare set theory to type theory. We also discuss Russell’s Paradox.
Assignment 3a, Due 3/28
This assignment covers sets, relations, and functions.
We define the power set and review diagonal arguments. We prove Cantor’s Theorem that the power set is always larger than the original set.
We define relations and their graphs.
Assignment 3b, Due 4/4
This assignment covers sets, relations, and functions.
We define functions and function predicates in Coq.
We define functions and function types.
We will prove many function-theoretic identities.
Review proof tactics and their use in Coq.
Review putting proofs in files and automating the deduction.
We go over elementary proofs, both by hand and using the proof assistant. We also look at induction proofs that go beyond the basic examples, incorporating inequalities and auxiliary variables.
Assignment 4, Due 4/18
This assignment covers proofs by induction.
We cover proofs using strong induction with examples.
We present an inductive type for lists, and prove several properties of the type.
We use induction on recursive inductive types to prove statements about even and odd numbers.
We introduce the inductive construction of positive natural numbers and integers, review notation and vocabulary, and introduce modular rings.
Assignment 5, Due 4/25
This assignment covers modular arithmetic.
We review several proofs about divisibility and induction on integers.
We define the GCD, using several equivalent definitions, review its properties, and prove Bezout’s Theorem. In the next video, we do some short proofs using the GCD.
Assignment 5w, Due 5/2
This assignment covers modular arithmetic.
We examine the Euclidean Algorithm and the Extended Euclidean Algorithm.
We prove the Fundamental Theorem of Arithmetic and the Chinese Remainder Theorem.
We prove correctness and a complexity bound for Euclid’s Algorithm.
Students review proof tactics and using the proof assistant to verify proofs.
Students work on Euclid’s algorithm assignment.
We review the course.