Monday, March 20, 2023

Liar's Paradox Revisited by a Programmer

I'm not sure I've blogged about the liar's paradox before, but that's not what I mean by revisited. 

A common version of this paradox is that someone looks you in the eye and says, 

I'm telling you a lie.

Well, this isn't really hard in the real world. If it's a good friend, you punch him in the arm and say,

Yah, yer just messin' with my mind.

If it's someone you don't know very well who is trying to sell you real estate, you cough politely and say, 

Yeah. Right.

And get out of there as fast as is permissible. 

But logicians love to have their minds messed with, so they say that is all too unsatisfactory. We must either find a way to say it's true or it's false, or find a good general reason why we don't need to. 

No, we don't really need to do this. But since I took a little time to listen to a YouTube video on the subject today, I'm going to give you several good, general reasons why.

First, let's set the problem up sort-of formally:

This sentence is false.

The above sentence has the same problem. We can resolve it by noting that some sentences are neither true nor false. 

But then we have logician A say,

This sentence is not true.

And logician B, who has binary categorization compulsion, says, "But ...

  • If it's true it's not true, and that doesn't work.
  • If it's false it's true, and that doesn't work.
  • And if it's neither true nor false, it's true, and that doesn't work.

Which ignores the possibility of a sentence being both true and false, but we'll wink at that for a moment. 

Logician B then continues with, "How about this one? ...

  1. The sentence below is not true.
  2. The sentence above is true.

If you're willing to walk along with this logician, you can see the problem he is facing.

Now, if you know much about programming, you might recognize that, whether you split this up or say it in one sentence, you are dealing with recursive definition, a definition that (in other words, recursively) tries to define itself, or a set of definitions that mutually recursively define each other.

If you write a program this way, you tend to either blow your program stacks or, if the recursive part can be optimized to tail recursion, put the program into an endless loop.

Recursive definitions need a resolving definition path just like recursive programs need a terminating condition. And, just like recursive programs without a terminating condition are not valid programs, recursive definitions without a way to resolve the recursion are not valid definitions -- in terms of formal logic.

Just like reasoning from a false hypothesis is known to be an error in formal logic, trying to resolve a definition that is known not to be valid is known to be an exercise in futility. 

(And there is also a corollary in division by zero, really.)

Now, the real world is not binary. We can talk about Planck's constant and about quantum mechanics, but the real world is not really composed of discrete values, discrete conditions, discretely resolving logical states, etc. Not for our purposes in this thermodynamic world.

A statement can, in fact, be both true and false. Let's look at the statement I started with:

I am telling you a lie.

Depending on the context, 

  • this may be a signal for the listener to look deeper at what the speaker is saying, in which case, we can say it is true for our purposes. 
  • Or it may be an attempt to give the listener a false sense of security, in which case we can say it is false for our purposes.
  • Or it may be a riddle designed to entertain, in which case it is both true and false. (See?)
  • Or the speaker may just be talking randomly, in which case it might be something we can neither call true nor false.

There are, indeed, four possible results when analyzing any such assertion. We only need to restrict our set of acceptable results when we choose to restrict our set of acceptable results, and we simply should not choose to do so when dealing with assertions like these.

Similar reasoning holds for 

I am not telling the truth. 

One more, consider the statement 

I am shading the truth.

This is a statement that inherently disallows binary interpretation, so even compulsively binary logicians can't complain. It's not a good thing to shade the truth, but a person can say he is without invoking the liar's paradox.

No comments:

Post a Comment