DSCI 220, 2025 W1
September 8, 2025
Rand WFF Apply rule on line:
Rand atom Atom becomes:
Example derivation:
<wff>
Grammars can be used to construct many different kinds of sequences.
We could have included additional operators \(\rightarrow\), \(\leftrightarrow\), \(\oplus\), \(\uparrow\)
Computational evaluation of <wff>
is covered in DSCI221. For now, we trust Python and focus on logic.
The <wff>
are propositions.
Which of these are WFFs?
03:00
Theorem: \(\neg (p ∨ q))\) is not a WFF.
Proof:
A proposition is a statement that can be either True or False.
Examples:
\(37 > 12\)
Fewer than 5 people in this room feel sleepy.
There are extra-terrestrial life forms.
This statement is False.
\(\underline{\hspace{10em}}\)
From English to logic and back…
\(p\): ___________ ate cereal for breakfast.
\(q\): ___________ brought a backpack to class.
\((p\lor q)\)
\((p\wedge q)\)
\(\neg q\)
\(p\): ___________ ate cereal for breakfast.
We may want to apply the statement to many students, in which case we define a Predicate.
\(P(x)\): \(x\) ate cereal for breakfast.
\(x\) can be instantiated to be a particular student, or an arbitrary student.
\(P(\underline{\hspace{2em}} )\) is a proposition.
Ex: Is it true that \((p \lor q) \equiv (q\lor p)\) ?
Discussion points:
\(\equiv\) means logically equivalent
The answer had better be _________!!!
How can we justify our instinct?
Select all the cereals with at least 4 units of protein and no more than 6 units of sugars.
“Select all the cereals with at least 4 units of protein and no more than 6 units of sugars.”
\(p\): a cereal has less than 4 units of protein
\(q\): a cereal has more than 6 units of sugars
We suspect that \(\neg p\wedge \neg q \equiv \neg( p\lor q)\):
\(p\) | \(q\) | \(\neg p\wedge \neg q\) |
---|---|---|
F | F | |
F | T | |
T | F | |
T | T |
\(p\) | \(q\) | \(\neg( p\lor q)\) |
---|---|---|
F | F | |
F | T | |
T | F | |
T | T |
All graded learning activities in the course will use a tool called PrairieLearn.
Navigate to Activity 1 and complete question 2. Each of you will receive a different version of the problem. Work together in pairs to solve each person’s version.
https://us.prairielearn.com/pl/course_instance/186238/assessment/2562335
Connect operator \(\rightarrow\) to a logically equivalent expression using only and, or, and not.
\(p\) | \(q\) | \(p\rightarrow q\) | \(\underline{\hspace{3em}}\) |
---|---|---|---|
F | F | T | |
F | T | T | |
T | F | F | |
T | T | T |
Is this operator commutative?
Note: \(p \rightarrow q \equiv\) _______.
\(p \rightarrow q\) Corresponds to “if \(p\) then \(q\)”
Gives us mechanism for reasoning!
Suppose \(p\equiv\) T . Then \(p\) is a Tautology.
Suppose \(p\equiv\) F . Then \(p\) is a Contradiction.
link to PL question
Grammar
Predicate
Boolean Mask
Logical Equivalence
Implication