Section GetterLemmas.
Definition getSt_server d (C : LockCoh d) : server_state :=
match find st (getLocal server d) as f return _ = f -> _ with
Some v => fun epf => icast (sym_eq (getLocal_server_st_tp C epf)) (dyn_val v)
| _ => fun epf => ServerState [::] 0 None
end (erefl _).
Program Definition getSt_client c d (C : LockCoh d) (pf : c \in nodes) : client_state.
case X: (c \in clients); last by exact: NotHeld.
exact: (match find st (getLocal c d) as f return _ = f -> _ with
Some v => fun epf => icast (sym_eq (getLocal_client_st_tp C X epf)) (dyn_val v)
| _ => fun epf => NotHeld
end (erefl _)).
Defined.

Lemma getSt_client_K c d (C : LockCoh d) (pf : c \in nodes) m :
c \in clients -> getLocal c d = st :-> m -> getSt_client C pf = m.