Definition getStL n d (C : TPCCoh d) (pf : n \in nodes) : Log :=
match find log (getLocal n d) as f return _ = f -> _ with
Some v => fun epf => icast (sym_eq (cohStL C pf epf)) (dyn_val v)
| _ => fun epf => [::]
end (erefl _).

(* TODO: get rid of duplication *)
Lemma getStL_Kc n d (C : TPCCoh d) (pf : n \in nodes) (m : CStateT) (l : Log):
getLocal n d = st :-> m \+ log :-> l -> getStL C pf = l.