Hacker News new | ask | show | jobs
by denton-scratch 704 days ago
> Let n equal 3 if God exists, or 5 if God does not exist. Is n prime?

[Not yet finished the article]

Author says the answer is True. I say the question is malformed, and cannot be answered.

4 comments

I guess you could reformulate the intent of the problem as:

Let P be an arbitrary program and let n be equal to 3 if P terminates, or 5 if not.

Is it still malformed? Is so, then how about

Let n be equal to 3 Goldbach's conjecture is true, or 5 if not.

(A and X) or (A and (not X))

simplifies to A in classic logic.

I guess there's an ambiguity whether "God exists" is a propositional variable.

Isn't this the law of excluded middle (rejected by intuitionists and constructivists)?
Let n equal 3 if LEM is valid & sound, or 5 if LEM isn't valid & sound. Is n prime?
Why can't it be answered? It seems trivial to answer.
The question is malformed because it contains a term that cannot be evaluated.
I see the question this way:

   fn is_n_prime_whether_or_not_God_exists()
       if (is_prime(3) && is_prime(5)) { // early return 
            return true;
       } else { 
            return three_if_God_exists_five_otherwise(); 
       }
   }
Even if evaluating that would make no difference?
"God" has some unique properties. One of those might be that God neither exists nor doesn't exist. If God has this property of 'neitherism', then the value of n is undefined. Neitherism has been attributed to many religious entities.

To answer a question, you first have to be able to parse the question.

That's the problem with side effects: you don't know if they make a difference until you evaluate them. And "God" is about the biggest imaginable side effect.
Well, the compiler says undefined behavior and optimizes it away :D