CSCE 222 Chapter 1.1

From Notes
Jump to navigation Jump to search

« previous | Wednesday, February 9, 2011 | next »


Propositional Logic

A proposition is a declarative sentence that is either true or false (but not both)

represented by a small letter "propositional variable" (usually p, q, r, etc.)

Logical Connectives

(in order of precedence)

Connective Symbol English Value Read as
Negation ¬ "It is not the case that…" "not p"
Conjunction ∧ "and", "but" "p and q"
Disjunction ∨ "or" "p or q"
Exclusive or ⊕ "either p or q" "p ex-or q"
Conditional → "if p, [then] q", "p is sufficient for q", "q if p", "q unless ¬p", "p implies q", "p only if q", "q whenever p", "q is necessary for p", "q follows from p" "p implies q"
Biconditional ↔ "p is necessary and sufficient for q", "p if and only if q" "p if and only if q"

Truth Table of Connectives

p q ¬p p∧q p∨q p⊕q p→q p↔q
T T F T T F T T
T F F F T T F F
F T T F T T T F
F F T F F F T T

Conditionals

  • given conditional: p → q
  • converse: q → p
  • inverse: ¬p → ¬q
  • contrapositive: ¬q → ¬p

Logical Equivalence

two statements are logically equivalent if and only if they have the same truth table.

Equivalence Name
p∧𝐓≡p
p∨𝐅≡p
Identity laws
p∨𝐓≡𝐓
p∧𝐅≡F
Domination laws
p∨p≡p
p∧p≡p
Idempotent laws
¬(¬p)≡p Double negation law
p∨q≡q∨p
p∧q≡q∧p
Commutative laws
(p∨q)∨r≡p∨(q∨r)
(p∧q)∧r≡p∧(q∧r)
Associative laws
p∨(q∧r)≡(p∨q)∧(p∨r)
p∧(q∨r)≡(p∧q)∨(p∧r)
Distributive laws
¬(p∧q)≡¬p∨¬q
¬(p∨q)≡¬p∧¬q
De Morgan's laws
p∨(p∧q)≡p
p∧(p∨q)≡p
Absorption laws
p∨¬p≡𝐓
p∧¬p≡𝐅
Negation laws

Quantifiers

  • Higher precedence than all logical operators
  • Distribute across parenthesized terms: ∀x(P(x)∧Q(x))≡∀xP(x)∧∀xQ(x)

Universal Quantification

If a predicate P(x) is true for all values of x in the domain,

∀xP(x)≡P(x1)∧P(x2)∧…∧P(xn)

To be contradicted, we need to find only one value of x such that P(x) is false.

Existential Quantification

If a predicate P(x) is satisfiable for at least one value of x in the domain,

∃xP(x)≡P(x1)∨P(x2)∨…∨P(xn)

To be contradicted, every value of x has to be false.

Unique Quantification

If a predicate P(x) is satisfiable for only one value of x in the domain,

∃!xP(x)≡P(x1)⊕P(x2)⊕…⊕P(xn)

To be contradicted, more than one x has to be true or all values of x evaluate to be false.


Variable Binding

A variable is bound if a quantifier is used on that variable. A bound variable does not mean anything outside of the quantification. For example, in ∃x(x+y=1), x is bound, but y is free (not bound). To fix this, we would write ∃x∃y(x+y=1).

In the statement ∀xP(x)∧∀xQ(x), the two bound x variables are not related whatsoever.