:- equals(A, B), equals(A, C), type(B,BN,_), type(C,CN,_), CN != BN.