Canadian Criminal Procedure and Practice/Pre-Trial Matters/Habeas Corpus

General Principles
Habeas corpus refers to the common law prerogative writ of relief that challenges the detention of a detainee. This prerogative writ was also imported into section 10(c) of the Charter:

A prerogative writ is a manner of correcting errors of jurisdiction made by inferior courts as well as correcting failures of natural justice or procedural fairness.

An application for habeas corpus requires:
 * 1) a deprivation of liberty and
 * 2) that the deprivation be unlawful

The onus of proof to establish the deprivation rests on the applicant while the onus to establish the lawfulness of the deprivation rests on the detaining authority.

The "double bunking" of inmates is generally not considered a form of deprivation of residual liberty. Similarly, housing an inmate in a double occupancy room instead of a usual single occupancy does not engage a deprivation of liberty.