Abstract
Reasoning flexibly composes known elements to solve novel problems. Recent theories suggest the brain uses the axis of time to compose elements for reasoning. In this view, elements are packaged into fast neural sequences, with each sequence exploring the implications of a different composition. Using magnetoencephalography, we tested this idea while participants mentally executed programs. Each program contained a set of steps linked to operations, the implications of which had to be computed. We found that behavioral performance scaled with program complexity, and by the end of execution, inferred program solutions were represented in prefrontal and parietal cortices. We identified a possible mechanism by which these solutions were computed. During reasoning, representations of steps in the program reactivated in fast sequences, consistent with sampling candidate partial solutions. Further evidence suggested these reactivations were accompanied by representations of their operations, and were followed by neural patterns reflecting their computed implications. Together, these results suggest replaying sequences supports program execution and reveal a highly organized temporal microarchitecture of reasoning.