←back to thread

Learn Prolog Now

(lpn.swi-prolog.org)
226 points rramadass | 1 comments | | HN request time: 0.264s | source
Show context
cubefox ◴[] No.45903037[source]
There seems to an interesting difference between Prolog and conventional (predicate) logic.

In Prolog, anything that can't be inferred from the knowledge base is false. If nothing about "playsAirGuitar(mia)" is implied by the knowledge base, it's false. All the facts are assumed to be given; therefore, if something isn't given, it must be false.

Predicate logic is the opposite: If I can't infer anything about "playsAirGuitar(mia)" from my axioms, it might be true or false. It's truth value is unknown. It's true in some model of the axioms, and false in others. The statement is independent of the axioms.

Deductive logic assumes an open universe, Prolog a closed universe.

replies(2): >>45903435 #>>45905707 #
1. scotty79 ◴[] No.45905707[source]
It's not really false I think. It's 'no', which is an answer to a question "Do I know this to be true?"

I think there should be a room for three values there: true, unprovable, false. Where false things are also unprovable. I wonder if Prolog has false, defined as "yes" of the opposite.