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

Lemma all_but_maps i tp (cnti : containsThread tp i) : all_but i (maps tp) = all_but i (getThreadsR tp) ++ getLocksR tp.