Proof using.
move => m m' h.
elim => //=.
move => n ns IH.
case (adjacent_to_dec _ _) => H_dec /=; last exact: IH.
case => n' m0 H_eq.
rewrite /pt_map_name_msg /=.
case H_eq': (pt_map_msg m') => [m1|]; last by rewrite H_eq' in H_eq.
rewrite H_eq' in H_eq.
inversion H_eq.
rewrite H0 in H_eq'.
move {H_eq H0 m1}.
move => H_in.
case: H_in => H_in; first by inversion H_in.
exact: (IH (n', m0)).
Qed.

(* Specifications: *)
Lemma pt_in_tot_map_name :
forall m m' l n,
pt_map_msg m = Some m' ->
(forall nm, In nm l -> snd nm = m) ->
In (n, m') (filterMap pt_map_name_msg l) ->
In (tot_map_name_inv n, m) l.