Predicates and Quantifiers

Lecture 8, DSCI 220, 2026W1

Announcements

  • EX1 is open — Thu 9/24 through Sun 9/27, self-scheduled in ORCA.
  • Office hours are now Tue 10:30–11:30, ICCS 233.
  • HW2 is released Sunday, due Sun Oct 4.

Three Endings

Contradiction

1 \(D\)
2 \(D \rightarrow \neg C\)
3 \(\neg C \wedge \neg B \rightarrow \neg E\)
4 \(\neg B\)
5 \(\neg G \vee \neg F\)
\(\therefore\) \(\neg E\)
Clause
1 \(\{D\}\)
2 \(\{\neg C,\ \neg D\}\)
3 \(\{B,\ C,\ \neg E\}\)
4 \(\{\neg B\}\)
5 \(\{\neg F,\ \neg G\}\)
6 \(\{E\}\)

Runs Out

1 \(\neg G\)
2 \(\neg G \rightarrow A\)
3 \(A \rightarrow \neg B\)
4 \(D \rightarrow C\)
\(\therefore\) \(D\)
Clause
1 \(\{\neg G\}\)
2 \(\{A,\ G\}\)
3 \(\{\neg A,\ \neg B\}\)
4 \(\{C,\ \neg D\}\)
5 \(\{\neg D\}\)

Stalls

1 \(\neg A\)
2 \(\neg A \rightarrow C\)
3 \(\neg B \vee \neg E\)
4 \(F \vee \neg G\)
5 \(\neg B \wedge F \rightarrow \neg D\)
\(\therefore\) \(\neg D\)
Clause
1 \(\{\neg A\}\)
2 \(\{A,\ C\}\)
3 \(\{\neg B,\ \neg E\}\)
4 \(\{F,\ \neg G\}\)
5 \(\{B,\ \neg D,\ \neg F\}\)
6 \(\{D\}\)

Predicates


\(p\): ___________ ate cereal for breakfast.


We may want to apply the statement to many students, so we define a predicate.


  • \(P(x)\): \(x\) ate cereal for breakfast.

  • \(x\) can be instantiated to a particular student, or an arbitrary one.

  • \(P(\underline{\hspace{2em}})\) is a proposition.

Cereal

Boolean Masks

Select all the cereals with at least 4 units of protein and no more than 6 units of sugars.

Quantifiers

Quantified Predicates

Consider the predicate

       \(H(x)\): \(x\) is a hero

Is this a proposition? ______


We add a quantifier to bind the variable:


  \(\forall\)   “for every”, “for all”
  \(\exists\)   “there exists”, “there is at least one”


       \(\forall x\, H(x)\)    \(\exists x\, H(x)\)


Now? ______

Counterexample

Someone says “all comedians are funny,” and you disagree.


       \(\forall x,\ C(x) \rightarrow F(x)\)

Refute by negating:

       \(\neg\forall x,\ C(x) \rightarrow F(x)\)
     \(\equiv \exists x,\ \neg(C(x) \rightarrow F(x))\)
     \(\equiv \exists x,\ \neg(F(x) \vee \neg C(x))\)
     \(\equiv \exists x,\ \neg F(x) \wedge C(x)\)

Your immediate response: ______________________


This evidence of refutation is called a _______________.

Witness

Someone says “there is a funny comedian,” and you disagree.


       \(\exists x,\ C(x) \wedge F(x)\)


Their immediate response: ______________________


This evidence of justification is called a _______________.


Aside: why not \(\exists x,\ C(x) \rightarrow F(x)\)?

Words and Ideas

Predicate, instantiation

Free and bound variables

Domain

\(\forall\), \(\exists\)

Counterexample, witness