> This sounds like the confusing US laws. Cannabis is illegal (very illegal) nationally. But several states decided to stop prosecuting these crimes, and the states do most of the policing in the US - so it’s all but legal in many states.
That's not an accurate explanation of the situation in the US.
Cannabis is illegal at the federal level. Separately, it is illegal in some states too (although fewer and fewer as the years go by). States do not have the power to prosecute people under federal law, so in states where the state has legalized marijuana, prosecutors (DA, AG, etc.) have no basis to file criminal charges.
The federal prohibition means that people can be prosecuted for possession on federal land, or if a federal agency (such as the FBI) takes enough interest to enforce the federal law, but they rarely bother at this point.
> I wish there was a legal standard whereby if the state stops prosecuting a law, the law automatically can be invalidated by a court.
What you are describing is actually closer to the Dutch system. Marijuana is illegal there, but because it's been "tolerated" (best translation of the Dutch word) for long enough, it's not actually legal for them to enforce the law anymore. (Well, sort of).