Knaph

Shortcuts and Swaps15 of 243 min read

Swapping Equal Parts

In the sum 3 + (2 + 2), you may swap 2 + 2 for 4 inside the brackets, and the total stays 7. Can a logic proof swap a part inside a line in the same way?

Whole lines and parts

The basic rules work on whole lines. They look at the main connective only. Take ¬(P ∧ Q). Its main connective is ¬, so it is a not-claim. ∧E does not apply, and writing ¬P from it by ∧E is a mistake.

A replacement rule is different. It swaps a part inside a line for an equivalent part. Two parts are equivalent when they always have the same truth value. Swapping one for the other cannot change the value of the whole, just as 2 + 2 and 4 are interchangeable in a sum. (Compare algebraic identities.)

The line P → not-not-Q with its part not-not-Q lifted out and replaced by Q, giving P → Q, with a label saying the part has the same truth value.

De Morgan and double negation

De Morgan (DeM) has two forms. Break the bar and change the connective. ¬(A ∧ B) and ¬A ∨ ¬B are equivalent. So are ¬(A ∨ B) and ¬A ∧ ¬B. In Level 3 we checked both with a table. Both directions are allowed.

Two swaps drawn with double arrows: not-(A and B) swaps with not-A or not-B, and not-(A or B) swaps with not-A and not-B.

Double negation also has a swap form, DN: ¬¬A and A may replace each other anywhere, in both directions, even inside a longer line. (DNE from the last lesson only removes two nots from a whole line.) Premise: P → ¬¬Q. The part ¬¬Q becomes Q.

#LineWhy
1P → ¬¬Qpremise
2P → QDN 1

A proof with De Morgan

Key: P = It is cold. Q = It is windy. Premises: ¬(P ∧ Q) (it is not both cold and windy) and P. Goal: ¬Q. Ask: what do we want? ¬Q. What gives it? DS, if we first have an or. DeM gives the or from line 1. DS then needs ¬¬P, and DN gives it from P (adding two nots is the other direction of the swap).

#LineWhy
1¬(P ∧ Q)premise
2Ppremise
3¬P ∨ ¬QDeM 1
4¬¬PDN 2
5¬QDS 3, 4

A five-line proof: two premises, line 3 swaps the not-and into not-P or not-Q by De Morgan, line 4 writes not-not-P by DN, and line 5 writes not-Q by DS.

Check line 5. DS needs A ∨ B and ¬A. Line 3 is ¬P ∨ ¬Q, so A is ¬P, and ¬A is ¬¬P, which is line 4. It writes ¬Q.

Is this a new power? No. A replacement is still a safe step, since equal parts never change the whole.

Careful

Never use ∧E on ¬(P ∧ Q). It is a not-claim, not an and. Swap it with DeM first, and then use a rule that fits.

Try it at home

  1. Make a truth table for ¬(P ∧ Q) and for ¬P ∨ ¬Q. Do all four rows agree?
  2. Say ¬(P ∨ Q) in English with a key, then say ¬P ∧ ¬Q. Do they mean the same?
  3. Copy the five-line proof. Underline the line where a swap happens.

Words to know

  • replacement rule - a rule that swaps a part inside a line for an equivalent part
  • De Morgan (DeM) - ¬(A ∧ B) swaps with ¬A ∨ ¬B, and ¬(A ∨ B) swaps with ¬A ∧ ¬B
  • double negation (DN) - ¬¬A and A swap with each other, both ways
  • equivalent - always having the same truth value

Big idea

A replacement rule swaps an equivalent part inside a line, because equal parts never change the value of the whole.

Test your understanding

Sign in to test your understanding of this lesson and track your progress.