a-b. (Visible door) Door Stop task environment switch. a. Views of “visible Door Stop” tracks that mice navigated in during environment switch paradigm (Fig. 4). Views from beginning of tracks. b. Examples of cells with timing fields and spatial fields that either remained coding for time or space across environments, switched coding time or space across environments, or were selective for time or space only in one environment. Bottom, DF/F versus time (left) or position (right) for 5 individual neurons during the (visible door) door stop wait interval and running periods across the tracks in environment 1 (E1) and environment 2 (E2). Scale bars indicate 100% DF/F. Top, Mean DF/F versus time (left) and position (right) across all correct wait trials and runs along the track. c-f. Linear track task timing cells. c. Views of linear tracks that mice navigated in during environment switch paradigms (Figs. 4 and 5, Supplementary Fig. 7). No door stop component was included in this task. Mice spontaneously stopped during linear track navigation. d. Histogram of instantaneous velocity from all mice (n=6) navigating in virtual linear track task (top). Histogram of duration of spontaneous rest periods from all mice navigating in virtual linear track task (Bottom). e. Bottom, DF/F versus time for each rest period of a single session for 4 individual neurons from the same FOV. Top, Mean DF/F versus time across all rest periods (red) and mean locomotion velocity (black) across same periods. f. Mean DF/F versus time across all rest periods from a single session (each row represents single neuron mean DF/F) in a single FOV (top). Mean DF/F normalized to peak for each neuron (each row). Mean mouse velocity during rest periods (bottom). g-j. Classical conditioning to linear track switch g. Schematic of classical trace conditioning paradigm (top) and view of linear virtual track environment (below). CS (auditory click) was presented 6 seconds before reward delivery. Head-fixed mice performed classical trace conditioning task in complete darkness (treadmill was fixed in place and could not rotate) and were subsequently switched into the virtual linear track navigation task (VR screens were turned on and treadmill was free to rotate, no door stop, see c-f above); this switch paradigm was used in Fig. 4. h. Examples of cells with timing fields during the trace conditioning period and during rest periods on the virtual linear track navigation task. Bottom, DF/F versus time (left, classical conditioning; middle, linear track) and position (right, linear track) for 2 individual neurons. Scale bars indicate 100% DF/F. Top, Mean DF/F versus time (left, classical condition; middle, linear track) and position (right). i. Mean DF/F versus time across all trace periods in a single session for all neurons (each row represents single neuron mean DF/F) in a single FOV during the 5.5 second trace period in the classical conditioning task. Mean DF/F normalized to peak for each neuron (each row). j. Top, Mean normalized mouse lick frequency versus time during trace period, across all trace periods during example single session in the classical trace conditioning task, demonstrating anticipatory licking. Bottom, normalized mouse lick frequency versus time during trace period shown for all trace periods in the classical trace conditioning task. k-m. Characterization of cell encoding properties across days in (invisible door) Door stop task. k. Bottom, DF/F versus time for each correct trial of a single session for the same individual neuron with timing fields during the 6 second door stop wait interval on day 1 (left) and day 3 (right). Top, Mean DF/F versus time across all correct trials for the same cell on day 1 (left) and day 3 (right). l. Same as b, but for an example cell with spatial fields. m. Fraction of cells with timing or spatial fields that encoded the same variable (orange) or switched variables (blue) across days (t=inf, df = 25, P<.0001, Student’s Paired T-Test). N = 26 cells across 4 imaging fields. *** indicate P<0.0001. n. Histogram (left) and mean (right) of absolute value of RRI difference for each cell across environments (including all track environment switches: invisible door, visible door, linear track, but not including classic conditioning to linear track switches) for real (blue) and shuffled data (brown). Cells included are from top and bottom quartiles of RRI distribution in environment 1. (N = 236 cells across 10 imaging fields; P<0.001 for Shuffle Test). Box plot: Red lines indicate median, the edges of the box are the 25th and 75th percentiles, the whiskers depict range of data (excluding outliers), and the outliers are plotted individually indicated by red “+” markers. *** indicate P<0.001 for Shuffle Test.