title: Creating Prolog Predicates
body: <p><a href="https://stackoverflow.com/questions/16502892/prolog-predicates">Prolog predicates</a> - Built on this, question did not have enough clarity so I am posting the question in context.</p>
  
  <p>Here is the question and I will post what I have done so far and what I am struggling on.</p>
  
  <h2>Scenario (A quiet weird one)</h2>
  
  <p>James and Victoria are married, but Victoria is in love with Curt. Curt does not love her because he is still married to and cares about Kylie, though she is more interested in Henry. Arthur is romantically inclined towards Victoria but he is in competition with Henry, who also loves Victoria despite being married to Crystal, whom James is feeling romantic about.</p>
  
  <p>1] Represent this information using Prolog predicates.Only use two predicate names.</p>
  
  <p><strong>This is my interpretation of this</strong></p>
  
  <p>is_Married([James,Victoria],[Curt,Kylie],[Henry,Crystal]).</p>
  
  <p>is_inLove([Victoria,Curt],[Kylie,Henry],[Arthur,Victoria],[Henry,Victoria],[James,Victoria]).</p>
  
  <p>For the second predicate, I'm also unsure if I should put [Curt,Kylie] as it said 'and still cares about' in the scenario. </p>
  
  <p>2] A married is on the rocks if both participants are romantically inclined towards other people, and not each other. How could a Prolog rule represent this statement.</p>
  
  <p><strong>My answer</strong></p>
  
  <p>∀∃x: is_married(X,Y) ∧¬ is_inLove(X,Y) ∨ is_inLove(Y,X) → on_rocks (x)</p>
  
  <p>I'm a bit confused on how to represent, marriage as apposed to the two participants.</p>
  
  <p>3]A circle of love exists when a person X loves someone else, who in turn loves somebody else and so on until somebody in that chain loves person X. Assuming only one circle of love exists, write the prolog rules that will find this circle and produce a list of those involved.</p>
  
  <p><strong>My answer</strong></p>
  
  <p>write_list([X|A,B,C]:-</p>
  
  <p>write(X)</p>
  
  <p>writelist(X,Tail).</p>