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 A⇒B, 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 |
A⇒B | A implies B |
Since our focus is primarily on inference, let’s use probability calculus to derive the following rules of propositional calculus:
A⇒B≡ˉA+BA⇒B≡ˉB⇒ˉAWe can take an example to illustrate those rules:
A⇒B: | 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(A∣e) our probability estimate for the truth of A given evidence e and we note pe(⋅)=p(⋅∣e).
The following rules hold:
negation: | pe(ˉA)=1−pe(A) |
sum rule: | pe(AB)=pe(A∣B)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.
A⇒B≡ˉA+B
- Let e = “A⇒B”
- By definition of e, we have: pe(B∣A)=1
- We want to show that: pe(ˉA+B)=1
Use the binary partition rule:
pe(B)=pe(BA)+pe(BˉA)=pe(B∣A)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)=1Which achieves the proof that give A⇒B, we have ˉA+B. Let’s prove the other direction.
- Let e = “ˉA+B is true”
- As shown before, pe(B)=pe(B∣A)pe(A)+pe(ˉBA)
So, on the one hand we have:
pe(ˉA+B)=pe(ˉA)+pe(B)−pe(ˉBA)=pe(ˉA)+pe(B∣A)pe(A)+pe(ˉBA)−pe(ˉBA)=pe(ˉA)+pe(B∣A)pe(A)And on the other hand we have:
pe(ˉA+B)=1pe(A)+pe(ˉA)=1Therefore:
pe(A)+pe(ˉA)=pe(ˉA+B)=pe(ˉA)+pe(B∣A)pe(A)pe(A)=pe(B∣A)pe(A)1=pe(B∣A)Which is what had to be proved. Let’s turn to our second proof.
A⇒B≡ˉB⇒ˉA
Let e = “A⇒B” | so that pe(B∣A)=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)=1−1=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 A⇒B also means B⇒A? 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