zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

Logic

Based on 21-127 Concepts of Mathematics

H2 Proposition and Proof

  • A proposition is a statement to which it makes sense to assign a truth value (either ’true’ or ‘false’)
  • A proof is an argument that demonstrates its truth (they have audiences!)

H3 Examples of propositions

  • true proposition:
    • π\pi is irrational
    • Clive has 2 eyes
  • false proposition:
    • It is currently raining
    • Clive has 3 eyes
    • 2+2=32+2=3
  • unknown/unproven proposition:
    • Every even number > 2 can be expressed as the sum of two prime numbers (aka Goldbach conjecture)
    • There is alien in space

H3 Definitions

  • assumptions are things we know or assume to be true
  • gaol is what we are trying to show.

H3 Some Acronyms

(Some are from other units)

  • WTS = want to show
  • AFSOC = as for sake of contradiction
  • WLOG = with out loss of generality
  • IS = induction step
  • BC = base case
  • IH = induction hypothesis
  • s.t. = such that

H2 Logical Structure

  • logical structure - the skeleton of the proposition
  • symbolic logic - the formal system we use to examine the structure of a proposition
  • propositional formula - a symbolic expression that represents a proposition using:
    • propositional variables (usually p,q,rp, q, r) for simpler propositions inside the big one
    • logical operators - symbols that combine things like ‘and’, ’not’, ‘or’, ‘if… then’…

H3 Logical Operators

H3 Quantifiers

  • Universal Quantifier \forall - reads “for all”
    • xX,p(x)\forall x \in X, p(x) reads “all elements xx in XX satisfies p(x)p(x)
  • Existential Quantifier \exists - reads “there exists”
    • xX,p(x)\exists x \in X, p(x) reads “there exists an xx in XX satisfies p(x)p(x)

H3 Logical Formulae

  • A logical formula is an expression built using:
    • predicates i.e. statements e.g. x>yx > y, p(x)p(x), etc.
    • logical operators
    • quantifier

Every theorem we want to prove in 21-127 Concepts of Mathematics can be expressed as a logical formula!!!

H3 Logical Equivalency

Given logical formulae φ\varphi and ψ\psi, they are logically equivalent if φψ\varphi \Leftrightarrow \psi. We then write φψ\varphi \equiv \psi.

H3 Truth Table

Truth table is a good way to determine if logical formulae are logically equivalent.

A truth table of propositional formula φ\varphi is a tabular representation of the truth value of φ\varphi and its sub formulae depending on all possible combination of truth value of its propositional variables.

Truth table of some logical formulae

ppqq¬p\neg ppqp \wedge qpqp \vee qpqp \Rightarrow qpqp \Leftrightarrow q
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT

Notice F \Rightarrow T and F \Rightarrow F. This is called “vacuous truth”.

Theorem: Given logical formulae φ\varphi and ψ\psi, then φψ\varphi \equiv \psi iff columns in their truth tables are the same.

Some useful logical equivalence:

  • (pq)(¬pq)(p \Rightarrow q) \equiv (\neg p \vee q)
  • (pq)(¬q¬p)(p \Rightarrow q) \Leftrightarrow (\neg q \Rightarrow \neg p) aka contrapositive

H3 Maximal Negation

A logical formula is maximally negated if no ¬\neg sign is outside of other operators or quantifiers.

Informally, deMorgan’s laws talk about duality viz. there’s a way to go between \wedge and \vee and a way to go between \forall and \exists.

Ways to “push” negation inward (provable, but omitted):

  • Law of double negation
    • ¬(¬p)p\neg (\neg p) \equiv p
  • DeMorgan’s law for logical operators
    • ¬(pq)(¬p)(¬q)\neg (p \wedge q) \equiv (\neg p) \vee (\neg q)
    • ¬(pq)(¬p)(¬q)\neg (p \vee q) \equiv (\neg p) \wedge (\neg q)
  • DeMorgan’s law for quantifiers. Let XX be a set:
    • ¬(xX,p(x))xX,(¬p(x))\neg(\forall x \in X, p(x)) \equiv \exists x \in X,(\neg p(x))
    • ¬(xX,p(x))xX,(¬p(x))\neg(\exists x \in X, p(x)) \equiv \forall x \in X,(\neg p(x))
  • Equivalency for implications
    • ¬(pq)p(¬q)\neg(p \Rightarrow q) \equiv p \wedge(\neg q)
    • ¬(pq)(p(¬q))((¬p)q)\neg(p \Leftrightarrow q) \equiv (p \wedge(\neg q)) \vee ((\neg p) \wedge q)

H3 Proof Strategies using logical structure

  • Direct proof - assume what’s known, derive the conclusion
  • Proof by contradiction - assume the opposite of the conclusion, derive a contradiction
  • Proving universally quantified statements - prove the statement true for any arbitrary element
    • e.g. “every integer is rational”. Proof: let xZx \in \mathbb{Z}, then x=x1x = \frac{x}{1}. 1Z1 \in \mathbb{Z} => xx rational.
  • Proving existential statements - find one that satisfies the desired property!
    • e.g. “there exists a rational integer”. Proof: 2Z2 \in \mathbb{Z} and 2Q2 \in \mathbb{Q} as required.