A theorem on subdifferential calculation