assign(domain_size,14).                %fourteen distinct family members
assign(max_models,-1).

list(distinct).
  [Cole,Cristian,Jason,Neil,Steve,
   Amanda,Ashley,Beth,Erin,Kaitlyn,Katherine,Makayla,Payton,Tammy].
end_of_list.

formulas(utils).
  gp(x) <-> x  = 0 | x  = 1.           %grandparents are on the 1st layer
  (gm(x) <-> x = 0) & (gf (x) <-> x = 1).             %avoid isomorphisms  
  p(x)  <-> x = 2 | x = 3 | x = 4 | x = 5  | x = 6  | x = 7.    %p on 2nd 
  c(x)  <-> x = 8 | x = 9 | x= 10 | x = 11 | x = 12 | x = 13.   %c on 3rd
  family(x) <->  x = 2 | x = 3 | x = 4.              %children of 0 and 1 
  inLaw(x)  <->  x = 5 | x = 6 | x = 7.              %spouses
  man(x) -> -woman(x).
  uncle(x,y) <->  man(y) & p(y) & c(x) &
                 ((x = 8  | x = 9)  -> (y = 3 | y = 6 | y = 4 | y = 7)) & 
                 ((x = 10 | x = 11) -> (y = 2 | y = 5 | y = 4 | y = 7)) & 
                 ((x = 12 | x = 13) -> (y = 2 | y = 5 | y = 3 | y = 6)).
                 
  aunt(x,y) <->  woman(y) & p(y) & c(x) &
                ((x = 8  | x = 9)  -> (y = 3 | y = 6 | y = 4 | y = 7)) &
                ((x = 10 | x = 11) -> (y = 2 | y = 5 | y = 4 | y = 7)) & 
                ((x = 12 | x = 13) -> (y = 2 | y = 5 | y = 3 | y = 6)).
                 
  cousin(x,y) <-> c(x) & c(y) & 
             ((x = 8  | x = 9)  -> (y = 10 | y = 11 | y = 12 | y = 13)) &
             ((x = 10 | x = 11) -> (y = 8  | y = 9  | y = 12 | y = 13)) &
             ((x = 12 | x = 13) -> (y = 8  | y = 9  | y = 10 | y = 11)).
  cousin(x,y) <-> cousin(y,x).
  
  boy(x) <-> (c(x) & man(x)).
  all x all y ((boy(x) & boy(y)) -> x = y). 
  exists x boy(x).                                       %exactly one boy
end_of_list.

formulas(assumptions).
  man(Cole) & man(Cristian) & man(Jason) & man(Neil) & man(Steve).
  woman(Amanda)  & woman(Ashley)  & woman(Beth)      & 
  woman(Erin)    & woman(Kaitlyn) & woman(Katherine) & 
  woman(Makayla) & woman(Payton)  & woman(Tammy).
end_of_list.

formulas(family_tree).
  uncle(Makayla,Jason).     %Clue1: Makayla's cousins is Jason's son 
  aunt(Ashley,Tammy).       %Clue2: One of Ashley's aunts is Tammy
  inLaw(Tammy) & gf(Neil).  %Clue3: Tammy's brother-in-law is Neil's son 
  c(Kaitlyn) & c(Ashley).   %Clue4: Kaitlyn's sister is Ashley's cousin 
  uncle(Kaitlyn,Jason).  %Kaitlyn has a sister -> Jason is not her father
  
  %Clue5: Ashley's uncle, Steve, is Erin's brother-in-law
  uncle(Ashley,Steve). 
  family(Steve) & inLaw(Erin) | inLaw(Steve) & family(Erin). 
  Steve = 2 | Erin = 2.                               %avoid isomorphisms
  
  %Clue6: The three uncles are Payton's dad, Cristian and Katherine's son 
  c(Payton) & p(Cristian) & gm(Katherine).
  uncle(Payton,Cristian).  
 
  %Clue7: Aunts are Kaitlyn's mom, Ashley's mom, Cristian's sister-in-law
  c(Kaitlyn) & c(Ashley) & p(Cristian) & cousin(Kaitlyn,Ashley). 
   
  %Clue 8. Jason's brother is Ashley's dad
  uncle(Ashley,Jason) & family(Jason). 
  Jason = 4 & Cole = 13.                              %avoid isomorphisms

  c(Amanda) & uncle(Amanda,Steve).%Clue9: Amanda's sister is Steve's niece
  Amanda != 12.                      %Amanda is not the daughter of Jason 
   
  -aunt(Cole,Beth).                  %Clue 10. Beth is not Cole's aunt
end_of_list.
