I was just about to repeat my viewpoint about the unit leader providing the kit, as was common in feudal armies, but Drone's already beaten me to it!

You can retrain an upgraded unit in an un-upgraded province, so long as the basic troop type is available there. That's why you can add armour in one province, weapons in a second and valour in a third. Once an upgrade is applied it sticks. The one to watch though is valour, as this is tracked man-for-man, retraining a depleted unit in a basic-level building will give you raw recruits (v0). If you retrain in a master-level facility, your new guys will start with v1.