Definition getStC d (C : TPCCoh d) : CStateT :=
match find st (getLocal cn d) as f return _ = f -> _ with
Some v => fun epf => icast (sym_eq (cohStC C epf)) (dyn_val v)
| _ => fun epf => (0, CInit)
end (erefl _).

Lemma getStC_K d (C : TPCCoh d) m (l : Log):
getLocal cn d = st :-> m \+ log :-> l -> getStC C = m.