In another respect, boolean logic is popular because it's easy to reason about. The truth tables are relatively small in size and quantity. Not the case with ternary.
Ternary is probably way better at modeling the real world, but the complexity could make code hard to understand. Maybe that can be solved.
That said, boolean logic is more expressive than I think the blog post gives it credit for because it's usually only a part of the code. Like, it gets used a lot in SQL, where you're reasoning about with several columns. So, yeah, it's binary thinking on each dimension, but there are N dimensions.
The alternative presented is intuitionist logic, which is practically what in the computing world? Where is it used? Or where could or should it be used? I guess it can be represented in lamba calculus...
The Curry-Howard correspondence[1] tells us that every function is a proof (in the intuitionistic sense) of the proposition represented by its return type, given the axioms ("context" in the article) represented by its arguments.
This fact is leveraged heavily by proof assistants (as mentioned in the article), but is generally useful in any statically-typed programming language.
[1]: https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
Why? Boolean logic is older than its namesake, George Boole (1815-1864). Syllogisms are ancient. And we've had ternary systems, as well as others.
And what does the third value represent? True and false are pretty universal when it comes to predicates, but anything in between is rather subjective.
So, in terms of radix economy, ternary computing is the most efficient, but you're leaving information density unused if you use it for binary, and representing ternary with binary is inherently inefficient.
Not that there's anything wrong with having an extra value "unknown", but it doesn't fundamentally alter the logic. As unknown in most cases means "it will be true or false at some point", its usage in computing is that of a singleton (who needs a word with 64 potentially unknown bits?), so dealing with unknown values as an exception is easier than permeating hardware with it. Using ternary to represent unknown is just not efficient.
Ternary truth values combines two dependent binary questions - do we know the truth value of X and what is the truth value of X. The second one is meaningless if the first one is false. You can merge the two binary values into one ternary unknown, true, and false but this does not really change much. Depending on the context one or the other might be easier to work with. Option types generalize this, there is always a binary choice between the value is known or unknown, and if it is known, then there will also be the actual value. A ternary logic value is just Maybe<Boolean>.
Considered generally, though, if I ask a true/false question then read your answer from a single bit, it may be the case that there is no possible way for you to not lie to me.
Then you are not asking a binary question. If there is, for example, the possibility that I might not know the answer, then you are actually asking two dependent questions - do you know the answer and if so, what is the answer.
Is it not true that the brain process in ternary?
From the point of view of perception, I believe that we process the world in terms of pairwise comparisons. For example, the atomic indivisible of visual processing is figure/ground separation.
It can arduously crank through simple logic problems with its ludicrously tiny memory (around 8 bytes). Everything else is intuition and guesswork.
You can try to model those heuristics with various logics. Some logics work better in certain situations. Classical first order logic is actually really bad at modeling brain work, but it's simple to automate, so we use it even where it's wildly inappropriate.
Back in ancient CS classes my prof said that was a Russian attempt of building ternary processors with +1, 0, -1 represented as voltages.
Another strike in for-ternary column is that it's the most efficient in the number of digits for representing numbers. Pi is optimally efficient but non-integer bases would break anyone's brain, I think.
The author also made a more approachable miniseries in Russian: https://habr.com/ru/articles/496366/
Except it explicitly is not strictly Boolean in SQL because of nulls.
X = Y can take the value true, false or null if either or both X and Y are null.
OTOH there is stuff like this planned to launch, which may compensate that lack of commercial availability somewhat:
https://news.ycombinator.com/item?id=48177736
Though it's not ternary per se, it could be seen as several steps further above that.
It has 2 operators: + and x (or more commonly: dot (.) - but this is more confusing on HN)
Also both + and x operations distribute, so A+(BxC) = (A+B)x(A+C)
The article instead gestures toward a heavily conflated 4 epistemic 'categories' (True, False, Unknown / unknowable, Meaningless / senseless) that conflate semantic truth values, epistemic states, and linguistic well-formedness.
You can represent all of these distinctions inside ordinary first-order logic. You can have:
Meaningless(fact)= True/False
Unknown(fact) = True/False ...and so on and so forth.
Where's the escape from boolean logic now? If anything, it points you to the fact that boolean logic is much more flexible than the given categories, which box you, from infinite possibilities into a few. Ironically, this could be abused even better by authority. An institution could simply say 'Human rights is a meaningless question, in the context of progress and prosperity. Asking us if we're for or against it is binary thinking.'
The biggest blind spot however is the idea that a proof is a universal tool for getting to truth. This completely dismisses the central thesis in philosophy and science of analytic-synthetic distinction. Intuitionistic proof theory works for analytic claims (like math) because their truth is self-contained. But synthetic claims (clamis about how the real world actually is) cannot be proven with mathematical certainty, but only supported, challenged or revised via empirical observation.
By trying to map formal proof theory directly onto politics and psychology, the author ignores how empirical truth actually works, e.g. gravity isn't proven like a theorem. as Popper noted, scientific theories are falsifiable and subject to revision, shifting from Newtonian to relativistic contexts while reality stays the same.
I agree with you that you can approximate continuous/analog systems with discrete/binary ones, but those approximations (almost) always have some loss of accuracy, assuming, arguendo, that accuracy even exists. For most purposes these "tolerances", if you will, are acceptable and even desirable. Thus the op also falls into the binary trap suggesting that the only right way to do things is the op's way.
The quasi-political rant at the end does feel misplaced. While I see the op's general point, e.g. political polarization, the introduction/switch into the topic feels at least jarring.
Is this statement itself true in all contexts, or only in some contexts? If it's true in all contexts, then we need an explanation for why this specific statement gets an exception from the rule. If it's false in some contexts, then there exist some contexts where absolute truth/falsity exists, so we can go ahead and use boolean logic just fine in those contexts.
Contexts don’t change much. They are merely implicit knowledge, subject to the same binary standard. They don’t change the truth, only applicability.
Mentioning Gödel here is not just cliche, it’s irrelevant. Gödel is about artificial formal deductive systems. They are not a claim to exclusive philosophy.
Should we build Boolean networks that represent biological systems that have specific configurational requirements or should the model itself encode the limited context?
Often we choose something in-between, where the Boolean model of our biological system has some configurational choices (the context), but we can modify the context to see how the system operates in non-standard conditions.
All of this is with the hope that the ways that the model produces contradictions and unexpected behaviors can inform how our reality produces contradictions and unexpected behaviors (most commonly cancers). The states of the representative system, the Boolean network, may make no sense, and we can diagnose why with a Boolean network, when it would be neigh impossible to understand that odd state in the real system.
If you just consider time, there are statements whose truth you can't determine: "It will rain tomorrow" (BTW, tomorrow "tomorrow" will be the day after tomorrow)
I failed her anyhow.
Should I tell her that boolean logic is not applicable on my intentions?
I also admit that the blogpost is lacking in many respects.
We could bring quantum physics as a simple example of binary logic collapsing, but in programming there are countless ones.
A simple one is a table of users in SQL, where age can be `null` and not just a positive number.
For filters like "age < 18" and "age > 18" a binary answer cannot model business logic decisions on this set of data properly.
Thus SQL implements a third logic value, UNKNOWN.
Another simple example "is the room hot?".
This is by intuition a bad fit for binary logic. Even if you define "hot" as 30C it's quite clear that the problem is way too nuanced and context dependent to model with binary logic, you need more than two possible answers than yes/no.
If you write code that has to handle it, you still need to consider 3 cases, you can never reduce it to two cases only.
Probability theory presupposes that there's a 0 to 1 or 0 to 100 scale of "truthiness" (depending on which scale one might prefer), while the true non-boolean logic has the guts to fully embrace Parmenides's view on One and the Multiple.
We could also try and approach "knowledge" the way that the 5th-6th century Christian mystics were trying to do during their quest to approach the nature of the Divine (or of the Truth, taken in a more restricted manner) via negatives, more exactly via "turning away their faces from said Truth". Interesting that those Christian mystics were an intellectual continuation of the 3rd-4th century Neoplatonists.
https://en.wikipedia.org/wiki/Brouwer%E2%80%93Hilbert_contro...
You can prove more stuff with classical logic while intuitionistic logic restricts you.
For example given a real number x constructed in intuitionistic logic. You can't determine if x > 0 or x = 0 or x < 0. While you can in classical logic.
Also, more generally you can't prove existence statements in general without construction in intuitionistic logic.
So, there exists an x such that P(x) can be proven without actually finding x classically, but in intuitionistic logic I must provide a procedure for constructing x.
All this said, even though you can prove less statements in intuitionistic logic I find it's restrictions satisfying because it forces us to prove things by showing they exist via construction. Which to me is more satisfying than just showing that a construction exists.
"On the odd day, a mathematician might wonder what constructive mathematics is all about. They may have heard arguments in favor of constructivism but are not at all convinced by them, and in any case they may care little about philosophy. A typical introductory text about constructivism spends a great deal of time explaining the principles and contains only trivial mathematics, while advanced constructive texts are impenetrable, like all unfamiliar mathematics. How then can a mathematician find out what constructive mathematics feels like? What new and relevant ideas does constructive mathematics have to offer, if any? I shall attempt to answer these questions"
https://ww2.ams.org/journals/bull/2017-54-03/S0273-0979-2016...
https://math.andrej.com/2016/10/10/five-stages-of-accepting-...
Set theoretic questions like AC or CH are much more difficult for me to intuitively grok in the same way, because they don’t seem to “obviously” be either true or false. You can take either and still end up with a (presumably) consistent theory.
You can reduce any statement to a series of true/false statements. Now, it may take a lot of statements, but that’s not the point. The point is to have the base be as simple as possible