Live data from Hacker News

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

theguardian.com

81–90 of 419 posts

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

#81
post #49

Earlier quoted context omitted.

For me, this is one of those types of examples that illustrates the problem with logics allowing vacuous truth. It amounts to an assumption of an implied conditional ("If I have hats...") which is not always warranted. The "gotcha" here says more about the vacuous truth assumption than it does someone who falls for it.

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 true technically, but (assuming laws of biology hold, and a human is making the statement), it is something that could never be true even if the antecedent ("I have children") were true. It's not just something playing on incorrect intuition, it's a statement that is true only by convention or a certain line of reasoning that to me is made only out of convenience because of certain implications.

It stretches the definition of "true" so far that the term "vacuous truth" no longer means "truth" in the general sense in which it is understood. It plays on the use of the term "truth" more than anything else to me; one could redefine "vacuously true" statements as "vacuous" statements in the sense of "undefined" and then the "gotcha" would no longer apply.

I think the example also captures a sort of flaw in applying classical logic (at least classical logic with vacuous statements) to everyday speech in another way that I don't think is just incorrect intuition. If someone asserts "All my hats are green", it's understood to be an assertion that the speaker does in fact have hats, otherwise there would be no point in structuring the statement as it is. That is, the statement is evaluated as true or false with reference to the antecedent because it (the antecedent itself) exists, and another, different statement could have been made. Classical logic evaluates the statement "All my hats are green" as if it were the same as "If I had hats, all my hats would be green" — but they are not the same statement, they have different meanings. There's a counterfactual possibility in natural language, which I think requires nonclassical logic.

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

#82
post #13

Earlier quoted context omitted.

Do you think regular people, when communicating, use academic logic? Or do you think the liar is an academic?

One of the points of this puzzle is to see beyond your social intuition. So yes, this puzzle plays on being able to figure out the logic while it goes against common social intuition.

Fascinating. I think many people here have applied their own social intuition- - a programmer’s idea of an empty sets- to the puzzle.

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

#83
post #20

The puzzle is referring to the concept of a vacuous truth ( https://en.wikipedia.org/wiki/Vacuous_truth ). In most logic frameworks, the All function (upside down A in standard logic notation) is true if and only if no statement within the set is false (i.e. All his hats are green if he has no hats). This is for several reasons: - it allows for more coherent empty set functions. For example if we take the power set o…

I learned about Vacuous Truth the hard way recently when I found out that `every` method in JavaScript returns `true` for empty arrays as well.

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

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

#84

Earlier quoted context omitted.

Uninitialized variables are 90% of our bugs, or so I've been told. I don't consider a boolean "and" or "or" of a list of bools to be automatically true or false of an empty set, my friend. To me, the specific case for a boolean function applied to an empty list of bools would have to be explicitly stated in the design. Thanks for explaining how mathematicians and logicians treat the empty set. I have more pragmatic s…

Consider iterative code to sum a collection of ints: sum = 0 for value in collection: sum += value return sum For every non-empty collection this returns the correct result, and for the empty collection it returns 0. Now the product: product = 1 for value in collection: product *= value return product For every non-empty collection this returns the correct result, and for the empty collection it returns 1. Now the AN…

Exactly. More generally the natural initial value for a fold of an operation is the identity (or zero) element for that operation.

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

#85
post #83

Earlier quoted context omitted.

I learned about Vacuous Truth the hard way recently when I found out that `every` method in JavaScript returns `true` for empty arrays as well.

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

This depends on `liar.hats` being undefined, but what if `liar.hats` is an empty array? That seems like an equally valid way of representing a person that owns no hats.

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

#86
post #42

Casual sentences and mathematics/logic don't go very well together, and lead to ambiguities and interpretation if there are no clear rules defined beforehand. This reminds me of those silly problems that circulate on TikTok with a series of additions and multiplications. The "correct" result depends on how you assume the operations precedence. Here, does "being a liar" mean that we have to take as a true statement th…

The correct answer to almost all of these problems that play with the hierarchy levels between English and Math is "undefined". If you want to play in English, you get intrinsically sloppy, provisional, and context-specific answers, and that is effectively by design and a feature, and anyone who insists that there is only one answer is in error. Our languages work that way for good reasons; we see the costs of the occasional misinterpretations, but the benefits of language not requiring endless precise specifications for everything that is obvious in context is taken for granted.

By contrast, if you want to play in Math space, you need to be rigorous, and provide a Math-quality conversion.

If you refuse, what this reveals about the one posing the problem is that they themselves labor under the delusion that you can apply math rules to English, that there is exactly one and only one such mapping, that everyone should know and agree upon that mapping, and that is so true that you are justified in playing "gotcha!" games with people who don't know this nonexistent mapping.

It doesn't paint a terribly flattering picture of such people, in my opinion.

In the meantime, the rest of us should meditate a bit on "The Only Way To Win Is Not To Play The Game", because spiraling down trying to figure out the exact nature of the aforementioned nonexistent mapping is just a waste of time. There isn't one, so arguing it is just a waste of time and emotional energy. Pick a lane up front. They're both fine, but anything that functions by always choosing whichever lane maximizes the "gotcha!" in the moment is not worth spending time on.

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

#87

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…

The specific linguistic concept your reaching for is "implicature" from pragmatics. https://en.wikipedia.org/wiki/Implicature

Ah yes, the only standardized test questions that gave me trouble back in school... "Guess what the speaker was implying"

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

#88
post #76

Earlier quoted context omitted.

Let's say that saying 'all my hats' implies that the set of hats is non empty, then you have the two following statements my-hats is not empty for every hat in my-hats, is-green(hat) is true We know that the speaker always lies, so both statements must be false: my-hats must be empty, and it must be that it exists at least one hat in my-hat that is not green. This is a contradiction. So either the speaker or the puzz…

But ‘my hats is not empty’ is not a statement being made by the liar.

He said 'all my hats are green' either that statement is to be interpreted to require that the set of hats is not empty or it isn't. In the first case that interpretation would be part of the statement he made.

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

#89
post #20

The puzzle is referring to the concept of a vacuous truth ( https://en.wikipedia.org/wiki/Vacuous_truth ). In most logic frameworks, the All function (upside down A in standard logic notation) is true if and only if no statement within the set is false (i.e. All his hats are green if he has no hats). This is for several reasons: - it allows for more coherent empty set functions. For example if we take the power set o…

I learned about Vacuous Truth the hard way recently when I found out that `every` method in JavaScript returns `true` for empty arrays as well.

In programing, you can always rewrite that first rule as "all" and "some" must compose over set union. So, "all (A ∪ B) == all A && all B", and "some (A ∪ B) == some A || some B".

That lets you discover the answer for the empty set.

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

#90
post #78

The phrase “All my hats are green” implicitly carries the premise “I have hats” in conversational language. Thus, if this statement were to be expressed as a logical proposition, it should be: “I have hats, and all my hats are green.” This means there are two potential falsehoods in the statement: 1. “I have hats.” 2. “All my hats are green.” Therefore, what we can deduce is: • He might not have any hats. • If he doe…

Author was pretty clear about the spirit of the riddle:

>Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic.

Post reply on HN