Definition indexed_contains tp:= (fun Ncontained: (sigT (containsThread tp)) =>
             let (i, cnti) := Ncontained in getThreadR cnti).Definition resourceList (tp:t): seq.seq res:=
      map (@indexed_contains tp)
          (containsList tp).

(* Specifications: *)
Lemma resourceList_spec: forall i tp (cnti: containsThread tp i), List.nth_error (resourceList tp) i = Some (getThreadR cnti).