Prolog Legend
loves(X,X).
Everything loves itself.
All variables are universally quantified
loves(X,Y).
Everything loves everything else including itself.
Special predicate 'diff'
~diff(X,X).
Unique names.. This says that all things named the same are the same.
diff(X,X). diff(X,Y). ~diff(X,Y).
None of these can be asserted
same(X,Y):- ~diff(X,Y).
Everything is the same unless known to be differnt and and diff/2 is ok in this context (this would be a logically absurd though)
~same(X,Y):- diff(X,Y).
Nothing is same when known to be different. (This is a good assertion)
Impossiblity operator ~
~loves(X,Y).
Nothing can love anything else or even itself
Basically ~ effects the values of X and Y.. not the 'loves'
~loves(X,Y):-diff(X,Y).
Nothing can love anything else.
diff/2 makes sure this statement says nothing about not loving itself.
~loves(X,X).
Nothing can love itself
~loves(X,Y):-diff(X,Y). ~loves(X,X).
Nothing can love anything else or even itself Equivanent to ~loves(X,Y).
~A.
Is a negation by logical deduction and therefore no unifiable bindings against A which are true.
In the consequent or fact base: the sentence A will add to that in which is known to not be true
Weakness predicates
true(A):- A, not(~A).
false(A):- ~A,not(A).
unsound(A):- A , ~A.
unknown(A):- not(A),not(~A).
consistent(A):- A ; not(~A).
unproveable(A):- ~A ; not(A).
known(A):- A ; ~A.
sound(A):- not(A) ; not(~A).
complete(A):- known(A), sound(A).
Entailment operator :-
~loves(X,Y):-not(loves(X,Y)).
We know everything there is to know about 'loves' relationships and therefore can use negation by failure
loves(X,Y):-not(~loves(X,Y)).
We know every exception
a(X,Y):- ~b(X).
a(X,Y) unifies all possible requests that X is known impossible in b(X).
~a(X,Y):- b(X).
there is no a(X,Y) that X is known in b(X).