Illegal Herbrand Logic sentence

44 Views Asked by At

I am studying the Stanford Introduction to Logic course. There was a problem about whether an expression is legal sentence of Herbrand Logic or not. It asks:

Say whether $p(f(p(a))$ is a syntactically legal sentence of Herbrand Logic. Assume that $a$ and $b$ are object constants, $f$ is a unary function constant, and $p$ is a unary relation constant.

The answer was 'illegal', but I don't understand why it's illegal. I suspect $p(a)$ might not be a term so that it cannot be applied to $f$, but I'm not sure. Why is the expression illegal?

(link to the problem: http://intrologic.stanford.edu/notes/chapter_09.html)