ancestor(x,y) -- tells whether y is an ancestor of x.
The ancestors of x are x, parent x, parent parent x, and so on.
See also:
Ways to use ancestor :