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.
As I think you would hope from a practical standpoint -- you don't want to have to handle a special case of false and always check if the array is empty.
I agree it's only logical in engineering contexts like that though, not in everyday language.
This is even what I expected, but I majored in math, so maybe that biased my response.
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`.
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.