bigmachine-io / imposter-v2

Code and Issues for the Imposter's Handbook, Season 2
39 stars 8 forks source link

The truth table for Implication is wrong #4

Closed xsimov closed 6 years ago

xsimov commented 6 years ago

What

Logic operation Implication

Where

Pages 24-25 of the 001 version, I guess (the PDF is titled Imposter2_001.pdf).

What did I expect

The truth table for the implication in page 25 should display

A B A->B
0 0 1
0 1 1
1 0 0
1 1 1

The result of the A -> B column is reversed. The example on the wikipedia shows 1 0 1 1 because the columns are reversed, first the Ts and then the Fs: https://en.wikipedia.org/wiki/Truth_table#Logical_implication

The explanation on page 24 is also reversed:

To that end, we know our expression is true when A and B are true, when they are false and when A is true and B is false.

That would be the other way around: when A then B and B is false, so it should be false.

That means we're dealing with OR that has a special trick that a regular OR can't do: return true when A and B are false *. The only way to do that is by negating A: ¬𝐴 ∨ 𝐵.

* And also return false when A is true.

robconery commented 6 years ago

Cheers, thanks :). This is a tough one :).

robconery commented 6 years ago

This is fixed thanks!