Processing math: 100%

Propositional logic derived as a special case of probability calculus

Mar 17, 2018

In this article, I will apply the rules of probability calculus to derive the rules of propositional logic (also called propositional calculus).

This article is very formal and equation oriented. The goal is to show that bayesian thinking through probability calculus is fully compatible with propositional logic. This article contributes to a bigger purpose since I will show in an upcoming article how probability calculus explains inferences that can’t be made using propositional logic. In particular, if we know that A is a cause of B, written AB, then knowing that B is true in propositional logic doesn’t tell us anything about A. But the next article will show that probability calculus gives us more information about A. Before we explore those extensions, let’s review our basics in the light of the new formalism.

Notations: given two propositions A and B, we use the following notations.

Notation meaning
A+B A or B
AB A and B
ˉA not A
AB A implies B

Since our focus is primarily on inference, let’s use probability calculus to derive the following rules of propositional calculus:

ABˉA+BABˉBˉA

We can take an example to illustrate those rules:

AB: If it rain tomorrow then I will go to the cinema;
ˉA+B: Either it doesn’t rain tomorrow
or you can be sure I’ll go to the cinema;
ˉBˉA: If I don’t go to the cinema tomorrow,
this means it’s not raining outside.

Before we dive in, let’s recall the rules of probability calculus.

Probability calculus primer

Let A and B be two propositions and e (as in “evidence”) a set of propositions. We note p(Ae) our probability estimate for the truth of A given evidence e and we note pe()=p(e).

The following rules hold:

negation: pe(ˉA)=1pe(A)
sum rule: pe(AB)=pe(AB)pe(B)
product rule: pe(A+B)=pe(A)+pe(B)pe(AB)

If H1,...,Hn is a collection of n propositions that are exhaustive (at least one of them is true) and incompatible (no two of them can be true at the same time), then we have for all proposition A:

exhaustivity: pe(H1+...+Hn)=1
partition rule: pe(A)=pe(AH1)+...+pe(AHn)

In particular, A and ˉA satisfy these properties:

exhaustivity: pe(A+ˉA)=pe(A)+pe(ˉA)=1
binary partition rule: pe(A)=pe(AB)+pe(AˉB)

If you want to know more about the how these rules were constructed, check out this article: Probability calculus: the logic of uncertainty.

Now that we are all setup, let’s tackle propositional logic.

ABˉA+B

  • Let e = “AB
  • By definition of e, we have: pe(BA)=1
  • We want to show that: pe(ˉA+B)=1

Use the binary partition rule:

pe(B)=pe(BA)+pe(BˉA)=pe(BA)pe(A)+pe(BˉA)=pe(A)+pe(BˉA)

Hence:

pe(ˉA+B)=pe(ˉA)+pe(B)pe(ˉAB)=pe(ˉA)+pe(A)+pe(BˉA)pe(ˉAB)=pe(ˉA)+pe(A)=1

Which achieves the proof that give AB, we have ˉA+B. Let’s prove the other direction.

  • Let e = “ˉA+B is true”
  • As shown before, pe(B)=pe(BA)pe(A)+pe(ˉBA)

So, on the one hand we have:

pe(ˉA+B)=pe(ˉA)+pe(B)pe(ˉBA)=pe(ˉA)+pe(BA)pe(A)+pe(ˉBA)pe(ˉBA)=pe(ˉA)+pe(BA)pe(A)

And on the other hand we have:

pe(ˉA+B)=1pe(A)+pe(ˉA)=1

Therefore:

pe(A)+pe(ˉA)=pe(ˉA+B)=pe(ˉA)+pe(BA)pe(A)pe(A)=pe(BA)pe(A)1=pe(BA)

Which is what had to be proved. Let’s turn to our second proof.

ABˉBˉA

Let e = “AB so that pe(BA)=1
We want to prove that: pe(ˉAˉB)=1
We know from the previous section that: pe(ˉA+B)=1
This means that: pe(AˉB)=11=0
Since: pe(ˉB)=pe(AˉB)+pe(ˉAˉB)
We have: pe(ˉB)=0+pe(ˉAˉB)
Also written: pe(ˉB)=pe(ˉAˉB)pe(ˉB)
And thus: pe(ˉAˉB)=1

We can obtain the opposite direction by replacing A with ˉA and B with ˉA.

Did you ever notice that most people think the rule AB also means BA? Probability calculus explains why by showing us that if we know B, then the probability of A increases.

Read my next article to find out: Why bayesian inference is more powerful than logic