Live data from Hacker News

A liar who always lies says "All my hats are green."

theguardian.com

271–280 of 419 posts

Re: A liar who always lies says "All my hats are green."

#271

Earlier quoted context omitted.

I think there's a sort of divide-by-zero problem here. Does an empty set of hats have a color? You could arbitrarily define "all my hats are green" for the empty set as either true or false as part of a consistent logical system. There isn't enough information in the question to know whether we should pick one or the other, though there's probably a colloquial preference for true.

Is there not a convention within formal logic defining this type of statement to be true or false?

There is.

  [].all(x => whatever(x)) == true
At least that's how math usually thinks about it.

Re: A liar who always lies says "All my hats are green."

#272
post #263

Earlier quoted context omitted.

Yes we can because if there are no ten-foot tall men, then it is indeed true that "All ten-foot tall men have brown hair"

It seems intuitively wrong that you can say "All X are Y" and yet that doesn't imply "At least one X exists".

It also seems intuitively wrong that there are different sizes of infinity, yet Cantor discovered exactly that.

Re: A liar who always lies says "All my hats are green."

#273

I never liked this type of puzzle. It is not formal logic but more about the idiosyncrasies and conventions of the English language. I put this puzzle on par with Agatha Christie’s murder mysteries. It requires a suspension of disbelief and logic to be believable. Someone who always lies means in the purest sense means you cannot trust anything they say. Even the word “hat” could mean they are talking about their pet…

if you look at it as a programmer, vacuously true makes sense.

In js if I write:

  const allHatsGreen = hats.every(hat => hat.color === 'green');
it will be true if hats is empty. Same thing for C# Linq. Imo this makes sense, because if I write:

  const matchAllConditions = conditions.every(condition => condition.matches(item))

In some condition matcher (lets say I want to check rules before an user is allowed to post), the correct behavior is the result to be true, when the array is empty.

I'm not well versed, in functional programming, but in Ocaml (of F#, hehe) it would be

  let rec all_hats_green = function
    | [] -> true
    | hat::rest -> hat.color = "green" && all_hats_green rest
so in a recursive implementation, this is the behavior that makes sense.

Re: A liar who always lies says "All my hats are green."

#274
post #263

Earlier quoted context omitted.

Yes we can because if there are no ten-foot tall men, then it is indeed true that "All ten-foot tall men have brown hair"

It seems intuitively wrong that you can say "All X are Y" and yet that doesn't imply "At least one X exists".

That's how math defined what "all" means. You can be talking about all elements of empty set without implying it must have some.

Basically it disentangled two unrelated concepts, that English language unduly mixes. Concept of every item having some quality and concepts of at least one item existing.

Re: A liar who always lies says "All my hats are green."

#275

I never liked this type of puzzle. It is not formal logic but more about the idiosyncrasies and conventions of the English language. I put this puzzle on par with Agatha Christie’s murder mysteries. It requires a suspension of disbelief and logic to be believable. Someone who always lies means in the purest sense means you cannot trust anything they say. Even the word “hat” could mean they are talking about their pet…

I don't think it's that idiosyncratic? Everywhere I've lived:

1. A deceit is an attempt to make somebody believe something false.

2. A falsehood is a statement which is false.

3. A lie is a deceitful falsehood.

Regardless of whether they miscommunicated about hats vs cats, and regardless of whether they were being deceitful in the process, for the statement to be a lie it would also have to be a falsehood, implying they have at least one hat which is not green.

Yes, these problems require suspension of disbelief, especially given the shorthand "he's a liar" always meaning that the person is often deceitful (usually with other negative implications), but the problem statement being that the "person always lies" is pretty clear and doesn't require special pattern recognition or other mental gymnastics, and it's not that different from the suspension of disbelief you invoke when playing a game of chess and not literally sending a knight to murderously dethrone your opposition.

Re: A liar who always lies says "All my hats are green."

#277

Earlier quoted context omitted.

No. (assuming you have no unicorns) "all of my unicorns fly" is true; "some of my unicorns fly" is false; "true->false" is false.

So you claim that in normal English “all” doesn’t imply “some”?

Does "when pigs fly" imply that some day pigs will be able to fly? No; people can understand impossibility when it is used rhetorically in every day speech.

For example I might say, "all the honest politicians are doing a great job", which conveys my actual meaning, "all politicians are dishonest".

Re: A liar who always lies says "All my hats are green."

#278
post #207

Earlier quoted context omitted.

Oh boy... so I actually wrote a thesis in graduate school on conversational implicature, Paul Grice, and various other theories of implying things. I would actually agree user dwheeler here. Whether or not you agree with Gricean implicature theory (I do not), the point is that making a claim about a group that doesn't exist is absurd. Absurd statements do not convey meaning, and language is a tool for communication,…

Granted all that, but we're not really talking about normal everyday English, but a hypothetical conversation with some mythical entity who can only lie, which is not really a capability of humans; even the most pathological liar among us can and will tell the truth. So I'd put all that theory in a drawer somewhere and acknowledge that, when we're talking about logic puzzles, the rules of logic are paramount, not gra…

As I said in a previous part of this thread, the rules of logic are as arbitrary (by definition) as they are paramount, and often diverge from natural language logic: https://news.ycombinator.com/item?id=42365222#42368661

---

I mean, it's important to remember that the axioms of first-order logic are arbitrary. We could easily argue that the truth value of an empty group is undecidable, and that would better correlate to natural language logic.

The fact that we compact these edge cases into arbitrary truth values is just for ease of computing.

This is also relevant to the arbitrary choice of the 'inclusive or' as a default over an 'exclusive or', which most people use in natural language.

Re: A liar who always lies says "All my hats are green."

#279

Three gods A, B, and C are called, in no particular order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes–no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own…

Do the gods know each other?
Post reply on HN