Live data from Hacker News

A case against Boolean logic

abuseofnotation.github.io

41–50 of 97 posts

Re: A case against Boolean logic

#41
I think this question of what sentences can have truth value attached to them is significant. The liar paradox (a sentence in a formal language stating itself to be false) clearly doesn’t have a truth value. A statement that a specific program halts, however, does seem to be either true or false, regardless of whether or not a general algorithm exists that can answer such questions. In a sense, all sentences that fall on the arithmetical hierarchy seem to me to intuitively have a Boolean truth value (in the standard model, which we assume corresponds to what a program would actually “do” if we ran it forever).

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.

Re: A case against Boolean logic

#42
post #22
post #13

In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. 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…

> Like, it gets used a lot in SQL 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.

I thought about mentioning nulls, but it's a complicated subject. Not all columns are nullable. Null handling rules differ. It's not always ISO/ANSI.

Re: A case against Boolean logic

#43
post #13

In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. 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…

From an information theory perspective, the most efficient base for computations would be e (2.718). And trinary is closer than binary.

True. Radix economy.

Re: A case against Boolean logic

#44

"Each statement can be true in one context and false in another." 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 thos…

Yes, in some contexts absolute truth/falsity exists. For example, in a list of exercises about Boolean logic. Or circuits modelled after Boolean logic.

Re: A case against Boolean logic

#45
post #17

Earlier quoted context omitted.

> If we had ternary processors, ternary logic would be more popular. 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.

generally a sort of Unknown though it depends on the formulation. https://en.wikipedia.org/wiki/Three-valued_logic

It can also map unto "maybe", which opens another can of worms.

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.

Re: A case against Boolean logic

#46
This blog is one of the most confused and inaccurate collection of writing that I recurrently find on HN. The account spams a deeply flawed blog post about 'Category theory illustrated' (also referenced from this article) where it misstates central theorems in CT and this 'Case against boolean logic' article, which promises an alternative to Boolean logic, but never formulates one.

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.

Re: A case against Boolean logic

#47
post #13

In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. 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…

> 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?

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...

Re: A case against Boolean logic

#48
The normal term for the logic that has two truth values, the law of non-contradiction, and the law of the excluded middle is 'Classical Logic' which dates back centuries before George Boole. Non-classical logics which deny one or more of three properties that I've mentioned also exist

Re: A case against Boolean logic

#49
Ternary logic seems to be widely regarded as useful in computation, because it’s implemented in several programming languages. For example, in Julia the “missing” value supplements true and false to form a ternary system.

Re: A case against Boolean logic

#50
post #30
post #13

In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. 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…

In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. 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…

The known/unknown question is not separate in the real world, computing avoids it by asking binary questions only when they’re answerable. 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.
Post reply on HN