title: My override using inheritance in Prolog is inheriting the wrong property ? why?
body: <p><strong>I am trying to override the color properties using the rules below :-</strong></p>
  <pre><code>prop(color, bmw, yellow).
  prop(color, audi, red).
  
  maps(mycar, subset, bmw).
  
  maps(hiscar, isa, audi).
  
  %Rules
  hasproperty(Property, Object, Value) :-
      maps(Property, Object, Value).
  
  hasproperty(Property, Object, Value) :-
     maps(Object, subset, Parent);
     hasproperty(Property, Parent, Value),
     maps(Property, Ojbect, _).
  
  hasproperty(Property, Object, Value) :-
     maps(Object, isa, Parent),
     hasproperty(Property, Parent, Value),
     maps(Property, Ojbect, _).
  
  </code></pre>
  <p><strong>But I am getting a wrong value , which should be inherited as red but instead I am getting yellow , why is this happening ?</strong></p>
  <pre><code>17 ?- hasproperty(color, hiscolor, Z).
  Z =  yellow.
  </code></pre>
  <p><strong>It should be Z= red</strong></p>