diff options
author | Louie S <lshprung@yahoo.com> | 2020-04-02 09:21:46 -0700 |
---|---|---|
committer | Louie S <lshprung@yahoo.com> | 2020-04-02 09:21:46 -0700 |
commit | 2b577a10662b06039333184044b0d372060976db (patch) | |
tree | 50fe19c80e9c8ab6f5e07de0487c53e29d06948f /1.1.md | |
parent | 0ee1dbde493a9212f34aa4b5583c838fd5c06c85 (diff) |
Post-class 04/01
Diffstat (limited to '1.1.md')
-rw-r--r-- | 1.1.md | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -182,3 +182,39 @@ when `p` is true, `┓p` is false, and vice versa - Satisfied when either `p` and `q` are both true or both false - `p<->q` is "equivalent" to `(p->q)^(q->p)` + +--- + +# Propositional Logic p2 + +- ex: What operator do we do first in `┓p^q<->r` + +## Precedence (order of operations) + +1. `┓` +2. `^`, `∨`, `⊕` + - "Exclusive or" (`⊕`) is sometimes referred to as "Ex Or" for short + - Need parenthesis to differentiate among these +3. `->`, `<->` + - Need parenthesis to differentiate among these + +`┓p^q<->r` means `(┓p^q)<->r` + +- ex: `p^q∨r` + - is ambiguous (not sure what to do first) because of lack of parethesis + +- ex: Translate the following sentence to logic: + - "You can be Draco's friend **only if** you are in Slytherin **or** you eat floating cupcakes" + - let `d` = "You can be Draco's friend + - let `s` = "You are in Slytherin" + - let `c` = "You eat floating cupcakes" + - `d->s∨c` or `d->(s∨c)` + - Mean the same thing + +- Note: "p if q" means `p<-q` (or `q->p`) +- Note: "p only if q" means `p->q` +- Note: "p if and only if q" means `p<->q` + +--- + +[1.3 ->](1.3.md) |