What math tells us about social dilemmas