Optimal income taxation in models with endogenous fertility