# On the arbitrariness of truth(iness)

**URL:** https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381
**Category:** Internals & Design
**Created:** [May 20, 2022, 3:32pm UTC](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381 "2022-05-20T15:32:55Z")
**Posts on this page:** 1
**Showing post:** 54

<div class="post-metadata">

### Author: ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)
#### Post date: [March 25, 2023, 5:43am UTC](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381/54 "2023-03-25T05:43:05Z")

</div>

I should mention another philosophical benefit of identifying logical \{\bot,\top\} with numeric \{-\infty, +\infty\}.

In the field of communication, detecting a binary symbol entails roughly demodulating and filtering of some sort, followed by (for phased arrays) a projection from a high-dimensional space to a scalar, followed by a comparison against a threshold.

A natural question should be: what is the _ideal_ binary symbol? Well, it’d be the one that can be subject to any degree of noise pollution as it propagates through the channel, and still maintain zero transmission errors—there should be infinite spacing between symbols. The natural answer is an infinite signal in \{\bot,\top\}.

In practice one must of course trade off the various limitations that don’t permit real signals to have infinite (or negative) power or bandwidth, but the notion of an ideal is generally a useful mental tool.

> [@bertschi](#):
>
> just identifying \top and \bot with 1 and 0 does not aim to embed the Boolean algebraic structure in any meaningful way. Instead, I tend to think of it as a short-hand notation for the indicator function or [Iverson bracket](https://en.wikipedia.org/wiki/Iverson_bracket) which is quite handy for arithmetic involving Boolean conditions, e.g., `abs(x) = x * (x > 0) - x * (x < 0)`.

This is a good perspective—identifying logical \{\bot,\top\} with \{0,1\} isn’t the most philosophically coherent, but it makes the Iverson bracket implicit, which is handy practically. It means Boolean vectors implicitly serve the role of indicator functions, which is also handy.

Maybe if Julia had a nice indicator function/explicit Iverson bracket, we could work around this. The parsing rules around numeric literals make it difficult to use `1` as an Iverson bracket. Then again, the implicit Iverson bracket sure is handy for [Code Golf](https://discourse.julialang.org/t/code-golfing-fizzbuzz/95354/1).

---

_[View the full topic](https://discourse.julialang.org/t/on-the-arbitrariness-of-truth-iness/81381)._
