Question: Is Denver defying the federal government?

Is it legal to become a sanctuary city? That'll be up to the courts.