06 April 2014

Logic

George is terrible at arguing, and this morning, he said he wished he were "better at logic."  Being the very loving wife I am, I decided to type up a summary of the 2 logic pages in wikibooks.  Isn't that cool?

  Section 1  
Proposition - statement.  Propositions can be true or false, and represented by lower case letters: p, q.
Propositional function - a function where a proposition is an input, and True or False is the output.
Compound propositions - propositions combined with any of the 3 logical operators.
Operator - and, or, not.
Conjunction - ∧ and.  In order for a ∧ b to be true, a must be true and b must be true.
Disjunction - ∨ or (inclusive).  a ∨ b means a is true, b is true, or both are true.
Negation - ¬ not.
Order of Precedence - brackets, ¬, ∧, ∨.

  Review 1  
Two plus five equals eleven.  Proposition.
Drakeson Miner is adorable.  Proposition.
Will it rain tomorrow?  Nothing.
3x + 6y = 9.  Propositional function.
It will rain tomorrow and Drakeson Miner is not adorable.  Compound proposition.  (F)
Two plus five equals eleven or two plus five equals seven.  Compound proposition.  (T)
¬(p ∨ q) ∧ p.  According to the Order of Precedence, evaluate p ∨ q first, then ¬, then ∧ p.

  Section 2  
Truth tables - tables that chart every possibility and every outcome of T's and F's.  This is blogger, so I can't really insert tables without too much trouble, and besides.  That would be really boring to type.  If you're so inclined, click on the original wikibook to see some examples.
Each cell contains a T or a F.
If there are n propositions, there will be 2n rows in a truth table.
Also, the first 2rows and n columns will display every possibility of T's and F's for the n propositions.
In a truth table for an expression that involves a p and a q, the first two columns (8 cells) would display the four possible combinations of T's and F's for p and q (TT, TF, FT, FF).
The number of columns that are necessary depend on the possible changes in outcome, due to operators.
For example, ¬, ¬p, ∧, p ∧, ∨, p ∨, p ∧ q are all examples of column headings.
Columns (not rows) are worked through to determine all final outcomes of each truth table.
Equivalence - ≡.  Equivalence between two expressions occurs when the outcomes of both truth tables are the same.
Tautology - an expression that is always true.

  Review 2  
In constructing a truth table for p and q, how many rows are necessary?  4.
Construct a truth table for p ∧ q.  4 rows (not including column headings p, q, p ∧ q), 3 columns.
Construct a truth table for p ∨ q.  4 rows, 3 columns.
Construct a truth table for ¬p.  2 rows, 2 columns.
Construct a truth table for q ∧ (p ∨ r).  8 rows, 5 columns.
If p is "Mommy is in a good mood" and q is "Mommy loves Drakeson," what is p ∨ q?  A tautology.

  Section 3  
This part is even more fun.
Commutative Laws
p ∧ q ≡ q ∧ p
q ∧ p ≡ p ∧ q
Associative Laws
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
Distributive Laws
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Idempotent Laws
p ∧ p ≡ p
p ∨ p ≡ p
Identity Laws
p ∧ F ≡ F
p ∨ F ≡ p
p ∧ T ≡ p
p ∨ T ≡ T
Involution Law
¬(¬p) ≡ p
De Morgan's Laws.  My dad says these are "pretty cool."
¬(p ∨ q) ≡ ¬p ∧ ¬q
¬(p ∧ q) ≡ ¬p ∨ ¬q
Complement Laws
p ∧ ¬p ≡ F
p ∨ ¬p ≡ T
¬T ≡ F
¬F ≡ T

  Review 3  
Pick one of each and prove it with truth tables or laws.

  Section 4  
Implication - p ⇒ q means "if p, then q."  In this case, p is a sufficient condition rather than a necessary condition.  In other words, it is still possible for q to be true without p.
Biconditional propositions - p ⇔ q means "p if and only if q."  This also means that p ⇒ q and q ⇒ p.  In this case, p is a sufficient and a necessary condition for q, and q is a sufficient and a necessary condition for p.
Predicate - a series of words used to modify an object.  Predicates are notated with uppercase letters, and their objects are notated with lowercase letters.
P(x) is called a propositional function where P is the predicate.  Depending on how P and x are defined, P(x) is either true or false.
For example, if the predicate "tooTall" means "is too tall" and the object is "George," then P(x), or tooTall(George), would mean "George is too tall."  In this case, the propositional function is true.
Also, for P(x), the universe of discourse is the set that x belongs to.
For tooTall(George), because George is a person, the universe of discourse could be "people."

  Review 4  
Assume "badCommunicating" is a predicate meaning "bad at communicating."
badCommunicating(Lan) ∨ badCommunicating(George) ⇒ working on logic will be frustrating.
The universe of discourse in this case is "people."
Also, George makes sushi ⇒ Lan loves George.
Also, George lifts weights at least once a week ⇔ George is alive.

  Section 5  
Universal quantifier - ∀ means "for all" or "for each."
Existential quantifier - ∃ means "for some" or "for at least one."
Two-place predicates - predicates that require 2 objects.  For instance, "givesKisses(Mommy, Drakeson)" has the two-place predicate "givesKisses," and the objects are "Mommy" and "Drakeson."  Mommy gives kisses to Drakeson.
Negation of quantified propositional functions:
¬(∀ x, P(x)) ≡ ∃ x, ¬P(x).
¬(∃ x, P(x)) ≡ ∀ x, ¬P(x).

  Review 5  
∀x, cuterThan(Drakeson, x).  Universe of discourse is anything.
∀x, ∃y, Bigger(x,y).  Universe of discourse is numbers.
In English sentences, choose a universe of discourse and a predicate, and write your own examples for the negation of quantified propositional functions.

  Section 6  
Wait a sec.  Those wiki pages didn't have anything on these:
Assume p ⇒ q.
Converse - q ⇒ p.  (Not necessarily)
Inverse - ¬p ⇒ ¬q.  (Not necessarily)
Contrapositive - ¬q ⇒ ¬p.  (Always)

  Review 6  
Notice the next time somebody uses an inverse or converse when trying to argue.  You can disagree, but don't point out the mistake.  It's important to keep your friends.

  Extra Credit Review  
There are 7 additional logic exercises from the original source.

And that's that.
I should add that most of the time I was doing this post, I was also missing story time.

No comments:

Post a Comment