Doing Logic the Lazy Way

In the previous post, we introduced what we mean by logic, which agrees largely with our intuitive process of making sense of the world. We defined truth values, negations, and conjunctions. The parallel to the conjunction is the disjunction, defined as follows.

Definition 1. Define the disjunction \lor using the truth table:

We can verify that p \lor t = t = t \lor p and p \lor c = p = c \lor p, just like conjunction.

The disjunction share many properties with the conjunction. In fact, one key result that connects (pun intended) all three connectives \neg, \wedge, \lor is de Morgan’s laws.

Theorem 1 (de Morgan’s Laws). Let p, q be propositional variables. Then

\begin{aligned} \neg(p \lor q) = \neg p \wedge \neg q, \quad \neg(p \wedge q) = \neg p \lor \neg q. \end{aligned}

Proof. For the first property, we use the following truth table argument:

For the second property, we apply the first property but replace p with \neg p and q with \neg q, then apply the double negative property, to obtain

\neg(\neg p \lor \neg q) = \neg (\neg p) \wedge \neg (\neg q) = p \wedge q.

Negating both sides and applying the double negative property again,

\neg(p \wedge q) = \neg(\neg(\neg p \lor \neg q)) = (\neg p \lor \neg q).

These automatically yield the disjunction properties.

Corollary 1. Let p, q, r be propositional variables. Then the following hold.

\begin{aligned} p \lor q = q \lor p, \quad (p \lor q) \lor r = p \lor (q \lor r). \end{aligned}

Proof. We illustrate the proof of the first property. Applying double negatives, de Morgan’s laws, and commutativity of \wedge,

\begin{aligned} p \lor q &= \neg(\neg p) \lor \neg(\neg q) \\ &= \neg (\neg p \wedge \neg q) \\ &= \neg (\neg q \wedge \neg p) \\&= \neg(\neg q) \lor \neg(\neg p)  = q \lor p. \end{aligned}

The second property follows similarly.

The conjunction and disjunction connectors distribute (i.e. split) over each other.

Theorem 2. Let p, q, r be propositional variables. Then

\begin{aligned} p \wedge (q \lor r) &= (p \wedge q) \lor (p \wedge r), \\ p \lor (q \wedge r) &= (p \lor q) \wedge (p \lor r). \end{aligned}

Proof. For the first property, observe that the results hold for p = t and p = c, so that it holds in general. The second property follows from the first using the double-negation-cum-de-Morgan trick in Corollary 1.

The disjunction is intimately connected to the implication, and has massive implications in studying logic, pun intended.

Theorem 3. Let p,q be propositional variables. The following hold:

(p \to q) = (\neg p \lor q) \quad \neg(p \to q) = p \wedge \neg q.

Proof. One can the first result by substituting p = t and p = c respectively, and derive the second result using de Morgan’s laws.

These results affords us an incredibly powerful result, which is to chain logical implications with one another.

Theorem 4. Let p, q, r be propositional variables. Then

((p \to q) \wedge (q \to r)) \to (p \to r) = t.

To abbreviate, we assume the following order of operations when parentheses are omitted in descending priority: \neg, {\lor}/{\wedge}, {\to}/{\leftrightarrow}, =.

Proof. Applying the various logical properties,

\begin{aligned} ((p \to q) \wedge (q \to r)) \to (p \to r) &= \neg ((p \to q) \wedge (q \to r)) \lor (p \to r) \\ &= \neg (p \to q) \lor \neg(q \to r) \lor (p \to r) \\ &= (\neg p \lor q) \lor (\neg q \lor r) \lor (\neg p \lor r) \\ &= \neg p \lor q \lor \neg q \lor r \lor \neg p \lor r \\ &= (q \lor \neg q)\lor ((\neg p \lor r) \lor (\neg p \lor r)) \\ &= t \lor (\neg p \lor r) = t. \end{aligned}

Can we chain biconditionals? That is, if p \leftrightarrow q and q \leftrightarrow r, is it true that p \leftrightarrow r? Intuitively, yes! Rigorously, how do we prove it? We need several lemmas.

Lemma 1. For propositional variables p, q,

p \leftrightarrow q  = (p \to q) \wedge (q \to p) = (p \wedge q) \lor (\neg p \wedge \neg q).

Proof. For the first result, first verify that q \to t = t and q \to c = \neg c. Then substituting p = t and p = c respectively yields

\begin{aligned} ((t \to q) \wedge (q \to t)) \leftrightarrow (t \leftrightarrow q) &= q \leftrightarrow (t \leftrightarrow q) = t, \\ ((c \to q) \wedge (q \to c)) \leftrightarrow (c \leftrightarrow q) &= \neg q \leftrightarrow (c \leftrightarrow q) = t. \end{aligned}

For the second result (i.e. the second = ), write the implication as a disjunction p \to q = \neg p \lor q, then distribute the logical connectives (in the usual manner) to obtain

\begin{aligned} (p \to q) \wedge (q \to p) &= (\neg p \lor q) \wedge (\neg q \lor p) \\ &= (\neg p \wedge \neg q) \lor (q \wedge \neg q) \lor (\neg p \wedge p) \lor (q \wedge p) \\ &= (p \wedge q) \lor  (\neg p \wedge \neg q) \lor (q \wedge \neg q) \lor (\neg p \wedge p) \\ &= (p \wedge q) \lor  (\neg p \wedge \neg q) \lor c \lor c \\ &= (p \wedge q) \lor  (\neg p \wedge \neg q). \end{aligned}

Here, we used the results \neg p \wedge p = c and p \lor c = p.

Lemma 2. For propositional variables p, q, r, s,

(p \to q) \wedge (r \to s) \to (p \wedge r \to q \wedge s) = t.

Proof. Writing the implication as a disjunction,

\begin{aligned} (p \to q) \wedge (r \to s) \to (p \wedge r \to q \wedge s)  &= \neg((p \to q) \wedge (r \to s)) \lor (p \wedge r \to q \wedge s) \\ &= \neg(p \to q) \lor \neg(r \to s) \lor \neg(p \wedge r) \lor (q \wedge s) \\  &= \neg p \lor (p \wedge \neg q) \lor \neg r \lor (r \wedge \neg s) \lor (q \wedge s) \\ &= \neg p \lor \neg q \lor \neg r \lor \neg s \lor (q \wedge s) \\ &= \neg p \lor \neg r \lor \neg q \lor \neg s \lor (q \wedge s) \\ &= (\neg p \lor \neg r) \lor (\neg (q \wedge s) \lor (q \wedge s)) \\ &= (\neg p \lor \neg r) \lor t = t. \end{aligned}

With these tools in place, we can now prove our main result for the biconditional.

Theorem 5. Let p, q, r be propositional variables. Then

(p \leftrightarrow q) \wedge (q \leftrightarrow r) \to (p \leftrightarrow r) = t.

Proof. Unraveling the previous lemmas,

\begin{aligned} &(p \leftrightarrow q) \wedge (q \leftrightarrow r) \to (p \leftrightarrow r) \\ &= (p \to q) \wedge (q \to p) \wedge (q \to r) \wedge (r \to q) \to (p \to r) \wedge (r \to p) \\ &= ((p \to q) \wedge (q\to r)) \wedge ((r \to q) \wedge (q \to p)) \to ((p \to r) \wedge (r \to p)) \\ &= t. \end{aligned}

Why did we care about logic? We have completed what amounts to verification of various truth values, given certain combinations of propositional variables. We even derived several useful tautologies. These tautologies form the bedrock of proof techniques, which are the ligaments of mathematics.

—Joel Kindiak, 16 Nov 24, 2034H

,

Published by


Responses

  1. The Logic of Predicates – KindiakMath

    […] the notion of predicate logic. It’s an extension of propositional logic—the content of our past few posts. Predicate logic helps us discuss propositions like “for all real numbers, (insert favourable […]

    Like

  2. The Massive Impact of Applied Logic – KindiakMath

    […] proof technique is still a compound expression that we can verify to be a tautology, so we can verify that they work just like normal compound […]

    Like

Leave a comment