Boolean logic (a.k.a. Propositional logic) is restrictive in what it can express.

It is useful because

`if(a < b || (a >= b && c == d)) ...`

can be simplified to

`if(a < b || c == d)`

\(\top\) and \(\bot\) | Denote true and false |

\(P\) and \(Q\) | Denote propositions |

\(P\wedge Q\) | Denoting conjunction |

\(P\vee Q\) | Denoting disjunction |

\(\neg P\) | Denoting negation |

Other people define different syntax

\(1\) and \(0\) | Denote true and false |

\(P\) and \(Q\) | Denote propositions |

\(P.Q\) | Denoting conjunction |

\(P + Q\) | Denoting disjunction |

\(\overline{P}\) | Denoting negation |

let's call these **terms**.

All terms are sentences.

If \(\alpha\) and \(\beta\) are sentences then \((\alpha \wedge \beta)\) is a sentence.

Similarly \((\alpha \vee \beta)\) is a sentence.

A sentence in Boolean logic evaluates to either **true** or **false**.

Mostly stem from applying linguistic interpretation of a sentence rather than an logical interpretation.

Aidan bought a motorbikeandwent to work.

The English sentence has issues

- temporal implicature
- causality

Which is why we formalise in the first place.

Eat your carrotsoryour peas.

- Exclusive
`or`

*versus*inclusive`or`

.

Logical **or** is inclusive. Exclusive **or** more precisely translates as

Eithereat your carrotsoryour peas.

Some people add implication to their set of Boolean connectives.

\(P\rightarrow Q\) read as "if P then Q"

This shorthand for \((\neg P \vee Q)\), it causes significant confusion.

- Boolean Logic is a useful system for demonstrating computational thinking.
- A visual approach to Boolean Logic is useful.
- The visual approach extends to First-order logic (and Second-order).
- Learners make consistent types of mistakes -- knowing these allow us to target interventions.

- I'm always happy to answer questions over email.