On Irrelevance and Algorithmic Equality in Predicative Type Theory (Logical Methods in Computer Science, 2012)