Indian Penal Code, 1860
Section 451
repealedHouse-trespass in order to commit offence punishable with imprisonment
Whoever commits house-trespass in order to the committing of any offence punishable with imprisonment, shall be punished with imprisonment of either description for a term which may extend to two years, and shall also be liable to fine;
Why this exists
This is the general, catch-all version of the trespass-with-purpose offences: whenever house-trespass is committed as a means to some other crime that can lead to imprisonment (but is not specifically covered by the harsher sections above), this section applies. It ensures that entering someone's home to commit any imprisonable offence is treated more seriously than trespass alone.