We show that the classifying category of a dependent type theory with axioms for identity types admits a non-trivial weak factorisation system. We provide an explicit characterisation of the elements of both the left class and the right class of the weak factorisation system. This characterisation is applied to relate identity types and the homotopy theory of groupoids.

This is the author's final draft of the paper published as Theoretical Computer Science, 2008, 409 (1), pp. 94-109. The final version is available from http://www.sciencedirect.com. Doi: 10.1016/j.tcs.2008.08.030