To build on that abit. The Castles defence is the castle walls. The PD is the province defence. Think of a province as being as large as a county or district. So the PD is local militia which help out to try and keep your province from being invaded. They will be assisted by any troops you have "patrolling" the province.
THEN separately is the attack on the castle. That will include the people who had the order to defend the castle and those who were working in the lab
So the PD is local militia which help out to try and keep your province from being invaded. They will be assisted by any troops you have "patrolling" the province.
Unless the province has a fortification, commanders set to "Defend" will also fight with the PD, no?