Abstract deduction and inferential models for type theory