diff options
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) |