A theory of participatory democracy based on the real case of Porto Alegre