How do you get the hm strength and defog on Pokemon Diamond Version?

you get hm strength and hm defog after defeating two gym leader.Fantina(defog) Byron(strength).