Proof using.
intros.
unfold applied_entries in *.
rewrite argmax_fun_ext with (g := fun h : name => lastApplied (sigma h)); intuition.
break_match; auto.
repeat find_higher_order_rewrite. auto.
Qed.

Lemma applied_entries_log_lastApplied_update_same :
forall sigma h st,
log st = log (sigma h) ->
lastApplied st = lastApplied (sigma h) ->
applied_entries (update name_eq_dec sigma h st) = applied_entries sigma.