Propositional Logic

From Notes
Jump to navigation Jump to search

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 pq pq pq pq pq
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
ppp
ppp
Idempotent laws
¬(¬p)p Double negation law
pqqp
pqqp
Commutative laws
(pq)rp(qr)
(pq)rp(qr)
Associative laws
p(qr)(pq)(pr)
p(qr)(pq)(pr)
Distributive laws
¬(pq)¬p¬q
¬(pq)¬p¬q
De Morgan's laws
p(pq)p
p(pq)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 xy(x+y=1).

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