Skip to content

Week3 - Proof Patterns

This week we focus a lot on proof patterns since it is a very important topic. We also quickly review predicate logic.

Resources

  • Slides: pdf
  • Proof Examples: pdf
  • Kahoot: link made by Tobias Steinbrecher <3
  • Statements vs Formulas: pdf (in German)

Notes on Last Exercise Sheet

  • Overall the submissions were very good (:
  • Be careful when you apply rules to larger formulas. You still need to keep the brackets. For example ¬(AB)C\lnot (A \land B) \lor C becomes (¬A¬B)C(\lnot A \lor \lnot B) \lor C when using de Morgans rule!
  • By now you probably figured out that the grading scheme can be very strict, so don’t be too discouraged if you lost a lot of points.

Proving Proof Patterns with Propositional Logic

Okay, we we already know a lot of proof patterns. But what if we want to create our own one and show that it is actually correct? Or what if someone gives us a proof pattern they came up with and we want to show them that it does not work?

We can do both of those things using propositional logic! I will explain the idea first and then give examples for both proving and disproving a proof pattern.

When you are asked to evaluate a proof pattern, it will always be of the following form: It states what statement SS it wants to prove and then gives some other statements. Then it claims if we prove those other statements, we have actually proven the statement SS. For example, a proposed proof pattern might look like this:

We want to prove the statement SS, we first prove another statement TT. Then we show that T    ST \implies S

This proof pattern consists of two parts (which should prove SS):

  1. We prove TT
  2. We prove T    ST \implies S

You might also see proof patterns with more steps and parts. Don’t get confused! The first step is always to find out what statements the pattern consists of.

Great, but how do we work with the proof pattern now? Here is where the logic part comes in. We can actually rewrite the pattern using propositional logic. To do this, we take each of the statements, convert them to propositional logic and then combine them with \land. To avoid confusion, we use the letters A,B,C,A, B, C, \dots in our formulas and let their truth values correspond to the truth of the statements. For our example proof pattern this would look like this:

We choose the symbol AA and BB, which correspond to the statements SS and TT and their truth values respectively. Now we rewrite the statements in propositional logic:

  1. “We prove TT” becomes BB
  2. “We prove T    ST \implies S” becomes BAB \rightarrow A

Combining those we get: F=B(BA)F = B \land (B \rightarrow A)

Okay, we tranformed our statements to a formula FF. But how do we reason about the correctness of the proof pattern? There is actually a very simple rule:

The proof pattern is correct exactly if:

FA F \vDash A

Where FF is the formula we get from the proof pattern and AA is the logical variable corresponding to the statement we want to prove. This means we can disprove a proof pattern by showing:

FA F \nvDash A

Why does this work? We want to show that our statement SS is true if we proved all the other statements. Our formula FF evaluating to true represents the fact that all the statements are true (since we “linked” each propositional variable to a statement and combined them with \land). If FAF \vDash A then this means that if all our statements are actually true (FF is true), then SS must also be true (AA is true). If the logic consequence does not hold, then there must exist some truth assignment where FF gives true but AA is set to false. This means that SS can be false even if all our statements are true, which means the pattern is not valid.

If the statement you want to show is not simply one statement SS, but for example S    TS \implies T, then you need to transform that to propositional logic too and show the consequence. This should look like:

F(AB) F \vDash (A \rightarrow B)

So let’s finish our small example. We show that FAF \vDash A:

F=B(BA)B(¬BA)(B¬B)(BA)(BA)BAA \begin{align*} F & = B \land (B \rightarrow A) \\\\ & \equiv B \land (\lnot B \lor A) \\\\ & \equiv (B \land \lnot B) \lor (B \land A) \\\\ & \equiv \bot \lor (B \land A) \\\\ & \equiv B \land A \\\\ & \vDash A \end{align*}

Step by Step

Let’s go over the method step by step again before we do some examples:

### Extract the Statements See what statement $S$ should be proved by the pattern. Then find all the statements we use to prove that statement. (It does not need to be named $S$, we just assume that here for simplicity.)

Transform the Statements to Prop. Logic

Define propositional variables A,B,A,B, \dots for the statements. Transform each statement individually and then combine them with \land to get a formula FF.

(Dis)prove the Cogical Consequence

You can prove FAF \vDash A either by equivalence transformations or truth tables. You can disprove it by finding a truth assignment where FF gives true but AA is set to false.

Example 1: Proving Correctness

This is an exercise from 2020. We get the following proof pattern and want to show that it is correct:

To prove SS: Find statements UU and TT. Prove TT, assuming SS is false. Prove UU, assuming SS is false. Show that not both TT and UU are true.

Step 1: We have three statements here:

  1. not S     \implies T
  2. not S     \implies U
  3. not both U and T are true

Those statements should show S.

Step 2: We use AA for SS, BB for TT and CC for UU. The formulas are:

  1. ¬AB\lnot A \rightarrow B
  2. ¬AC\lnot A \rightarrow C
  3. ¬(BC)\lnot (B \land C)

Combining them we get:

(¬AB)(¬AC)¬(BC) (\lnot A \rightarrow B) \land (\lnot A \rightarrow C) \land \lnot (B \land C)

Step 3: To show that the proof pattern is correct we now need to show:

(¬AB)(¬AC)¬(BC)A (\lnot A \rightarrow B) \land (\lnot A \rightarrow C) \land \lnot (B \land C) \vDash A

You can use a truth table to show that this holds. This shows that the proof pattern is indeed correct.

Example 2: Disproving Correctness

We want to show that the following proof pattern is incorrect:

To prove S    TS \implies T we find a statement RR and prove that R is true. Then we show that if RR is true, SS must be true. Finally, we show that at least one of RR and TT must be true.

Step 1: We want to show S    TS \implies T using three statements:

  1. RR is true
  2. R    S R\implies S
  3. RR or TT (or both) must be true

Step 2: We use AA for SS, BB for TT and CC for RR. The formulas are:

  1. CC
  2. CAC \rightarrow A
  3. CBC \lor B

Combined we get:

C(CA)(CB) C \land (C \rightarrow A) \land (C \lor B)

Step 3: We want to show that:

C(CA)(CB)AB C \land (C \rightarrow A) \land (C \lor B) \nvDash A \rightarrow B

Note that we transformed the statement the pattern tries to prove into ABA \rightarrow B.

For the truth assignment A=1,B=0,C=1A=1, B=0, C=1 the left hand side evaluates to true, but the right hand side evaluates to false. This shows that the proof pattern is not valid.

Proof Patterns

Read the script and look at discmath.ch for more examples. The proof patterns are very standard so you can also find good explanations on the internet.

Exercise Sheet Recommendations

Do all the exercises! 3.6 2) is a three-star, but actually not that difficult (and very similar to the example in the script if you need a hint), so definitely try it!