Mechanics: Fundamentals – Extra – Set Logic
Usually, the only logic you involve in programming is the simple propositional logic, a.k.a. 0th order logic that is used when constructing boolean expressions. That’s by far not the only form of logic that can be used when programming. Outside of the imperative paradigm or within specialised libraries, you can encounter such things as 1st order logic, fuzzy logic or three-valued logic.
This time, however, I’m going to present the idea of set-based logic. Unlike the other alternate logics I’ve mentioned this one isn’t anything that goes beyond the bounds of propositional logic, it is merely an alternate representation that makes some operations clearer.