summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie S <lshprung@yahoo.com>2020-03-31 12:06:04 -0700
committerLouie S <lshprung@yahoo.com>2020-03-31 12:06:04 -0700
commit0ee1dbde493a9212f34aa4b5583c838fd5c06c85 (patch)
tree04864567ff0febd594a75249123ed3879db4c09b
first commit
-rw-r--r--1.1.md184
-rw-r--r--negation.pngbin0 -> 740 bytes
-rw-r--r--plus_inside_circle.pngbin0 -> 2822 bytes
3 files changed, 184 insertions, 0 deletions
diff --git a/1.1.md b/1.1.md
new file mode 100644
index 0000000..a04674d
--- /dev/null
+++ b/1.1.md
@@ -0,0 +1,184 @@
+# Propositional Logic p1
+
+- Def: A **proposiion** is a declarative sentence that is either true or false (but not both)
+ - A sentence that declares a fact
+
+- Determine which of the following sentences are propositions:
+ 1. Lebron James plays basketball
+ - it is declaring something
+ - it is true
+ - **it is a proposition** :)
+ 2. All students live in dorms
+ - it is declaring something
+ - it is false
+ - **it is a proposition** :)
+ 3. Where is Carmen?
+ - it is NOT declaring something
+ - **it is NOT a proposition** :(
+ 4. Sit down!
+ - it is NOT declaring something
+ - **it is NOT a proposition** :(
+ 5. `4 + 5 = 9`
+ - it is declaring something
+ - it is true
+ - **it is a proposition** :)
+ 6. `x + 5 = 9`
+ - it is declaring something
+ - **it is NEITHER true or false**
+ - **it is NOT a proposition** :(
+ 7. `x + 5y = 5y + x; x,y are real`
+ - it is declaring something
+ - it is true
+ - **it is a proposition** :)
+
+- If a proposition is true: write `T`
+- If a proposition is false: write `F`
+ - alternatively, sometimes an upside down 'T' instead
+
+---
+
+# Operators
+
+- List of operators:
+ - ┓ ([a top right corner](negation.png))
+ - ^ (carrot)
+ - ∨ (descending wedge symbol)
+ - ⊕ ([plus inside a circle](plus_inside_circle.png))
+ - -> (right arrow)
+ - <-> (arrow pointed both ways)
+- These are all **operators** on propositions
+ - Propositions involving operators are **compound propositions**
+ - (e.g. p^q)
+ - read as *p and q*
+
+## Negation (┓)
+
+- Let `p` be a proposition `┓p` (meaning *not p*)
+ - This is a **negation**
+ - This is a **proposition**
+
+- Let `r` = "Lebron James plays basketball"
+ - `┓r` = "Lebron James does **not play** basketball"
+
+## Introducing Truth Tables
+
+example:
+
+|p|┓p|
+|-|--|
+|T|F |
+|F|T |
+
+when `p` is true, `┓p` is false, and vice versa
+
+## Conjunction (^)
+
+- Let `p` and `q` be propositions
+- "p and q" is a proposition called the **conjunction** of `p` and `q`, denoted by `p^q`
+ - read as "p and q"
+
+### Truth Table
+
+|p|q|p^q|
+|-|-|---|
+|T|T|T |
+|T|F|F |
+|F|T|F |
+|F|F|F |
+
+`p^q` is only true when both `p` and `q` are true
+
+## Disjunction (∨)
+
+- Let `p` and `q` be propositions
+- "p or q" is a proposition called the **disjunction** of `p` and `q`, denoted `p∨q`
+ - read as "p or q"
+
+### Truth Table
+
+|p|q|p∨q|
+|-|-|---|
+|T|T|T |
+|T|F|T |
+|F|T|T |
+|F|F|F |
+
+- The disjunction is an **inclusive or**
+ - Either `p`, or `q`, or both need to be true for `p∨q` to be true
+
+## Exclusive Or (⊕)
+
+- Let `p` and `q` be propositions
+- "p exclusive or q" is a proposition called **exclusive or** of `p` and `q` and is denoted `p⊕q`
+ - read as "p exclusive or q"
+
+### Truth Table
+
+|p|q|p⊕q|
+|-|-|---|
+|T|T|F |
+|T|F|T |
+|F|T|T |
+|F|F|F |
+
+- One of `p` or `q` need to be true for `p⊕q` to be true, but not both
+
+## "Or" in English
+
+- I can wake up early **or** I can sleep in.
+ - In English, this is an exclusive or (I can't wake up and sleep at the same time!)
+
+- People with kids **or** pets get less sleep.
+ - In English, this is an inclusive or (both kids and pets can get less sleep)
+
+## Memory Tip
+- `^` looks like an intersection symbol (which means **and**)
+- `∨` looks like an union symbol (which means **inclusive or**)
+
+## Implication (->)
+
+- Sometimes called conditional operator
+- Let `p` and `q` be propositions
+- "If p then q" is a proposition called the **implication** of `p` and `q` and is denoted `p->q`
+ - read as "if p then q" or sometimes "p implies q"
+
+### Truth Table
+
+|p|q|p->q|
+|-|-|----|
+|T|T|T |
+|T|F|F |
+|F|T|T |
+|F|F|T |
+
+- Example: "If it is Wednesday, we wear pink"
+ - `p` is "it is Wednesday" (sometimes called the hypothesis)
+ - `q` is "we wear pink" (sometimes called the conclusion)
+ - Only violated (`p->q` is false) if it is Wednesday (`p` is true) and we don't wear pink (`q` is false)
+
+- Implication can be read in many different ways (example `p->q`):
+ - p implies q
+ - p only if q
+ - q when p
+ - p if sufficient for q
+ - q is necessary for p
+
+## Biconditional (<->)
+
+- Let `p` and `q` be propositions
+- "p if and only if q" is a proposition called the **biconditional** of `p` and `q`, denoted `p<->q`
+ - read "p if and only if q" or "p iff q"
+
+### Truth Table
+
+|p|q|p<->q|
+|-|-|----|
+|T|T|T |
+|T|F|F |
+|F|T|F |
+|F|F|T |
+
+- Violated when one is `T` but other if `F`
+- Satisfied when either `p` and `q` are both true or both false
+
+- `p<->q` is "equivalent" to `(p->q)^(q->p)`
diff --git a/negation.png b/negation.png
new file mode 100644
index 0000000..4f7acf0
--- /dev/null
+++ b/negation.png
Binary files differ
diff --git a/plus_inside_circle.png b/plus_inside_circle.png
new file mode 100644
index 0000000..21573f0
--- /dev/null
+++ b/plus_inside_circle.png
Binary files differ