Cognitive Foundations for Reasoning and Their Manifestation in LLMs