01 Logistics Logic
01 Logistics Logic
Propositional Logic
Computing I
Lecture 1
Outline
If you’re comfortable (and have the wifi) to turn on your video please do
Nodding/confused looks/glazed over eyes help me know if I said something super
confusing.
We’ll talk through syllabus details as they become relevant, only a few
highlights today…
Textbook
We’ll have occasional pre- or post-lecture readings. All required readings will
be available on the webpage.
Asking you questions like “what time zone are you in?”
This will help us schedule office hours, connect people who might want
study groups, etc.
"when people said form study groups they meant form study groups“
--Chloe Dolese Mandeville, CSE advisor
CSE 390Z
CSE 390Z is a workshop designed to provide academic support to students
enrolled concurrently in CSE 311. During each 1.5-hour workshop, students
will reinforce concepts through:
•collaborative problem solving
•practice study skills and effective learning habits
•build community for peer support
All students enrolled in CSE 311 are welcome to register for this class.If you
are interested in receiving an add code, please fill out a form here. If you
have any questions or concerns please contact Rob ([email protected]).
We’re in a pandemic…
…this just isn’t normal.
This probably isn’t how you envisioned
Your first quarter in CSE
Your first quarter at UW
Programming Theory
CSE 14x
Symbolic Logic will let us mechanically simplify expressions and make arguments.
The new language will let us focus on the (sometimes familiar, sometimes unfamiliar)
rules of logic.
Once we have those rules down, we’ll be able to apply them “intuitively” and won’t need
the symbolic representation as often
but we’ll still go back to it when things get complicated.
Propositions: building blocks of logic
Proposition
A statement that has a truth value (i.e. is true or
false) and is “well-formed”
Propositions are the basic building blocks in symbolic logic.
Here are two propositions.
All cats are mammals
True, (and a proposition)
All mammals are cats
False, but is well-formed and has a truth value, so still a proposition.
Analogy
In 142/143 you talked about a variable type that could be either true or false.
&&
||
!
Logical Connectives
And (&&) works exactly like it did in code.
But with a different symbol
Or (||) works exactly like it did in code.
But with a different symbol
Not (!)works exactly like it did in code.
But with a different symbol
Some Truth Tables
p p p q pq
p q pq
Truth tables are the simplest way to describe how logical connectives operate.
Some Truth Tables
p p p q pq
T T T
T F
T F F
F T
F T F
F F F
p q pq
T T T
T F T
F T T
F F F
Truth tables are the simplest way to describe how logical connectives operate.
Implication
Another way to connect propositions
If then .
p q pq
The first two lines should match your T T T
intuition.
T F F
The last two lines are called “vacuous F T T
truth.” For now, they’re the definition.
F F T
We’ll explain why in a few lectures.
This is the definition of implication.
When you write “if…then…” in a piece of
mathematical English, this is how you will
be interpreted.
Implication (
Only the first is useful to you when you see the sun come out.
Only the second is useful if you forgot your umbrella.
𝑝 → 𝑞
p q pq
Implication:
T T T
p implies q
T F F
whenever p is true q must be true F T T
if p then q F F T
q if p
p is sufficient for q
p only if q
q is necessary for p
Is this a proposition?
In particular, is it true?
A Compound Proposition
“Robbie knows the Pythagorean Theorem if he is a
mathematician and took geometry, and he is a
mathematician or did not take geometry.”
We’d like to understand what this proposition means.
First find the simplest (atomic) propositions:
“Robbie knows the Pythagorean Theorem”
“Robbie is a mathematician”
“Robbie took geometry”
( if ( and )) and ( or (not ))
( if ( )) ( ())
A Compound Proposition
“Robbie knows the Pythagorean Theorem if he is a
mathematician and took geometry, and he is a
mathematician or did not take geometry.”
“Robbie knows the Pythagorean
Theorem”
( if ( )) ( ()) “Robbie is a mathematician”
“Robbie took geometry”
Tomorrow:
Go to section
Soon:
Form a study group!