:-consult('/u/faculty/dick/cs320/prolog/family2.pl'). q:-halt. %I married a widow who had a grown-up daughter. male(me). female(widow). female(daughter). parent(widow,daughter). :-marry(me, widow). % So I became the stepfather of her daughter. %Some months later, my wife gave birth to a son. :-birth(widow, me, son, son). %My father, who visited us quite often, fell in love with my step-daughter, %and married her. male(father). parent(father, me). :-marry(father, daughter). %Hence, my father became my son-in-law, and my stepdaughter became my mother. %The wife of my father, that is my step-daughter, also had a son. birth(daughter, father, anotherson, son). %My son became became my brother-in-law. %of my father as well as my uncle. %and I got a brother and at the same time a grandson. %My wife is my grandmother, %since she is my mother's mother. %Hence, I am my wife's husband and at the same time her step-grandson; %in other words, I am my own grandfather. ?-grandfather(me, me).