logoalt Hacker News

oneshtein12/09/20241 replyview on HN

> If the liar owns no hats the statement “All my hats are green” would be true.

Color of non existing object is undefined.

The correct solution is:

!(all && my && hats && are && green) == !all || !my || !hats || !are || !green.


Replies

seanhunter12/09/2024

If you want to allow undefined statements that’s actually fine from an inferential point of view even though in predicate logic statements are always either true or false.

He’s a liar so his statement has to be specifically false.