Definition contains_from_ineq (tp:t):
{i : tid & i < num_threads tp } -> {i : tid & containsThread tp i}:=
fun (H : {i : tid & i < num_threads tp}) =>
let (x, i) := H in existT (containsThread tp) x i.
Definition containsList (tp:t): seq.seq (sigT (containsThread tp)):=
map (contains_from_ineq tp) (containsList' (num_threads tp)).

(* Specifications: *)
Lemma containsList'_spec: forall i n
(cnti: (fun i => i < n) i),
List.nth_error (containsList' n) i = Some (existT _ i (cnti)).
Lemma containsList_spec: forall i tp
(cnti: containsThread tp i),
List.nth_error (containsList tp) i = Some (existT _ i cnti).