The Logic of the Retina