(*+ Trying to relate spec safety to "oracle steps" safety *)

Definition Q n (x : config) :=
  match x with (_, F, G, thd, pool) =>
    (forall l, precise (resinvs G l)) /\
    functions_safe G F /\
    selfjoins (reindex thd pool) /\
    lockpool_matches pool (resinvs G) /\
    (forall i oracle m p,
        nth thd i = Some (m, p) ->
        safeN_ oracle_at_ext n oracle p m)
  end.

Theorem progress_Q n x : Q (S n) x -> exists y, x ===> y.