Definition getLocksR (tp : jstate ge) := listoption_inv (map snd (AMap.elements (lset tp))).Definition maps tp := (getThreadsR tp ++ getLocksR tp)%list.

Lemma nth_error_enum_from n m i Hn Hi : (i < n)%nat -> nth_error (@enum_from n m Hn) i = Some (@fintype.Ordinal m (n - 1 - i) Hi).