Proof using.
set_up_input_handlers.
destruct (pBody p) eqn:?.
- auto using locks_correct_locked_sent_lock.
- auto using locks_correct_locked_sent_unlock.
- now erewrite locked_in_flight_all_clients_false in * by eauto.
Qed.

Lemma locks_correct_unlock_true_to_false :
forall sigma p x st',
at_head_of_queue sigma x ->
held st' = false ->
pSrc p = Client x ->
locks_correct_unlock (update name_eq_dec sigma (Client x) st') p.