ispassed_each([],St). passed_each([C|R],St) <- passed(St,C) & passed_each(R,St).
You could also replace Y everywhere with St, and remove the exist St and Y=St.passed_each(X,Y) <-> (exist St X=[] & Y = St) or (exist C exist R exist St X=[C|R] & Y = St & passed(St,C) & passed_each(R,St).)