Natural deduction proof as higher-order resolution