5 ms·
No, the liar having no hats would not make the statement true. ‘All my hats implies’ implies the liar stating they have hats. The liar either has zero hats or
by nailer 2y ago
No, the liar having no hats would not make the statement true. ‘All my hats implies’ implies the liar stating they have hats.
The liar either has zero hats or some amount of hats. The only thing we know for certain is that if they do have hats, there is at least one non Green hat.
- n4r9 2y agoPerhaps I'm being a bit too logical, but in mathematics and logic the statement For all x in A, x has XYZ property is taken to be true when A is the empty set.
- deleted 2y ago[deleted]
- joachimma 2y agoNo, in logic that is a vacuous truth. All my hats is true for zero hats. But that would not be a lie. And since the liar always lies, that can not be case.
- nailer 2y agoDo you think regular people, when communicating, use academic logic? Or do you think the liar is an academic?
- soneca 2y agoIt is a logic puzzle. It is not two regular (or academic) people communicating
- nailer 2y agoYes. So we will apply logic, but assume the people making the statements are otherwise ordinary people and do not do strange things like defining ‘all’ to include ’none’.
- Karellen 2y agoDo you think that amongst regular people, there exists a liar who always lies?
- nailer 2y agoNo. But that is the premise. People redefining ‘all’ to include ‘none’ is not.
- deleted 2y ago[deleted]
- mewpmewp2 2y agoOne 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.
- nailer 2y agoFascinating. I think many people here have applied their own social intuition- - a programmer’s idea of an empty sets- to the puzzle.
- jhbadger 2y agoTrue, but "programmer's intuition" is because most programming languages are more or less based on formal logic so they agree with the formal logic interpretation even if many programmers have never studied formal logic.
- MrMcCall 2y ago"More or less" is the key and the rub. The specific semantics must be determined and utilized in place. For me, the evaluation of the empty set should have separate semantics than that for how a non-empty set's elements are logically combined to produce a value. This is the result of doing stats programming for grad students, doing lots of database design and programming, and lots of regular programming in imperative and functional languages. The key is that we are always working within a context, and this problem's context involves both formal logic and regular old language. And, whew!, is there a disconnect and interference pattern. What a delightfully unserious discussion!
- mewpmewp2 2y agofunction areAllTheirHatsGreen(someone) { return someone.getHats().every(hat => hat.color === 'green') } I wonder if there's a language or programming paradigm where this function wouldn't be determined simlarly. I think best you could do is make a validation check that throws an error if there's no hats at all, but would that make sense? What if you have a function that has to return a boolean and not throw an error.
- gpderetta 2y agoLet'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 puzzle is not consistent (and uninteresting), or the 'my-hats is not empty' is not a valid assumption.
- rcxdude 2y agoI was initially thinking that, but you can parse it as one statement "my-hats is not empty AND for every hat in my-hats, is-green(hat) is true", in which case it's still consistent for that single statement to be false, and it can be false by my-hats being empty.
- gpderetta 2y agoThat's a very good point!
- nailer 2y agoBut ‘my hats is not empty’ is not a statement being made by the liar.
- gpderetta 2y agoHe 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.
- nailer 2y agoThis person‘s argument hinges on trying to make two statements rather than one, I’ll illustrate with a quote: > 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. No. Since it is one statement as written, and the rules of common logic are not created by the liar, as I said up in the thread, either possibility is true. The person may have no hats or have one hat that is not green.
- derbOac 2y agoFor 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.
- mewpmewp2 2y agoI 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. Because for efficiency reasons you make a lot of assumptions constantly that may or may not be true, and 99% cases it would work for your favour. Sometimes assumptions need to be challenged or we need to be reminded of that it can be good to challenge assumptions in certain cases, it can allow us to discover some new things.
- derbOac 2y ago> 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.
- ColinWright 2y agoI read statement "All my hats are green" as meaning: For every hat H that I have, H is green. If I have no hats, this statement is true, just as * the empty sum is 0, * the empty product is 1, * the empty AND is True, and * the empty OR is False. So with this interpretation, the liar having no hats would make the statement true.
- rkachowski 2y agoby the same following, this would mean that any statement on the members of an empty set can be made and it would be logically true? e.g. "all my lamborghinis have magical goat skin seat covers" is true if 1) I have no lamborghinis or 2) All the ones I own have magical goat skin seat covers. (fr I have no logical or mathematical background)
- MrMcCall 2y agoI don't have formal logic or any math beyond calculus, either, and it appears that this fact is to our advantage.
- mewpmewp2 2y agoYou don't need to have learned formal logic to conclude the answer to this puzzle in my view. Yes, formal logic concludes it, but plain logic as well. The key is to realize that the answer will go against your learned social intuition and be fine with that. Social communication in many cases is illogical for efficiency reasons and that is fine. It is interesting to point out those cases and make puzzles out of them.
- MrMcCall 2y agoI agree. I would appreciate it if you would correct my thinking on the subject, if I have erred: https://news.ycombinator.com/item?id=42365506 https://news.ycombinator.com/item?id=42365506 Thanks in advance.
- semigroupoid 2y ago
- gpvos 2y agoNo. In formal logic, if you have no hats, it is true that all your hats are green. You can claim anything about those hats, it is even true that each one of those hats is the same size as the universe, or that they are all completely green and completely red at the same time. In normal language, this would be different, but that is not the context here. > Note: this question was originally set in a maths exam, so the answer assumes some basic assumptions about formal logic. A liar is someone who only says false statements.
- anon373839 2y agoThis is a somewhat irritating property of formal logic and mathematics. Natural language receives a “special” grammar that isn’t always declared up front. You just have to sort of be in on it. In this case, the reader is given the special definition of liar, but not the special definition of “lie”. (As in, it’s not a lie to make definitive claims about nonexistent hats.) A lot of the “trick” in logic puzzles boils down to this issue of word play. This puzzle could have been drafted so that the liar’s statement leaves proper room for the no-hats case, but then it would be too easy.
- JKCalhoun 2y ago> In formal logic, if you have no hats, it is true that all your hats are green. But told by someone who cannot make a true statement.
- eloisant 2y agoThat's the thing, the problem isn't written in formal logic. It's written in English, which is vague.
- gpvos 2y agoIt's written in a form of English that is formal enough to have a straightforward translation to logic formulas. Also, in the solution article that now has been posted, it's compared to the statement "I have read all books on my shelf" with an empty shelf, which is indeed vacuously true. The sentence about hats is equivalent, I think even the least exactly-minded English speaker would agree.