On the arbitrariness of truth(iness)

Since @jar1 thrust this conversation into discussing Boolean algebra, a field in which they recently changed my mind, I wanted to share some of these new thoughts.

TLDR: Corresponding false/true with 0/1 is arbitrary and awkward; it’s more coherent to use -inf/inf instead.

Like the truthy and falsy values of the OP, the choice to consider 0 falsy and 1 truthy is similarly arbitrary, and as this thread demonstrates it makes for an awkward algebra. There are other ways in which it’s awkward too: for example, and (\wedge) and or (\vee) are commonly considered analogous to multiplication and addition respectively, with operator precedences reflecting that, yet they both distribute over each other (in contrast, numeric addition does not distribute over multiplication!).

In these Unified Algebra essays 1 and 2, compsci prof Hehner at U of T argues that, to integrate Boolean algebra cleanly into our algebra of numbers, the numeric value corresponding to truth should be \top (the top of the number lattice, usually positive infinity), and the numeric value of falsity should be \bot (the bottom of the number lattice, usually negative infinity). Instead of the conjunction \wedge and disjunction \vee operators, use \downarrow (min) and \uparrow (max) respectively.

Then, where p,q\in\{\bot,\top\}, instead of p\wedge q (p and q) you’d write p \downarrow q (p min q), instead of p \vee q (p or q) you’d write p \uparrow q (p max q), and instead of p \veebar q (p xor q) you’d write p \ne q. Also, instead of p \implies q (p implies q) you’d write p \le q (p order q), instead of p \iff q (p iff q) you’d write p=q, and instead of writing DeMorgan’s laws as \neg(p\wedge q)\iff\neg p\vee\neg q and \neg(p\wedge q)\iff\neg p\vee\neg q, they’d be written: -(p\downarrow q)=-p\uparrow -q and -(p\uparrow q)=-p\downarrow -q. Notice that all the operators—min, max, negation, and comparisons—are in common with regular numeric algebra.

Mathematically, I like that this concept unifies Boolean algebra with numeric algebra. Epistemologically, I like that whatever discomfort people have toward the concept of infinity, they should rightly have toward the attainability of certain truth (an attitude of humility). And practically, with a background in analog chips, I like that this concept is reflective of the circuits we design to convert a continuous signal into a binary one: comparators, circuits which ideally have infinite gain about their decision point, whose output saturates at finite V_L and V_H out of practical necessity but which otherwise could be thought of as returning V_\bot or V_\top. Also, the designs of and and or gates are complementary; it’s strange for one to correspond to an operator with higher precedence than the other (mobility \mu_e/\mu_h notwithstanding).

It’s a major departure from popular languages though, so I don’t think we’ll see it anytime soon, but dropping other silly notions of truthy and falsy is a good start. Maybe in Julia 3.0 :wink:

6 Likes