A Theory of Divided and Unified Government