Slides 04
Slides 04
Part Two
Recap from Last Time
Recap So Far
●
A propositional variable is a variable that is
either true or false.
●
The propositional connectives are as follows:
●
Negation: ¬p
●
Conjunction: p ∧ q
●
Disjunction: p ∨ q
●
Implication: p → q
●
Biconditional: p ↔ q
●
True: ⊤
●
False: ⊥
Take out a sheet of paper!
What's the truth table for the → connective?
What's the negation of p → q?
New Stuf!
First-Order Logic
What is First-Order Logic?
●
First-order logic is a logical system for
reasoning about properties of objects.
●
Augments the logical connectives from
propositional logic with
●
predicates that describe properties of
objects,
●
functions that map objects to one another,
and
●
quantifers that allow us to reason about
multiple objects.
Some Examples
Likes(You, Eggs) ∧ Likes(You, Tomato) → Likes(You, Shakshuka)
These
These blue
blue terms
terms are
are called
called
constant
constant symbols.
symbols. Unlike
Unlike
propositional
propositional variables,
variables, they
they
refer
refer to
to objects,
objects, not
not
propositions.
propositions.
Likes(You, Eggs) ∧ Likes(You, Tomato) → Likes(You, Shakshuka)
The
The red
red things
things that
that look
look
like
like function
function calls
calls are
are called
called
predicates.
predicates. Predicates
Predicates take
take
objects
objects as
as arguments
arguments and
and
evaluate
evaluate to
to true
true or
or false.
false.
Likes(You, Eggs) ∧ Likes(You, Tomato) → Likes(You, Shakshuka)
What
What remains
remains are
are traditional
traditional propositional
propositional
connectives.
connectives. Because
Because each
each predicate
predicate
evaluates
evaluates to
to true
true or
or false,
false, we
we can
can
connect
connect the
the truth
truth values
values of
of predicates
predicates
using
using normal
normal propositional
propositional connectives.
connectives.
Reasoning about Objects
●
To reason about objects, frst-order logic uses
predicates.
●
Examples:
Cute(Quokka)
ArgueIncessantly(Democrats, Republicans)
●
Applying a predicate to arguments produces a
proposition, which is either true or false.
●
Typically, when you’re working in FOL, you’ll
have a list of predicates, what they stand for, and
how many arguments they take. It’ll be given
separately than the formulas you write.
First-Order Sentences
●
Sentences in frst-order logic can be
constructed from predicates applied to objects:
Cute(a) → Dikdik(a) ∨ Kitty(a) ∨ Puppy(a)
Succeeds(You) ↔ Practices(You)
x < 8 → x < 137
The
The less-than
less-than sign
sign isis Numbers
Numbers areare not
not “built
“built
just
just another
another predicate. in”
predicate. in” to
to frst-order
frst-order
Binary
Binary predicates
predicates are logic.
are logic. They’re
They’re constant
constant
sometimes
sometimes written
written inin symbols
symbols just
just like
like “You”
“You”
infix
infix notation
notation this
this way. and
way. and “a”
“a” above.
above.
Equality
●
First-order logic is equipped with a special
predicate = that says whether two objects are
equal to one another.
●
Equality is a part of frst-order logic, just as →
and ¬ are.
●
Examples:
TomMarvoloRiddle = LordVoldemort
MorningStar = EveningStar
●
Equality can only be applied to objects; to
state that two propositions are equal, use ↔.
Let's see some more examples.
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
These
These purple
purple terms
terms are
are
functions.
functions. Functions
Functions take
take
objects
objects as
as input
input and
and
produce
produce objects
objects asas output.
output.
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
FavoriteMovieOf(You) ≠ FavoriteMovieOf(Date) ∧
StarOf(FavoriteMovieOf(You)) = StarOf(FavoriteMovieOf(Date))
Functions
●
First-order logic allows functions that return
objects associated with other objects.
●
Examples:
ColorOf(Money)
MedianOf(x, y, z)
x+y
●
As with predicates, functions can take in any
number of arguments, but always return a single
value.
●
Functions evaluate to objects, not propositions.
Objects and Predicates
●
When working in frst-order logic, be
careful to keep objects (actual things) and
predicates (true or false) separate.
●
You cannot apply connectives to objects:
⚠ Venus → TheSun ⚠
●
You cannot apply functions to
propositions:
⚠ StarOf(IsRed(Sun) ∧ IsGreen(Mars)) ⚠
●
Ever get confused? Just ask!
The Type-Checking Table
Connectives
propositions a proposition
(↔, ∧, etc.) …
Predicates
objects a proposition
(=, etc.) …
R(y) →→ ((S(x,
R(y) S(x,y) T(x)))
y)==T(x)
Assuming
Assumingthat
thatthis
thisformula
formulaisissyntactically
syntacticallycorrect,
correct,
which
whichofofR,
R,S,
S,and arepredicates
andTTare predicatesand andwhich
whicharearefunctions?
functions?
A.
A. RRisisaapredicate,
predicate, SSisisaapredicate,
predicate, andTTisisaapredicate.
and predicate.
B.
B. RRisisaapredicate,
predicate, SSisisaapredicate,
predicate, and T is a function.
and T is a function.
C.
C. RRisisaapredicate,
predicate, SSisisaafunction,
function, andTTisisaapredicate.
and predicate.
D.
D. RRisisaapredicate,
predicate, SSisisaafunction,
function, and T is a function.
and T is a function.
E.
E. RRisisaafunction,
function, SSisisaapredicate,
predicate, andTTisisaapredicate.
and predicate.
F.F. RRisisaafunction,
function, SSisisaapredicate,
predicate, andTTisisaafunction.
and function.
G.
G. RRisisaafunction,
function, SSisisaafunction,
function, and T is a predicate.
and T is a predicate.
H.
H. RRisisaafunction,
function, SSisisaafunction,
function, andTTisisaafunction.
and function.
Answer atPollEv.com/cs103
Answerat PollEv.com/cs103or or
textCS103
text to22333
CS103to 22333once
onceto
tojoin, thenA,
join,then A,B,
B,C,
C,…, orH.
…,or H.
One last (and major) change
Some muggle is intelligent.
Some muggle is intelligent.
∃∃ isis the
the existential
existentialquantifer
quantifer
and
and sayssays “for
“for some
some choice
choice of
of
m,
m, the
the following
following isis true.”
true.”
The Existential Quantifer
●
A statement of the form
∃x. some-formula
is true if, for some choice of x, the
statement some-formula is true when that
x is plugged into it.
●
Examples:
∃x. (Even(x) ∧ Prime(x))
∃x. (TallerThan(x, me) ∧ LighterThan(x, me))
(∃w. Will(w)) → (∃x. Way(x))
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
Since
SinceSmiling(x)
Smiling(x)
isistrue
truefor
forsome
some
choice
choice of x,this
of x, this
statement
statement
evaluates
evaluatesto totrue.
true.
∃x. Smiling(x)
The Existential Quantifer
Since
SinceSmiling(x)
Smiling(x)
isistrue
truefor
forsome
some
choice
choice of x,this
of x, this
statement
statement
evaluates
evaluatesto totrue.
true.
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
∃x. Smiling(x)
The Existential Quantifer
Since
SinceSmiling(x)
Smiling(x)isis
not
nottrue
truefor
forany
any
choice of x, this
choice of x, this
statement
statementevaluates
∃x. Smiling(x) to
evaluates
false.
to false.
The Existential Quantifer
Since
SinceSmiling(x)
Smiling(x)isis
not
nottrue
truefor
forany
any
choice of x, this
choice of x, this
statement
statementevaluates
∃x. Smiling(x) to
evaluates
false.
to false.
In
Inthis
thisworld,
world,this
The Existential Quantifer
this
frst-order logic
frst-order logic
statement
statementis…
is…
A.
A.……true.
true.
B. … false.
B. … false.
C.
C.……neither
neithertrue
truenor
norfalse.
false.
Answer atPollEv.com/cs103
Answerat PollEv.com/cs103or or
textCS103
text to22333
CS103to 22333once
onceto
tojoin, thenA,
join,then A,B, orC.
B,or C.
(∃x. Smiling(x)) → (∃y. WearingHat(y))
The Existential Quantifer
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thisoverall
overall
statement
statementtruetrueor
or
false?
false?
IsIsthis
thisoverall
overall
statement
statementtruetrueor
or
false?
false?
∃x. Smiling(x)
Fun with Edge Cases
Existentially-quantifed
Existentially-quantifed
statements
statementsare
arefalse
falseininan
anempty
empty
world,
world, since it’s not possibleto
since it’s not possible to
choose an object!
choose an object!
∃x. Smiling(x)
Some Technical Details
Variables and Quantifers
●
Each quantifer has two parts:
●
the variable that is introduced, and
●
the statement that's being quantifed.
●
The variable introduced is scoped just to
the statement being quantifed.
(∃x. Loves(You, x)) ∧ (∃y. Loves(y, You))
Variables and Quantifers
●
Each quantifer has two parts:
●
the variable that is introduced, and
●
the statement that's being quantifed.
●
The variable introduced is scoped just to
the statement being quantifed.
(∃x. Loves(You, x)) ∧ (∃y. Loves(y, You))
The variable xx
The variable The variable yy
The variable
just
just lives
lives here.
here. just
just lives
lives here.
here.
Variables and Quantifers
●
Each quantifer has two parts:
●
the variable that is introduced, and
●
the statement that's being quantifed.
●
The variable introduced is scoped just to
the statement being quantifed.
(∃x. Loves(You, x)) ∧ (∃y. Loves(y, You))
Variables and Quantifers
●
Each quantifer has two parts:
●
the variable that is introduced, and
●
the statement that's being quantifed.
●
The variable introduced is scoped just to
the statement being quantifed.
(∃x. Loves(You, x)) ∧ (∃x. Loves(x, You))
Variables and Quantifers
●
Each quantifer has two parts:
●
the variable that is introduced, and
●
the statement that's being quantifed.
●
The variable introduced is scoped just to
the statement being quantifed.
(∃x. Loves(You, x)) ∧ (∃x. Loves(x, You))
The variable xx
The variable AA different
different variable,
variable,
just
just lives
lives here.
here. also named x,
also named x, just
just
lives
lives here.
here.
Operator Precedence (Again)
●
When writing out a formula in frst-order logic,
quantifers have precedence just below ¬.
●
The statement
∃x. P(x) ∧ R(x) ∧ Q(x)
is parsed like this:
(∃x. P(x)) ∧ (R(x) ∧ Q(x))
●
This is syntactically invalid because the variable x is
out of scope in the back half of the formula.
●
To ensure that x is properly quantifed, explicitly put
parentheses around the region you want to quantify:
∃x. (P(x) ∧ R(x) ∧ Q(x))
“For any natural number n,
n is even if n2 is even”
“For any natural number n,
n is even if n2 is even”
∀∀ isis the
the universal
universalquantifer
quantifer
and
and says
says “for
“for any
any choice
choice of
of n,
n,
the
the following
following isis true.”
true.”
The Universal Quantifer
●
A statement of the form
∀x. some-formula
is true if, for every choice of x, the statement
some-formula is true when x is plugged into it.
●
Examples:
∀p. (Puppy(p) → Cute(p))
∀m. (IsMillennial(m) → IsSpecial(m))
Tallest(SultanKösen) →
∀x. (SultanKösen ≠ x → ShorterThan(x, SultanKösen))
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
Since
SinceSmiling(x)
Smiling(x)
isistrue
truefor
forevery
every
choice
choice of x,this
of x, this
statement
statement
evaluates
evaluatesto totrue.
true.
∀x. Smiling(x)
The Universal Quantifer
Since
SinceSmiling(x)
Smiling(x)
isistrue
truefor
forevery
every
choice
choice of x,this
of x, this
statement
statement
evaluates
evaluatesto totrue.
true.
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
∀x. Smiling(x)
The Universal Quantifer
Since
SinceSmiling(x)
Smiling(x)isis
false
falseforforthis
thischoice
choice
x,x,this statement
this statement
evaluates
evaluatesto tofalse.
∀x. Smiling(x) false.
The Universal Quantifer
Since
SinceSmiling(x)
Smiling(x)isis
false
falseforforthis
thischoice
choice
x,x,this statement
this statement
evaluates
evaluatesto tofalse.
∀x. Smiling(x) false.
The Universal Quantifer
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thispart
partofofthe
the
statement
statement trueor
true or
false?
false?
IsIsthis
thisoverall
overall
statement
statementtrue trueor
or
false in this
false in this
scenario?
scenario?
IsIsthis
thisoverall
overall
statement
statementtrue trueor
or
false in this
false in this
scenario?
scenario?
∀x. Smiling(x)
Fun with Edge Cases
Universally-quantifed
Universally-quantifed
statements arevacuously
statementsare vacuouslytrue
true
ininempty worlds.
empty worlds.
∀x. Smiling(x)
Time-Out for Announcements!
Problem Set Two
●
Problem Set One was due today at 2:30PM.
●
Want to use your late days? You can submit up to
2:30PM on Sunday.
●
Remember that late days are 24-hour extensions, so
submitting on Sunday would use two late days.
●
Problem Set Two goes out today.
●
Checkpoint assignment is due Monday at 2:30PM.
●
Remaining problems are due next Friday at 2:30PM.
●
Play around with propositional and frst-order logic and
sharpen your proofwriting skills!
Problem Set Two
●
A few of the questions on PS2 require
topics we haven’t covered yet. They’re
explicitly marked as such.
●
Want to start early? The Guide to
Negations and Guide to First-Order
Translations cover everything you need.
Back to CS103!
Translating into First-Order Logic
Translating Into Logic
●
First-order logic is an excellent tool for
manipulating defnitions and theorems to
learn more about them.
●
Need to take a negation? Translate your
statement into FOL, negate it, then
translate it back.
●
Want to prove something by contrapositive?
Translate your implication into FOL, take
the contrapositive, then translate it back.
Translating Into Logic
●
Translating statements into frst-order
logic is a lot more dificult than it looks.
●
There are a lot of nuances that come up when
translating into frst-order logic.
●
We'll cover examples of both good and bad
translations into logic so that you can learn
what to watch for.
●
We'll also show lots of examples of
translations so that you can see the process
that goes into it.
Using the predicates
Which
Whichof ofthese
thesefrst-order
frst-orderlogic
logicstatements
statementsisisaaproper
propertranslation?
translation?
A.
A. ∃p.
∃p.(Puppy(p)
(Puppy(p)∧∧Cute(p))
Cute(p))
B.
B. ∃p.
∃p.(Puppy(p)
(Puppy(p)→→Cute(p))
Cute(p))
C.
C. ∀p.
∀p.(Puppy(p)
(Puppy(p)∧∧Cute(p))
Cute(p))
D.
D. ∀p.
∀p.(Puppy(p)
(Puppy(p)→→Cute(p))
Cute(p))
E.
E. More
Morethan
thanone
oneofofthese.
these.
F.F. None
Noneofofthese.
these.
Answer atPollEv.com/cs103
Answerat PollEv.com/cs103or or
textCS103
text to22333
CS103to 22333once
onceto
tojoin, thenA,
join,then A,B,
B,C,
C,D,
D,E, orF.
E,or F.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
An Incorrect Translation
AA statement
statement of
of the
the form
form
∀x. something
∀x. something
isis true
true only
only when
when
something
something isis true
true for
for
every
every choice
choice of
of x.
x.
An Incorrect Translation
AA statement
statement of
of the
the form
form
∀x. something
∀x. something
isis true
true only
only when
when
something
something isis true
true for
for
every
every choice
choice of
of x.
x.
An Incorrect Translation
This
This frst-order
frst-order statement
statement
isis false
false even
even though
though the
the
English
English statement
statement isis true.
true.
Therefore,
Therefore, itit can't
can't bebe aa
correct
correct translation.
translation.
An Incorrect Translation
The
The issue
issue here
here isis that
that this
this
statement
statement asserts
asserts that
that
everything
everything isis aa puppy.
puppy.
That's
That's too
too strong
strong of of aa
claim
claim to
to make.
make.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
This
This should
should work
work
for any
for any choice
choice of
of
x,
x, including
including things
things
that
that aren't
aren't puppies.
puppies.
A Better Translation
AA statement
statement of
of the
the form
form
∀x. something
∀x. something
isis true
true only
only when
when
something
something isis true
true for
for
every
every choice
choice of
of x.
x.
A Better Translation
AA statement
statement of
of the
the form
form
∀x. something
∀x. something
isis true
true only
only when
when
something
something isis true
true for
for
every
every choice
choice of
of x.
x.
“All P's are Q's”
translates as
If
If xx isis aa counterexample,
counterexample, itit
must
must have
have property
property PP but
but
not
not have
have property
property Q.
Q.
Using the predicates
Which
Whichof
ofthese
thesefrst-order
frst-orderlogic
logicstatements
statementsisisaaproper
propertranslation?
translation?
A.
A. ∃b.
∃b.(Blobfsh(b)
(Blobfsh(b)∧∧Cute(b))
Cute(b))
B.
B. ∃b.
∃b.(Blobfsh(b)
(Blobfsh(b)→→Cute(b))
Cute(b))
C.
C. ∀b.
∀b.(Blobfsh(b)
(Blobfsh(b)∧∧Cute(b))
Cute(b))
D.
D. ∀b.
∀b.(Blobfsh(b)
(Blobfsh(b)→→Cute(b))
Cute(b))
E.
E. More
Morethan
thanone
oneofofthese.
these.
F.F. None
Noneofofthese.
these.
Answer atPollEv.com/cs103
Answerat PollEv.com/cs103or or
textCS103
text to22333
CS103to 22333once
onceto
tojoin, thenA,
join,then A,B,
B,C,
C,D,
D,E, orF.
E,or F.
An Incorrect Translation
AA statement
statement of
of the
the form
form
∃x. something
∃x. something
isis true
true only
only when
when
something
something isis true
true for
for
at
at least
least one
one choice
choice of
of x.
x.
An Incorrect Translation
AA statement
statement of
of the
the form
form
∃x. something
∃x. something
isis true
true only
only when
when
something
something isis true
true for
for
at
at least
least one
one choice
choice of
of x.
x.
An Incorrect Translation
This
This frst-order
frst-order statement
statement
isis true
true even
even though
though the
the
English
English statement
statement isis false.
false.
Therefore,
Therefore, itit can't
can't be be aa
correct
correct translation.
translation.
An Incorrect Translation
The
The issue
issue here
here isis that
that
implications
implications are
are true
true whenever
whenever
the
the antecedent
antecedent isis false.
false. This
This
statement
statement “accidentally”
“accidentally” isis true
true
because
because ofof what
what happens
happens when
when
xx isn't
isn't aa blobfsh.
blobfsh.
A Correct Translation
AA statement
statement of
of the
the form
form
∃x. something
∃x. something
isis true
true only
only when
when
something
something isis true
true for
for
at
at least
least one
one choice
choice of
of x.
x.
A Correct Translation
AA statement
statement of
of the
the form
form
∃x. something
∃x. something
isis true
true only
only when
when
something
something isis true
true for
for
at
at least
least one
one choice
choice of
of x.
x.
“Some P is a Q”
translates as
If
If xx isis an
an example,
example, itit must
must
have
have property
property PP onon top
top of
of
property
property Q.
Q.
Good Pairings
●
The ∀ quantifer usually is paired with →.
∀x. (P(x) → Q(x))
●
The ∃ quantifer usually is paired with ∧.
∃x. (P(x) ∧ Q(x))
●
In the case of ∀, the → connective prevents the
statement from being false when speaking about some
object you don't care about.
●
In the case of ∃, the ∧ connective prevents the
statement from being true when speaking about some
object you don't care about.
Next Time
●
First-Order Translations
●
How do we translate from English into frst-order logic?
●
Quantifer Orderings
●
How do you select the order of quantifers in frst-order
logic formulas?
●
Negating Formulas
●
How do you mechanically determine the negation of a
frst-order formula?
●
Expressing Uniqueness
●
How do we say there’s just one object of a certain type?