// check whether duplicates are filtered out
.type N <: symbol

.decl A (x:number, y:number)
.output A ()
.decl R (x:number, y:number)
.output R ()

A(1,2).
A(3,4).
A(5,6).

R(x,y) :- A(x,y).
//R(x,b) :- A(x,y), R(a,b), a = y + 1.
R(x,b) :- A(x,y), R(y+1,b).
