No, 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.
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.
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.
> 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.
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.
i think its relevant that the liar has to say false things, which is more limited than just not-true things.
if you dont assume the vacuous truth, and instead leave it undefined, then when hes got no hats, "all my hats are green" is absurd, rather than false.
the gotcha only stops applying when you put a vacuous false, rather than true or undefined.
is this really a flaw in applying classical logic? with the vacuous true, the only information you get from "all my hats are green" being false is that they have at least a hat, same as the intuitive result
Yes. 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’.
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 puzzle is not consistent (and uninteresting), or the 'my-hats is not empty' is not a valid assumption.
I 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.
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.
This 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.
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.
True, 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.
"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.
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.