title: Order of Goals in Pure Prolog
body: <p>I am very new to prolog. As per my knowledge Pure Prolog is restricted to Horn clauses. 
  Here is a very simple prolog program -     </p>
  
  <pre><code> % student( Snr    , FirstName , LastName   , Semester ).
    student(  1000  , 'Anna'    , 'Arm'      , 'ti2'    ) .
    student(  1001  , 'Rita'    , 'Reich'    , 'ti2'    ) .
    student(  1002  , 'Peter'   , 'Reich'    , 'ti2'    ) .
    student(  1003  , 'Peter'   , 'Petersen' , 'ti7'    ) .
  
  
  % course( Semester , Course     ) .
    course( 'ti2'    , 'Mathe2'   ) .
    course( 'ti2'    , 'Physics2' ) .
    course( 'ti7'    , 'pdv2'     ) .
  
   musttake(M,V,N,S,C) :- student(M,V,N,S),  course(S,C).
  
  musttakereverse(M,V,N,S,C) :- course(S,C), student(M,V,N,S).
  </code></pre>
  
  <p>My university slide says that even if we reverse the order of the goals in a rule in Pure Prolog, the order of the results should not be changed. In the above code, there are 2 rules that I have implemented. <code>musttake</code> and <code>musttakereverse</code> in which I have simply changed the order of the goals. So, according to the slides, the the order of the results should not be changes when running.
  But, when I run the code, they give results in different orders.(As per my understanding the above program is in <code>pure prolog</code>).    </p>
  
  <p>So, I would like to know if it's true that</p>
  
  <blockquote>
    <p>Change of orders in Goal does not change the order of the result in Pure Prolog code.</p>
  </blockquote>
  
  <p>Thanks!</p>