system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5, what is habeas corpus?

Layman’s terms.  Examples, if you can too, please!
gpt
Basically it is a legal requirement for there to be a legitimate reason for someone to be arrested and detained, the court checks that the reason for detaining the person is legitimate and there wasn't anything wrong with the arrest.