Another aspect of the 2nd amendment people often overlook (particularly gun control advocates) was that it was originally intended as a check to the power of the army. The idea being that should the government ever try to use the military to suppress the public, that an armed public would be able to fight back and presumably being bigger than the military, win. That theory has been greatly eroded in the last 70 years or so by the increasingly large gap between the weapons the military has access to and what the public has access to. Back when the constitution was drafted a rifle was a rifle was a rifle, and 200 soldiers versus 1000 citizens all armed with rifles, the citizens would likely win. These days with the military having tanks and jets and nightvision and all manner of other advanced weapons (including the much debated fully automatic rifles) means that your average group of citizens wouldn't stand a chance against the military in serious armed conflict.
I disagree with this - traditionally the US military hasn't fared very well in guerrilla warfare scenarios. Look at the number of deaths out in the middle east - fighting in city streets, that kind of thing.
I'd also wager that if the military was used against the populace, a great deal of the military would defect out of principle. So not only do you have an armed public in unfavorable conditions, our hypothetical evil government also has an unknown number of traitors in the ranks.
That leaves more indiscriminate options (bombs of various flavors) - and if things ever got that bad, we'd probably have other countries getting involved and even more defection.
In short, it's not near as simple as "government has tanks, therefore government wins".
Castle doctrine is a states-only policy and the feds have no position on it. The second amendment states only that people's right to bear arms shall not be infringed, it doesn't state anything about the application of force.
I don't want to get into this debate on HN but there's not that much evidence that the 2nd Amendment was meant to be a check on the army. It's related to the long-standing English principle of the right to self-defense and the English Bill of Rights of 1689. The English always thought you had the right to defend yourself with deadly force and a long standing tradition of a natural right to bear arms. https://en.wikipedia.org/wiki/Right_to_keep_and_bear_arms
But also, if you come onto my property, you don't have to cede authority to me, I'm still the government and I will make decisions about what happens to you, so you are bound to my laws whether you like it or not.
We give government a monopoly on force
No, that's just one incarnation of government.