Flexible spatial learning requires both the dorsal and ventral hippocampus and their functional interactions with the prefrontal cortex