Live data from Hacker News

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

theguardian.com

101–110 of 419 posts

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

#101
post #2

My take (possible spoiler): If he had no hats, then his statement would technically be true. Therefore he has at least one hat. He may have some green hats and some non-green hats, but must have at least one non-green hat. He could have any number of green hats, including zero, as long as he has at least one non-green hat. So the only derived statement that we can conclude to be true is A.

Speaking mathematically , you are right. However, linguistically I disagree. Consider: Someone tells you that "all of their kids are doing great in school". Turns out they have no kids. They obviously were trying to deceive you, and make you think they do have kids - in fact, since plural, more than one kid. Hence, it is effectively a lie. So if the liar speaks of "all my hats" while having none, that is deceptive. I…

More generally, the puzzle is kind of stupid -- not as a puzzle, but as a representation of life -- because speakers do not speak according to the rules of mathematical logic. That doesn't make them liars, it just means they don't agree about the ground rules.

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

#102
post #95

SPOILER The statement translates to: ∀x ( IsAHatOfMine(x) => Green(x)) That's just equivalent to ∀x (~IsAHatOfMine(x) ∨ Green(x)) by the definition of implication (it's only false if the antecedent is true, and the conclusion false). The negation of that is (by repeated application of De Morgan's): ~∀x (~IsAHatOfMine(x) ∨ Green(x)) ∃x ~(~IsAHatOfMine(x) ∨ Green(x)) ∃x IsAHatOfMine(x) ∧ ~Green(x)) Thus, the liar has a…

Not D), because it says "The liar has at least one green hat." which isn't implied.

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

#103
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 cat that they like to carry on their head.

What the author would probably say is “All my hats are green” means the liar is either lying about All or Green. Either all their hats are some other color or only one hat is green. This means you have to assume the liar has a hat. How do we know that?

We only know that because of similar puzzles that came before. In other words this is not logic but more pattern recognition.

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

#104
post #33

Earlier quoted context omitted.

Speaking mathematically , you are right. However, linguistically I disagree. Consider: Someone tells you that "all of their kids are doing great in school". Turns out they have no kids. They obviously were trying to deceive you, and make you think they do have kids - in fact, since plural, more than one kid. Hence, it is effectively a lie. So if the liar speaks of "all my hats" while having none, that is deceptive. I…

"You can give me the loan, all my companies have millions in assets."

or

"You can give me the loan, I don't own any companies that have less than 1 million in assets"

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

#105
post #81

Earlier quoted context omitted.

I think it is very logical to allow for vacuous truths. Doing otherwise would not be logical. The actual key insight is to accept that in a lot of cases everyday communication itself is not logical, because it is more efficient to communicate skipping always being logically correct. This builds social intuition that goes against the logic. It is interesting to observe and point out those cases, which this puzzle does…

> I think it is very logical to allow for vacuous truths. Doing otherwise would not be logical. I guess I disagree, although I don't mean that disrespectfully. Vacuous truth is one reason why nonclassical logics exist. The wikipedia article gives a good example of how allowing for vacuous truth can lead to absurdities: "All my children are goats" said by someone without children. This is a statement that is vacuously…

Thank you for taking the time to write this. I don't have any formal training in the field but it matches my intuition and I am surprised, astonished even, to see this explanation so far down.

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

#106
post #95

SPOILER The statement translates to: ∀x ( IsAHatOfMine(x) => Green(x)) That's just equivalent to ∀x (~IsAHatOfMine(x) ∨ Green(x)) by the definition of implication (it's only false if the antecedent is true, and the conclusion false). The negation of that is (by repeated application of De Morgan's): ~∀x (~IsAHatOfMine(x) ∨ Green(x)) ∃x ~(~IsAHatOfMine(x) ∨ Green(x)) ∃x IsAHatOfMine(x) ∧ ~Green(x)) Thus, the liar has a…

I agree for A), by why D) ?

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

#107
I thought A. ChatGPT said E. ChatGPT o1 said A.

Also, the novel referenced (Intermezzo) by Sally Rooney is quite good. It makes a few references to analytic philosophy, mostly Wittgenstein. It concerns two brothers whose relationship has broken down. One of them is a "wordcel" and the other is a "shape rotator".

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

#108

If we're doing "provoke arguments on the internet using confusingly-stated constructs", they should have some self respect and use the venerable 6÷2(1+2). And then read https://xkcd.com/169/ Anyway, I'm sure there'll be a YouTube video about this with an AI voiceover soon.

That's why I always use parentheses, i.e. I never rely on operator precedence. Therein lie troubles, lad. And, as usual, the xkcd is fantastic.

You don't write 1+2+3, but (1+2)+3?

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

#109
post #83

Earlier quoted context omitted.

But if you consider “liar” to be an object, > liar.hats.every((hat) => hat.color === "green") will throw a TypeError: Cannot read properties of undefined. That’s definitely not `true`.

You implemented the problem wrong, and thus got an error. If hats is a list of colors, then every hat != green is true if the list is empty.

I wouldn’t say it is wrong per se. It certainly defies the conventional translation into FOL, but there is no a priori reason to pick the conventional formalism of FOL for this problem.

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

#110
post #2

My take (possible spoiler): If he had no hats, then his statement would technically be true. Therefore he has at least one hat. He may have some green hats and some non-green hats, but must have at least one non-green hat. He could have any number of green hats, including zero, as long as he has at least one non-green hat. So the only derived statement that we can conclude to be true is A.

That's the conclusion I came to as well. That said, for whatever reason, the part that was most confusing to me was realizing that the logic puzzle was about the idea that the statement itself had to be false. For whatever reason, I glossed over the phrase "a liar who always lies" the first time and just read "liar" everywhere else, so it wasn't obvious to me what the intent was behind using the word "liar" was.

Personally, I'd change the original wording (from the quoted italic section) to "someone who only tells lies" if I were the author. It's probably specific to me, but I'm always thrown by phrases like that because it seems like it's trying to differentiate in some way from someone else; surely there isn't anyone who "always lies" who _isn't_ a liar, so why say that? It's distracting to me in the same way as if someone said "the speech-capable human being who speaks only in lies". Normally it wouldn't bother me, but because puzzles like this often seem to be used to try to illustrate some smug point about how bad people are at logic, phrasing things in an unnecessarily confusing way just makes it seem even more smug (see https://xkcd.com/169/).

Post reply on HN