From e469851def690291ad8f00dbb72bad735e04f761 Mon Sep 17 00:00:00 2001 From: Louie S Date: Mon, 6 Apr 2020 16:15:52 -0700 Subject: Post-class 04/06 --- 1.4.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1.5.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 1.5.md diff --git a/1.4.md b/1.4.md index db27f54..06aa8f1 100644 --- a/1.4.md +++ b/1.4.md @@ -88,3 +88,55 @@ - Ex. `∀x P(x) -> q` - means `(∀x P(x)) -> q` + +--- + +## Scope + +- `T(x) -> r` is a propositional function + - T(x) and r are each propositions for which we do not know the truth values +- `(∀x T(x)) -> r` is a proposition + - **scope** of ∀x is T(x) (clarified by parenthesis) +- `∀x (T(x) -> r)` is a proposition + - **scope** of ∀x is `T(x)->r` + +Takeaway: If there's a variable not in the scope of a quantifier, it's**not** a proposition + +### Convert English into Logical Statements + +- Ex. What is the negation of "all dogs bark"? Write in words and logical symbols (2 ways) + - Let B(x) be "x barks" and the domain of x is dogs + +|Words|Symbols| +|-----|-------| +|All dogs bark|∀x B(x)| +|Not all dogs bark|┓∀x B(x)| +|There is at least one dog who doesn't bark|Ǝx ┓B(x)| + +Takeaway: +- `┓∀x B(x) ≡ Ǝx ┓B(x)` +- `Ǝx ┓B(x) ≡ ∀x ┓B(x)` + - "It's not the case that there is a dog that barks" means the same as "No dogs bark" + +--- + +- Ex. Convert the following sentences into logical statements + 1. "There is a woman with a PhD and an MD" + - Let P(x) be "x has a PhD" and the domain of x is women + - Let M(x) be "x has an MD" and the domain of x is women + - `Ǝx (P(x) ^ M(x))` + 2. "There is exactly one woman with a PhD and MD" + - Use the setup from the previous sentence + - `Ǝ!x (P(x) ^ M(x))` + 3. "No one has seen an alien" + - Think about it: "No one" is the opposite of "at least one" + - Let A(x) be "x has seen an alien" where the domain of x is people + - `┓Ǝx A(x)` simplified to `∀x ┓A(x)` + 4. "The campus is quiet when everyone is home" + - Let H(x) be "x is home" on the domain of x is people + - Let Q be "The campus is quiet" + - `(∀x H(x)) -> Q` + +--- + +[1.5 ->](1.5.md) diff --git a/1.5.md b/1.5.md new file mode 100644 index 0000000..4f8108c --- /dev/null +++ b/1.5.md @@ -0,0 +1,56 @@ +[\<- 1.4](1.4.md) + +--- + +# 1.5 Nested Quantifiers p1 + +- Let the domain of x and y be the reals + +|Logical Statement|Words| +|-----------------|-----| +|∀x(∀y(xy=xy)) |"For all x∈ℝ (is an element of real numbers) and all y∈ℝ, xy = yx"| +|∀y(∀x(xy=xy)) |"For all y∈ℝ (is an element of real numbers) and all x∈ℝ, xy = yx"| + +- Both columns are true +- `∀x(∀y(xy=xy)) ≡ ∀y(∀x(xy=xy))` + +Quantifiers **inside** the scope of other quantifiers are called **nested quantifiers** + +- Note: `∀s ∀t P(s,t) ≡ ∀t ∀s P(s,t) + +--- + +- Ex. Let the domain of x and y be **positive reals**. Convert the logical statement to words and determine its truth value. + 1. `∀x Ǝy (x=y^2)` + - "For all x>0, there exists y>0 s.t. (such that) x=y^2." + - This statement is **True** since for any x, we would pick y=sqrt(x) + - e.g. if x=4, then y=2 + - e.g. if x=5.72, then y=sqrt(5.72) + 2. `Ǝy ∀x (x=y^2)` + - "There exists a number y>0 s.t. for all x>0, x=y^2." + - This statement is **False** since once y is chosen, y^2 can only be one value. Therefore, only one value of x would satisfy x=y^2 (and not all x). + - Note: `∀x Ǝy P(x,y)` is **not** equivalent to `Ǝy ∀x P(x,y)` + +- Ex. Let the domain of x and y be integers. Convert the logical statement to words and determine its truth value. + 1. `Ǝx Ǝy (x^2 + y^2 = 3)` + - In words: "There is an integer x and there is an integer y s.t. x^2 + y^2 = 3" + 2. `Ǝy Ǝx (x^2 + y^2 = 3)` + - In words: "There is an integer y and there is an integer x s.t. x^2 + y^2 = 3" + - Both of these examples have the same meaning + - `Ǝx Ǝy P(x,y) ≡ Ǝy Ǝx P(x,y)` + - These statements are **False** since no **integer** values of x and y can be plugged in to create a true statement + +--- + +**Careful**: `∀x(Ǝy P(y) -> ...)` is **not** equivalent to `∀x Ǝy(P(y) -> ...)` +- Be careful when moving quantifiers to make sure the meaning is the same + +- Ex. Let P(Y) be "student y turns in their homework". Domain of y is students in our class. Let q be "Luvreet is happy" + - `Ǝy P(y) -> q` + - "If there is a student y who turns in their homework, then Luvreet is happy" + - `Ǝy(P(y) -> q)` + - "There is a student y s.t. if y turns in their homework, then Luvreet is happy" + - These propositional functions are different the first one is basically saying, "Luvreet is happy when **any** student turns in their homework" but the second is basically saying, "Luvreet is happy when y turns in their homework" + - A true statement would be: `Ǝy P(y) -> q ≡ ∀y(P(y) -> q)` + +--- -- cgit