A theoretical analysis of the informal sector