Live data from Hacker News

A case against Boolean logic

abuseofnotation.github.io

11–20 of 97 posts

Re: A case against Boolean logic

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

Re: A case against Boolean logic

#14

fp folks trying to reinvent probability theory is hilarious

> probability theory

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.

Re: A case against Boolean logic

#15

fp folks trying to reinvent probability theory is hilarious

Non-boolean logic is more than a century old. 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" a binary answer cannot model business logic decisions on this set of data properly. Thus SQL implements a third logic value, UN…

For 3 values, don’t you just need a pair of booleans ? Known or unknown… If known: 0 or 1 …

Re: A case against Boolean logic

#16
post #7

TIL there's a whole rabbithole of "why vs why not intuitionist logic": https://en.wikipedia.org/wiki/Brouwer%E2%80%93Hilbert_contro...

Intuitionist logic seemed to me like a superset of regular logic. Like a generalization that gives you more choice. Like having an 8x8 board for anything instead of always playing chess. Seems like a good idea.

I'd argue the opposite.

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

Re: A case against Boolean logic

#17
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…

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

Re: A case against Boolean logic

#18
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…

> Ternary is probably way better at modeling the real world, but the complexity could make code hard to understand. Maybe that can be solved.

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.

Re: A case against Boolean logic

#19

How about you demand context is always attached to "boolean logic"? Because what author is describing is just plain bait and switch, nothing related to boolean algebra.

Indeed. "Breaking news! Function changes value when parameter changes. News at 11."

Re: A case against Boolean logic

#20

How about you demand context is always attached to "boolean logic"? Because what author is describing is just plain bait and switch, nothing related to boolean algebra.

Yes, I think this path quickly leads to Boolean valued models or Boolean Algebras with Operators or Krike Frames or .... In other words, there are many well studied, well understood ways of relating epistemology, context, uncertainty to an otherwise Boolean model.
Post reply on HN