%
% CS 430 Student and professor example
%

student(austin).
student(courtenay).
student(eliza).
student(richard).

taking(austin,    cs430).
taking(courtenay, cs430).
taking(eliza,     cs470).
taking(richard,   cs430).
taking(richard,   cs470).

teaching(bowers, cs430).
teaching(lam,    cs430).
teaching(lam,    cs470).

common(Student, Prof) :- taking(Student, Class), teaching(Prof, Class).

