Anatomy of a gauge theory