I guess defeat depends on your definition of victory. The USA does not want colonies, they are not worth the effort, and can be hard to get rid of (i.e. Puerto Rico). Plans for leaving existed for both before the 1st boot hit the ground. Unfortunately the locals have more guts than brains. If they had been smart they would have waited a year for the USA to leave, then gone back to their games, instead they forced the USA to get involved.
In Iraq there was at least a partially functional nation-state to work start from, so the USA has succeeded enough to finish turning over to them next year. The Saddam/Sunni/al-Qaeda group exists mostly in the press. The Shia fundamentalists, centered around Muqtada al-Sadr is no longer capable of physically overthrowing the government. The biggest threats to Iraqi central government are themselves, as the public appears to becoming disgusted with factional politics, and the semi-autonomous Kurdish region in the north who, with a functional government and far less violence have a growing economy, are making them look even worse by comparison.
Afghanistan is completely different. The only time they ever had something approaching a national government was the Taliban, and their policies (revenge killings and genocide are so tempting) are not acceptable. Then there is the problem of the perfidy of America’s so-called ally Pakistan. This one is hard to call, and depends on factors like how long it takes things to come to a head in Pakistan, the corruption of the Karzai government, and the developing and maintaining supply lines through the former Russian states. Obama’s promise to pull the troops out by some artificial deadline are on par with his promises to close the Guantanamo Bay detention camp -- it may play well to a portion of his political base, but would doom his administration and party if he actually went through with it. Only if the Taliban (and the ISI) drops its refusal to negotiatons (all past negotiating parties have turned out to be with former members under sentence of death or con men) does an American withdrawal appear politically feasible. However, the trends definitely are against the Taliban, even if it takes another decade to finish.
The big myth is that the USA lost militarily in Vietnam, they did not. The USA had lost the political will to keep going unless there were no alternatives. Negotiations on the Paris Peace Accords were already underway, so when North Vietnam made some concessions the USA agreed, signed, and withdrew their troops. North Vietnam then launched a new invasion 2 years after the USA had finished the withdrawal.
Just a matter of fact you are wrong about Afganistan, Iraq and Vietam
Iraq
Did the US (And allies) obtain a military victory?
Yes and No Saddam and his troops have been defeated but even today still militant groups are operational and killing US and NATO soldiers.
So will the US ever have a complete victory? NO
What happens if the US redraws it troops?
Simple the local warlord and tribe chiefs will have a battle of their own to gain political and military control.
Can the US leave knowing that the military victory and efforts will last? NO the moment they leave Iraq will face serious problems that might even spark a new war possible a civil war between locals.
Afganistan
Afganistan has never been conquered it never surrendered and it never got beaten by a enemy.
Yes terrorist cells have been desimated but they are still active and just a matter of fact they are starting to regroup and as has been proven both by media and returning (And still serving troops) is that the taliban (Or fractions of it) are getting better trained, more sophisticated and way more bolder and equipped then before.
The moment the US and its allies leave afganistan will be back in taliban hands (Or a similair group / faction)
Did the US and its allies obtain a military victory yes did they defeat the enemy and the will to make war? NO
Have the key tasks and goals besides arresting bin laden been met? NO not by a long shot according to goverment officals.
So if the US leaves will this war be labeled a a failed one or a draw yes.
Vietnam
The US did win a partial victory.
Simple fact as every history book states the US was military superiour but the cost of the war was to grave to bare and thus they pulled out as the general popluation rejected the war after several years.
So the US lost the support for the war and was forced to leave and thus only gain a partial victory while the vietnamese army was still operating and capable of waging war.
Moral?
In all 3 cases the US started a job which they cannot finish due the amount of cash, lives and time involved not to mention public opinions and diplomatic agreements.
And to make matters worse the economic crisis and new future dangers force the US and its allies to leave.
If all the involved allies would have more time, cash and will to fight then a total victory would be possible however cultural differences and the region it self is way to unstable to achieve any long lasting result at all.
This has been proven time after time after time.
Pakistan is willing to step to the plate, but is being torn to pieces from the inside out and due all the strategic intrests and its problems with india not able to fully commit.
So a true victory and a long lasting result is only made possible if the region itself calms down and start to settle, which is not very likly to happen yet.
So the moment US boots are out of the mentioned nations the normal routine of those nations will return and within a couple of years or even months everything the US and its allies have builded up will be lost.
So yes the US and its allies did achieve a partial victory, however the rebels and other factions can be granted with a victory as well as they STILL have control over atleast 60% of for example afganistan, they still have control over the drug and arms trade and still growing in number (Partly because neightbour nations allow new training camps and such to support the rebels) So its not the skill, will or lack of vision by the US that denies them to achieve what they want to achieve but its the fact that they cannot control such a huge region without crossing human barriers.
Simple fact as has been shown by the media, The US and Allies march in with troops, tanks and airplanes and cash and try to gain the trust of the locals.
Which does work during the day, but at night the same mister who did get the contract to build a hospital can lift a gun at you because if he does not then the next night his brother, sister and other relatives will be shot, hanged or worse by the taliban.
This tactic works so well that unless the US is prepared to cross those "moral" combat actions the people will never follow.
The US tries to gain control by dialog, trust, respect and mutual understanding.
While the taliban demands control by fear and i tell you from my own exp you would be suprised how effective fear is specially if you are prepared to go beyond fear and make it reality.
These kinds of horrific acts worked great against the russians who where forced to leave and this same happens again with the US and its allies.
Short said a military victory does not count as a victory in general, specially if for 90% all the efforts gained in the first 2 years already are gone, which means that after leaving all the efforts are gone.
Besides that due cultural differences and the way how things work in those nations the US and its allies with all their power and might will never be able to achieve a total victory as long there are people willing to fight and are willing to put up road bombs and killing the wife of the town chief that tried to help the US soldiers....so revenge and fear does beat the US and all its efforts hands down imo.
Ask urself the question would you follow me if i wave with 50 dollars and a new hospital and a new future?
Or would you follow the rebel group that told you plaun and simple if you work with the US troops then we will kill your kids your wife and family....
And this is exactly the point why the US lost the initiative, Momentum and end result.
Think about it.
But back on topic,
I am sure that Iran can hide some rockets and such in the mountains and it would be a real pain to find them.
On the other hand if they cannot be found they also cannot be used.
As the moment a rocket is going airborn a sattalite or a radar will pick it up.
And personally i do not believe that even the americans have rockets and such that are 100% undetectable.
I mean sats radars and all those detection methods are pretty darn good and you might be able to slip a nuke in a truck or in a airplane but its just a matter of time before someone rings the alarm bell.
So is it possible to hide them from sight? well if ur bunker is deep enough it might but still the moment you want to use them the cover has been blown specially when 75% of the total western world and direct neightbours have their eyes and sats fixed upon you.