Let be a program of first order definite rules. A conjunctive query to is a prenex normal form formula:

Where is a conjunction of positive atoms. Where are the variables in .