Reasoner example for being likely married

Allikas: Lambda
% see syntax docs:
% https://www.mcs.anl.gov/research/projects/AR/otter/otter33.pdf
%
% for advanced syntax see
% http://tptp.cs.miami.edu/TPTP/TR/TPTPTR.shtml#ProblemPresentation

father(john,pete).
father(pete,mark).
mother(mary,pete).
mother(elizabeth,mark).
brother(andrew,pete).

-brother(X,Y) | brother(Y,X).
-sister(X,Y) | sister(Y,X).
-father(X,Y) | childof(Y,X).
-mother(X,Y) | childof(Y,X).

-sister(X,Y) | female(X).
-mother(X,Y) | female(X).
-father(X,Y) | male(X).
-father(X,Y) | male(X).

-father(X,Y) | -father(Y,Z) | grandfather(X,Z).
-mother(X,Y) | -father(Y,Z) | grandfather(X,Z).
-father(X,Y) | -mother(Y,Z) | grandmother(X,Z).
-mother(X,Y) | -mother(Y,Z) | grandmother(X,Z).

-brother(X,Y) | relative(X,Y).
-sister(X,Y) | relative(X,Y).
-father(X,Y) | relative(X,Y).
-mother(X,Y) | relative(X,Y).

-relative(X,Y) | relative(Y,X).
-relative(X,Y) | -relative(Y,Z) | relative(X,Z).


married(pete,elizabeth,certain).

-married(X,Y,L) | married(Y,X,L).
-married(X,Y,L) | -male(X) | husband(X,Y,L).
-married(X,Y,L) | -female(X) | wife(X,Y,L).

-married(X,Y,certain) | married(X,Y,likely).

-father(X,Y) | -mother(Z,Y) | married(X,Z,likely).



%-married(X,elizabeth,Y) | ans(X,Y).

%-married(X,elizabeth,likely) | ans(X).

%-married(X,Y,certain) | ans(X,Y).

married(pete,marge,certain).
%-married(pete,X,likely) | ans(X).

married(john1,mark1,certain).
male(john1).

-married(X,Y,U) | -lmale(X,V) | lfemale(Y,likely).
-married(X,Y,U) | -lfemale(X,V) | lmale(Y,likely).

-male(X) | lmale(X,certain).
-female(X) | lfemale(X,certain).
-lmale(X,certain) | male(X).
-lfemale(X,certain) | female(X).

-lfemale(mark1,X) | ans(X).