A Theory of Innovation: Benefit, Harm, and Legal Regimes