mathematical logic - stanford...
TRANSCRIPT
![Page 1: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/1.jpg)
Mathematical LogicPart Three
![Page 2: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/2.jpg)
The Aristotelian Forms
“All As are Bs”
∀x. (A(x) → B(x))
“Some As are Bs”
∃x. (A(x) ∧ B(x))
“No As are Bs”
∀x. (A(x) → ¬B(x))
“Some As aren’t Bs”
∃x. (A(x) ∧ ¬B(x))
It is worth committing these patterns to memory. We’ll be using them throughout the
day and they form the backbone of many first-order logic translations.
It is worth committing these patterns to memory. We’ll be using them throughout the
day and they form the backbone of many first-order logic translations.
![Page 3: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/3.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
![Page 4: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/4.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
![Page 5: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/5.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
![Page 6: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/6.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
there is some person
![Page 7: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/7.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
there is some person
who isn't them
![Page 8: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/8.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “Everyone loves someone else.”
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
there is some person
who isn't them
that they love.
![Page 9: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/9.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
![Page 10: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/10.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
![Page 11: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/11.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
![Page 12: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/12.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
who everyone
![Page 13: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/13.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
who everyone
who isn't them
![Page 14: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/14.jpg)
Combining Quantifiers
● Most interesting statements in first-order logic require a combination of quantifiers.
● Example: “There is someone everyone else loves.”
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
who everyone
who isn't them
loves.
![Page 15: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/15.jpg)
For Comparison
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
who everyone
who isn't them
loves.
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
there is some person
who isn't them
that they love.
![Page 16: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/16.jpg)
Everyone Loves Someone Else
![Page 17: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/17.jpg)
Everyone Loves Someone Else
No one here is universally
loved.
No one here is universally
loved.
![Page 18: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/18.jpg)
There is Someone Everyone Else Loves
![Page 19: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/19.jpg)
There is Someone Everyone Else Loves
This person does not love anyone else.
This person does not love anyone else.
![Page 20: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/20.jpg)
Everyone Loves Someone Else andThere is Someone Everyone Else Loves
![Page 21: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/21.jpg)
∃p. (Person(p) ∧ ∀q. (Person(q) ∧ p ≠ q → Loves(q, p)))
There is some person
who everyone
who isn't them
loves.
∀p. (Person(p) → ∃q. (Person(q) ∧ p ≠ q ∧ Loves(p, q)))
For every person,
there is some person
who isn't them
that they love.
∧
![Page 22: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/22.jpg)
Quantifier Ordering
● The statement
∀x. ∃y. P(x, y)
means “for any choice of x, there's some choice of y where P(x, y) is true.”
● The choice of y can be different every time and can depend on x.
![Page 23: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/23.jpg)
Quantifier Ordering
● The statement
∃x. ∀y. P(x, y)
means “there is some x where for any choice of y, we get that P(x, y) is true.”
● Since the inner part has to work for any choice of y, this places a lot of constraints on what x can be.
![Page 24: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/24.jpg)
Order matters when mixing existential and universal quantifiers!
![Page 25: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/25.jpg)
Set Translations
![Page 26: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/26.jpg)
Using the predicates
- Set(S), which states that S is a set, and - x ∈ y, which states that x is an element of y,
write a sentence in first-order logic that means “the empty set exists.”
![Page 27: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/27.jpg)
Using the predicates
- Set(S), which states that S is a set, and - x ∈ y, which states that x is an element of y,
write a sentence in first-order logic that means “the empty set exists.”
First-order logic doesn't have set operators or symbols “built in.” If we only have the
predicates explicitly granted to us above, how might we describe this?
First-order logic doesn't have set operators or symbols “built in.” If we only have the
predicates explicitly granted to us above, how might we describe this?
![Page 28: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/28.jpg)
Answer at PollEv.com/cs103 ortext CS103 to 22333 once to join, then 0, 1, 2, 3, or 4.
Answer at PollEv.com/cs103 ortext CS103 to 22333 once to join, then 0, 1, 2, 3, or 4.
How many of the following first-order logic statements arecorrect translations of “the empty set exists”?
How many of the following first-order logic statements arecorrect translations of “the empty set exists”?
∃S. (Set(S) ∧ ¬∃x. x ∈ S
)
∃S. (Set(S) ∧ ∃x. x ∉ S
)
∃S. (Set(S) ∧ ¬∀x. x ∈ S
)
∃S. (Set(S) ∧ ∀x. x ∉ S
)
![Page 29: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/29.jpg)
The empty set exists.(((
![Page 30: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/30.jpg)
There is some set S that is empty.(((
![Page 31: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/31.jpg)
∃S. (Set(S) ∧ S is empty. ∧
)
![Page 32: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/32.jpg)
∃S. (Set(S) ∧ there are no elements in S∧
)
![Page 33: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/33.jpg)
∃S. (Set(S) ∧ ¬there is an element in S
)
![Page 34: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/34.jpg)
∃S. (Set(S) ∧ ¬there is an element x in S
)
![Page 35: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/35.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S
)
![Page 36: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/36.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
![Page 37: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/37.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ there are no elements in S(
)
![Page 38: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/38.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ every object does not belong to S(
)
![Page 39: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/39.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ every object x does not belong to S(
)
![Page 40: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/40.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ ∀x. x ∉ S
)
![Page 41: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/41.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ ∀x. x ∉ S)
![Page 42: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/42.jpg)
∃S. (Set(S) ∧ ¬∃x. x ∈ S)
∃S. (Set(S) ∧ ∀x. x ∉ S)
Both of these translations are correct. Just like in propositional logic, there are many different
equivalent ways of expressing the same statement in first-order logic.
Both of these translations are correct. Just like in propositional logic, there are many different
equivalent ways of expressing the same statement in first-order logic.
![Page 43: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/43.jpg)
Mechanics: Negating Statements
![Page 44: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/44.jpg)
Answer at PollEv.com/cs103 or
text CS103 to 22333 once to join, then A, B, C, D, E, or F.
Answer at PollEv.com/cs103 ortext CS103 to 22333 once to join, then A, B, C, D, E, or F.
Which of the following is the negation of the statement∀x. ∃y. Loves(x, y)?
A. ∀x. ∀y. ¬Loves(x, y)B. ∀x. ∃y. ¬Loves(x, y)C. ∃x. ∀y. ¬Loves(x, y)D. ∃x. ∃y. ¬Loves(x, y)E. None of these.F. Two or more of these.
Which of the following is the negation of the statement∀x. ∃y. Loves(x, y)?
A. ∀x. ∀y. ¬Loves(x, y)B. ∀x. ∃y. ¬Loves(x, y)C. ∃x. ∀y. ¬Loves(x, y)D. ∃x. ∃y. ¬Loves(x, y)E. None of these.F. Two or more of these.
![Page 45: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/45.jpg)
Before we can answer this poll question, let’s review some first-order logic negation
mechanics.
![Page 46: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/46.jpg)
An Extremely Important Table
For any choice of x,P(x)
For some choice of x,¬P(x)
When is this true? When is this false?
For some choice of x,P(x)
For any choice of x,¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 47: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/47.jpg)
An Extremely Important Table
For any choice of x,P(x)
For some choice of x,¬P(x)
When is this true? When is this false?
For some choice of x,P(x)
For any choice of x,¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 48: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/48.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x)
For any choice of x,¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 49: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/49.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x)
For any choice of x,¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 50: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/50.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x)
For any choice of x,¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 51: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/51.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 52: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/52.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 53: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/53.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x)
For some choice of x,P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 54: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/54.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x) ∃x. P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 55: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/55.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x) ∃x. P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 56: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/56.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x) ∃x. P(x)
For some choice of x,¬P(x)
For any choice of x,P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 57: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/57.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x) ∃x. P(x)
For some choice of x,¬P(x) ∀x. P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 58: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/58.jpg)
An Extremely Important Table
For any choice of x,P(x) ∃x. ¬P(x)
When is this true? When is this false?
For some choice of x,P(x) ∀x. ¬P(x)
For any choice of x,¬P(x) ∃x. P(x)
For some choice of x,¬P(x) ∀x. P(x)
∀x. P(x)
∃x. P(x)
∀x. ¬P(x)
∃x. ¬P(x)
![Page 59: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/59.jpg)
Negating First-Order Statements
● Use the equivalences
¬∀x. A ≡ ∃x. ¬A
¬∃x. A ≡ ∀x. ¬A
to negate quantifiers.● Mechanically:
● Push the negation across the quantifier.● Change the quantifier from ∀ to ∃ or vice-versa.
● Use techniques from propositional logic to negate connectives.
![Page 60: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/60.jpg)
Taking a Negation
∀x. ∃y. Loves(x, y)(“Everyone loves someone.”)
¬∀x. ∃y. Loves(x, y)∃x. ¬∃y. Loves(x, y)∃x. ∀y. ¬Loves(x, y)
(“There's someone who doesn't love anyone.”)
Back to our poll question:Which of the following is the negation of the statement
∀x. ∃y. Loves(x, y)?
Back to our poll question:Which of the following is the negation of the statement
∀x. ∃y. Loves(x, y)?
![Page 61: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/61.jpg)
Two Useful Equivalences
● The following equivalences are useful when negating statements in first-order logic:
¬(p ∧ q) ≡ p → ¬q
¬(p → q) ≡ p ∧ ¬q● These identities are useful when negating
statements involving quantifiers.● ∧ is used in existentially-quantified statements.● → is used in universally-quantified statements.
● When pushing negations across quantifiers, we strongly recommend using the above equivalences to keep → with ∀ and ∧ with ∃.
![Page 62: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/62.jpg)
Negating Quantifiers
● What is the negation of the following statement, which says “there is a cute puppy”?
∃x. (Puppy(x) ∧ Cute(x))● We can obtain it as follows:
¬∃x. (Puppy(x) ∧ Cute(x))
∀x. ¬(Puppy(x) ∧ Cute(x))
∀x. (Puppy(x) → ¬Cute(x))● This says “no puppy is cute.”● Do you see why this is the negation of the original
statement from both an intuitive and formal perspective?
![Page 63: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/63.jpg)
∃S. (Set(S) ∧ ∀x. ¬(x ∈ S))(“There is a set with no elements.”)
¬∃S. (Set(S) ∧ ∀x. ¬(x ∈ S))∀S. ¬(Set(S) ∧ ∀x. ¬(x ∈ S))∀S. (Set(S) → ¬∀x. ¬(x ∈ S))∀S. (Set(S) → ∃x. ¬¬(x ∈ S))
∀S. (Set(S) → ∃x. x ∈ S)(“Every set contains at least one element.”)
![Page 64: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/64.jpg)
These two statements are not negations of one another. Can you explain why?
∃S. (Set(S) ∧ ∀x. ¬(x ∈ S))(“There is a set that doesn't contain anything”)
∀S. (Set(S) ∧ ∃x. (x ∈ S))(“Everything is a set that contains something”)
Remember: ∀ usually goes with →, not ∧
Remember: ∀ usually goes with →, not ∧
![Page 65: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/65.jpg)
Restricted Quantifiers
![Page 66: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/66.jpg)
Quantifying Over Sets
● The notation
∀x ∈ S. P(x)
means “for any element x of set S, P(x) holds.” (It’s vacuously true if S is empty.)
● The notation
∃x ∈ S. P(x)
means “there is an element x of set S where P(x) holds.” (It’s false if S is empty.)
![Page 67: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/67.jpg)
Expressing Uniqueness
![Page 68: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/68.jpg)
Using the predicate
- GOAT(p), which states that p is a GOAT,
To do: write a sentence in first-order logic that means “there is only one GOAT.”
![Page 69: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/69.jpg)
There is only one GOAT. ∀∀∀
![Page 70: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/70.jpg)
Something is a GOAT, and nothing else is. ∀∀∀
![Page 71: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/71.jpg)
Some thing p is a GOAT, and nothing else is. ∀∀∀
![Page 72: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/72.jpg)
Some thing p is a GOAT, and nothing besides p is a GOAT∀∀∀
![Page 73: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/73.jpg)
∃p. (GOAT(p) ∧ nothing besides p is a GOAT. ∀
)
![Page 74: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/74.jpg)
∃p. (GOAT(p) ∧ anything that isn't p isn't a level ∀
)
![Page 75: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/75.jpg)
∃p. (GOAT(p) ∧ any thing x that isn't p isn't a GOAT ∀
)
![Page 76: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/76.jpg)
∃p. (GOAT(p) ∧∀x. (x ≠ p → x isn't a GOAT)
)
![Page 77: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/77.jpg)
∃p. (GOAT(p) ∧∀x. (x ≠ p → ¬GOAT(x))
)
![Page 78: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/78.jpg)
∃p. (GOAT(p) ∧∀x. (x ≠ p → ¬GOAT(x))
)
![Page 79: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/79.jpg)
∃p. (GOAT(p) ∧∀x. (GOAT(x) → x = p)
)
![Page 80: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/80.jpg)
Expressing Uniqueness
● To express the idea that there is exactly one object with some property, we write that● there exists at least one object with that
property, and that● there are no other objects with that property.
![Page 81: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/81.jpg)
Using the predicates
- Set(S), which states that S is a set, and - x ∈ y, which states that x is an element of y,
write a sentence in first-order logic that means “two sets are equal if and only if they contain the same elements.”
![Page 82: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/82.jpg)
Two sets are equal if and only if they have the same elements.)))))
![Page 83: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/83.jpg)
Any two sets are equal if and only if they have the same elements.)))))
![Page 84: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/84.jpg)
Any two sets S and T are equal if and only if they have the same elements.)))))
![Page 85: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/85.jpg)
∀S. (Set(S) →∀T. (Set(T) →
) S and T are equal if and only if they have the same) elements.)
))
![Page 86: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/86.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T if and only if they have the same elements.))
))
![Page 87: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/87.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ they have the same elements.))
))
![Page 88: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/88.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ S and T have the same elements.))
))
![Page 89: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/89.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ every element of S is an element of T and vice-versa)
))
![Page 90: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/90.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ x is an element of S if and only if x is an element of T)
))
![Page 91: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/91.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ ∀x. (x ∈ S ↔ x ∈ T)))
)
![Page 92: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/92.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ ∀x. (x ∈ S ↔ x ∈ T)))
)
![Page 93: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/93.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ ∀x. (x ∈ S ↔ x ∈ T)))
)
You sometimes see the universal quantifier pair with the ↔ connective. This is especially common when talking about sets because two sets are equal when they have precisely
the same elements.
You sometimes see the universal quantifier pair with the ↔ connective. This is especially common when talking about sets because two sets are equal when they have precisely
the same elements.
![Page 94: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/94.jpg)
∀S. (Set(S) →∀T. (Set(T) →
(S = T ↔ ∀x. (x ∈ S ↔ x ∈ T)))
)
![Page 95: Mathematical Logic - Stanford Universityweb.stanford.edu/class/cs103/lectures/05-LogicPart3/Mathematical … · Using the predicates - Set(S), which states that S is a set, and -](https://reader034.vdocuments.us/reader034/viewer/2022042320/5f09ec867e708231d4292833/html5/thumbnails/95.jpg)
Next Time
● Binary Relations● How do we model connections between objects?
● Equivalence Relations● How do we model the idea that objects can be
grouped into clusters?● First-Order Definitions
● Where does first-order logic come into all of this?● Proofs with Definitions
● How does first-order logic interact with proofs?