Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.56 KB | None | 0 0
  1. (defrule Ojciec-BPrzodek
  2.     (Ojciec $x $y)
  3.     =>
  4.     (assert(BPrzodek $x $y))
  5. )
  6.  
  7. (defrule BPrzodek-Przodek
  8.     (and
  9.         (Przodek $x $y)
  10.         (BPrzodek $y $z)
  11.     )
  12.     =>
  13.     (assert(Przodek $x $z))
  14. )
  15.  
  16. (defrule Spokrewnienie-Przodek
  17.     (Przodek $x $y)
  18.     =>
  19.     (assert(Spokrewnieni $y $x))
  20. )
  21.  
  22. (defrule Spokrewnieni-Brat-Siostra
  23.     (and
  24.         (Brat $x $y)
  25.         (Siostra $x $y)
  26.     )
  27.     =>
  28.     (assert(Spokrewnieni $y $x))
  29. )
  30.  
  31. (defrule Spokrwnieni-Brat-Siostra-Wszyscy
  32.     (and
  33.         (Spokrewnieni $x $y)
  34.         (or
  35.             (Brat $z $y)
  36.             (siostra $z $y)
  37.         )
  38.     )
  39.     =>
  40.     (assert(Spokrewnieni $x $z))
  41. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement