Nullum crimen, nulla poena sine praevia lege poenali.
No crime or punishment without a previous penal law.
This is the backbone of modern criminal law, stating that the law defines what a crime is, and without the law, there can be no crime. Ergo, a crime in the past cannot be punished with the law of the present.
The principle has allowed for many loopholes where past crimes went unpunished as they were not subjected to new laws. An example is The Homicide Act of 1957 in English law, which never gave a statutory definition of murder. This led to no less than six appeals challenging the definition, using it as a defence.
It also protects criminals by allowing them to use a defence (e.g. provocation) even after it is outlawed, as long as the crime was committed before the law came in place.
If Wonderland’s legal system was based around nullum crimen, nulla poena sine lege, then the King of Hearts would not have been able to impose his Rule #42: “all persons more than a mile high must leave the court immediately”, as he created the rule after Alice ate the mushrooms and grew in size.