Synthesizing ideal and non-ideal theories into a cohesive theory of