Definition at_head_of_queue sigma c := (exists t, queue (sigma Server) = c :: t).

(* Specifications: *)
Lemma at_head_of_queue_intro : forall sigma c t, queue (sigma Server) = c :: t -> at_head_of_queue sigma c.
Lemma locks_correct_update_true : forall sigma c st', held st' = true -> at_head_of_queue sigma c -> locks_correct sigma -> locks_correct (update name_eq_dec sigma (Client c) st').
Lemma locks_correct_locked_at_head : forall sigma p c, pDst p = Client c -> pBody p = Locked -> locks_correct_locked sigma p -> at_head_of_queue sigma c.
Lemma all_clients_false_locks_correct_server_update : forall sigma st, (forall c, held (sigma (Client c)) = false) -> locks_correct (update name_eq_dec sigma Server st).
Lemma locks_correct_true_at_head_of_queue : forall sigma x, locks_correct sigma -> held (sigma (Client x)) = true -> at_head_of_queue sigma x.
Lemma unlock_in_flight_all_clients_false : forall sigma p, pBody p = Unlock -> locks_correct_unlock sigma p -> locks_correct sigma -> (forall c, held (sigma (Client c)) = false).
Lemma locks_correct_at_head_preserved : forall sigma st', locks_correct sigma -> (forall c, at_head_of_queue sigma c -> at_head_of_queue (update name_eq_dec sigma Server st') c) -> locks_correct (update name_eq_dec sigma Server st').
Lemma at_head_of_queue_intro : forall sigma c t, queue (sigma Server) = c :: t -> at_head_of_queue sigma c.
Lemma locks_correct_update_true : forall sigma c st', held st' = true -> at_head_of_queue sigma c -> locks_correct sigma -> locks_correct (update name_eq_dec sigma (Client c) st').
Lemma locks_correct_locked_at_head : forall sigma p c, pDst p = Client c -> pBody p = Locked -> locks_correct_locked sigma p -> at_head_of_queue sigma c.
Lemma all_clients_false_locks_correct_server_update : forall sigma st, (forall c, held (sigma (Client c)) = false) -> locks_correct (update name_eq_dec sigma Server st).
Lemma locks_correct_true_at_head_of_queue : forall sigma x, locks_correct sigma -> held (sigma (Client x)) = true -> at_head_of_queue sigma x.
Lemma unlock_in_flight_all_clients_false : forall sigma p, pBody p = Unlock -> locks_correct_unlock sigma p -> locks_correct sigma -> (forall c, held (sigma (Client c)) = false).
Lemma locks_correct_at_head_preserved : forall sigma st', locks_correct sigma -> (forall c, at_head_of_queue sigma c -> at_head_of_queue (update name_eq_dec sigma Server st') c) -> locks_correct (update name_eq_dec sigma Server st').