Hacker News new | ask | show | jobs
by pkteison 2730 days ago
The thing that intrigued me the most about Prolog was that true and false are not opposites. True means it could prove it, but false means it couldn’t prove it in time, not strictly necessarily really false as in not true. Thinking about that distinction, that you can have a language where the default logic can’t be used for Boolean algebra, blew my mind when I was in college and has been fun to ponder ever since.
1 comments

Sounds more like true and null? Or does it not definitively disprove things?
The parent is mistaken. A "false" answer definitely means that no (further) solution exists. You can ask for time or depth limits in practical Prologs, but in basic standard Prolog "false" doesn not mean "could not prove it in time".

Of course some things cannot be disproven, and in those cases (again, if you don't request otherwise) you will get nontermination.

Prolog uses the closed world assumption: if something cannot be proven, it is considered false.

https://en.wikipedia.org/wiki/Closed-world_assumption