title: How do I add this prolog to my .pl file?
body: <p>I am just starting to learn prolog.  I am learning it for my CS 2300 class.  I am trying to learn the basics right now.  How do I add a predicate to my .pl file?  I am just trying to add a predicate to my .pl file.  I am doing this:</p>
  
  <p><code>married(X,Y) :- married(Y,X).</code></p>
  
  <p>And I get the errors:</p>
  
  <pre><code>ERROR: Undefined procedure: (:-)/2
  ERROR: Rules must be loaded from a file
  ERROR: See FAQ at http://www.swi-prolog.org/FAQ/ToplevelMode.tx
  </code></pre>
  
  <p>Am I supposed to enable this somehow?</p>
  
  <p>This is the given <code>.pl</code> file:</p>
  
  <pre><code>% File FAMILY.PL
  % Part of a family tree expressed in Prolog
  % In father/2, mother/2, and parent/2,
  % first arg. is parent and second arg. is child.
  
  father(michael,cathy).
  father(michael,sharon).
  father(charles_gordon,michael).
  father(charles_gordon,julie).
  father(charles,charles_gordon).
  father(jim,melody).
  father(jim,crystal).
  father(elmo,jim).
  father(greg,stephanie).
  father(greg,danielle).
  
  mother(melody,cathy).
  mother(melody,sharon).
  mother(hazel,michael).
  mother(hazel,julie).
  mother(eleanor,melody).
  mother(eleanor,crystal).
  mother(crystal,stephanie).
  mother(crystal,danielle).
  
  parent(X,Y) :- father(X,Y).
  parent(X,Y) :- mother(X,Y).
  </code></pre>