While the participation decision is discrete in a static context, i.e. to work or not to work, such is not the case in a life-cycle context where workers choose the fraction of their lifetime that they spend working. In this paper, I therefore characterize the optimal redistribution policy in a life-cycle framework with both an intensive and an extensive margin of labor supply. The government should optimally design a history-dependent social security system which induces higher productivity individuals to retire later. Some redistribution therefore needs to be done through the pension system; a standard non-linear income tax is not enough