CSE 311: Topics

1. Propositional Logic

Propositional Logic gives us tools for precisely describing and analyzing logical statements. In the first of many such connections, we will see that a proposition (logic) can be thought of as a circuit (computation) and vice versa!

Real-world problems are usually given to us in English. In order to apply our new tool, we must first “formalize” the problem by translating the statement into Propositional Logic. Then, we can mechanically write down a circuit that implements the statement or analyze it using a truth table.

2. Equivalence

In this topic, we will introduce a new way to compare propositions. Two propositions that are not the same can still be “equivalent”. In logic, this means that knowing one is true (or false) tells you that the other is true (or false). In computation, equivalent circuits correspond to different ways of computing the same thing.

We will learn two ways of determining whether propositions are equivalent. One is via a case analysis (truth tables). The other is via a “proof”, which is a sequence of simple steps each of which applies a well-known equivalence rule. Each approach provides us with unique advantages, so both are valuable.

  • Lecture slides
  • Section slides and worksheet (solution)
    • Note that the worksheet includes one problem on Topic 3 that was not covered in section. The problem and solution are included here to help with the similar Homework 2 problem.
  • Homework is included in Topic 3, below

3. Predicate Logic

In this topic, we extend the logic we learned in Topic 1, giving it the ability to talk about objects and their properties and to make claims about what facts hold for all, some, or no objects in a given domain. The result is called “Predicate Logic” (or “First-Order Logic”), and it is the logic in which most mathematics and computer science takes place.

  • Lecture slides
  • Homework 2 worksheet (solution). Change log:
    • Fixed broken part references showing up as "??".
    • Updated the point totals for tasks 1, 3, and 4.
    • Changed the suggested term to copy to “pqrs'” in Task 3 part (b)

4. Proofs

In this topic, we learn a new way to reason about facts in our two logics. Previously, we saw how to show that various facts are equivalent. Here, we will see how to infer new facts from known ones. This includes equivalence as a special case (when we can infer either fact from the other) but is vastly more powerful.

We will begin by writing our proofs formally, which makes them easy to check. Formal proofs are built up using inference rules, and we will learn rules for both Propositional and Predicate Logic. Finally, we will begin by learning how to write English proofs by translating our formal proofs into English. As the course continues, we aim to get more confortable writing proofs directly in English, without working formally.

  • Lecture slides
  • Section slides and worksheet (solution). Change log:
    • Added Task 7(b-c) and Task 8 that involve predicate logic proofs. We did not cover these in class, but these may be useful examples for Homework 3.
  • Homework 3 worksheet (solution). Change log:
    • Updated Task 2(c) to say that Double Negation is also allowed.
    • Updated Task 2(c) to say that Modus Ponens is not allowed.
    • Updated Task 7: references to "Problem 8" meant Task 7.

5. Number Theory

In the remainder of the course, we will look at different kinds of mathematical objects that show up frequently in computer science. In addition to learning about their properties, this will give us settings in which to practice the proof techniques we learned in Topic 4.

In this topic, we look at important properties of numbers. All data in a computer is stored as numbers and the only operations computers can do on their own are arithmetic calculations. For that reason, numbers arise everywhere in computer science, and we need to understand them well in order to make computers do interesting things for us.

  • Lecture slides
    • In lecture, we proved important properties of congruences in English. As an exercise, you can try formalizing them yourself in Cozy: worksheet (solution)
  • Section slides and worksheet (solution)
    • Video example of using Cozy for Task 2
    • Now includes problems on GCD, multiplicative inverses, and solving modular equations that were not covered last week.
  • Homework 4 worksheet (solution). Change Log:
    • Updated the hints for Task 4(b) to clarify that you should apply an equivalence after expanding the definition of Prime where it appears in the conclusion.
    • Updated the "apply" example syntax to include the theorem name.

6. Set Theory

The next application area we will study is set theory. Sets arise in almost every area of computer science. They also arise in practical programming. In Java, for example, Set and the closely related Map interfaces are two of the most widely used parts of the standard library. In this topic, after defining sets, we will look at important relationships sets can have with one another and important operations that can be performed on sets.

  • Lecture slides
  • Section slides and worksheet (solution). Change Log:
    • Added a problem on power sets and two problems on induction. Both topics will also be included in Homework 5.

7. Induction

In this topic, we learn our final inference rule. It takes advantages of the special structure of the natural numbers to allow us to prove for-all claims over the natural numbers in a new and interesting way.

8. Recursive Definitions

Next, we look at how to define more complex data and functions using recursion. Most interesting data and functions in computer science are defined this way. We will see numerous examples, both as part of this topic and later ones.

Whenever we meet new kinds of mathematical objects, we need to also learn appropriate ways to reason about them. For recursively defined data and functions, the most natural way to do so is using a new form of induction, called structural induction, which is one of the most widely used tools in CS.

9. Languages

In this topic, we begin our study of theoretical computer science by looking at two ways of defining “languages”, which are simply sets of strings. We will later connect these ways of defining languages to different types of computing machines, whereupon the fact that one way of defining languages has more expressive power tells us that one type of machine is more powerful than another.

  • Lecture slides (more coming soon)

More topics as the course continues...