color(red). color(green). garc(A,B):-color(A),color(B),not(A=B). %% garc(V1,V2),garc(V2,V3).