Boolean Logic: Decoding Compound Propositions

    Boolean Logic: Decoding Compound Propositions

      Simple connectives are great…when you only have two variables. Computer programs can have literally billions of variables, so we need ways to combine propositions. All simple connectives can be strung together in infinite combinations, each of which has its own truth table. Some of them are redundant, but that's another story. Compound propositions can look as pretty as:

      ~(XY)

      Or uglier than this:

      [~(XY) ⨁ (~XY)] ∨ [(~X ⨁ ~Y) ∧ (X ∧ ~Y)]

      [sigh]

      Figuring out what they mean is basically like cracking a logic code, which makes you basically a spy. At least as much as Alexa Vega is a spy, at any rate.

      Here comes the part in the spy movie where we show you all the oddly specific tools you'll need to solve compound propositions.

      1. A truth table. We're going to share a little secret with you: to find the truth value of a compound proposition, all you need to do is build it up from simpler propositions using a—you guessed it—truth table. 
      2. Columns for the simpler propositions. Each of the simpler propositions gets its own column in the truth table. That way you don't have to store all the truth values in your head; you can do it all on paper.
      3. 2propositions + 1 rows. All possible combinations of True and False for the propositions need to show up. Otherwise we could miss a really important combination.
      4. A suitably spy-like outfit. That's self-explanatory.

      If we want to get our spy on by cracking the code of [(~X ∨ Y) ∧ X], we can create a table like this:

      XY~X(~X) ∨ Y(~XY) ∧ X
      11011
      10000
      01110
      00110

      All the major components get their own column:

      • X
      • Y
      • X
      • ~XY

      Once we have all the key parts, we'll only need to evaluate that last column with one added layer to figure out what the whole statement—(~XY) ∧ X—looks like.

      Everything depends on the values of X and Y. Finding ~X depends on X, and finding ~XY depends on ~X and Y.

      Flex your spy powers now and look a little more closely at the table. The truth values of this complex statement boil down to equal the same thing as XY. If you think about it, that makes a lot of sense. ~XY will take any combination where X is false or Y is true. Then you get the conjunction with X, which is going to cancel out the ~X. All that's left is the time where both Y and X are true.

      That means the two propositions are equivalent and can be used interchangeably without any problems. Which is nice, because...XY is a lot easier to understand right away than (~XY) ∧ X.

      Especially in logic, clarity is premium, so you'll want to simplify down as much as possible whenever possible.

      Tautologies and Fallacies

      A good spy is a lazy spy.

      Yeah, not so much. But a good logician is a lazy logician, that's actually true. Some propositions make being lazy easier than using a Potty Putter to perfect your tee. When the truth value of a simpler propositions doesn’t affect the truth value of the compound proposition, it's safe to trade the two and rely on the simpler proposition to get the job done. Some propositions are just always True or always False, no matter what.

      If a proposition is True no matter what, then it's called a tautology.

      Some good tautologies include:

      • True.
      • X ∨ True. 
      • X ∨ ~X.
      • A tautology is or is not a tautology.
      XTrueX ∨ True~XX ∨ ~X
      11101
      01111

      Since we have a word for something always true, we might as well talk about something that's always false. If a proposition's always False, it's a fallacy.

      Fallacies look like:

      • X ∧ False. 
      • X ∧ ~X.
      • A tautology is not a tautology.
      XFalseX ∧ False~XX ∧ ~X
      10000
      00010

      The trick isn't spotting tautologies or fallacies that are this simple; it's about finding the ones that simplify down to the simple ones. You could have a statement like this:

      (~A ∨ (BA) ∨ C) ∨ ~C

      And figuring out that it simplifies down to True. You can do that through a—you guessed it—truth table.