Proof with auto.
split; intros.
hnf in H. specialize ( H a).
unfold map_val, map_share, lookup_fpm.
destruct (proj1_sig m1 a) as [[sh1 a1] | ];
destruct (proj1_sig m2 a) as [[sh2 a2] | ];
destruct (proj1_sig m3 a) as [[sh3 a3] | ]; inv H; try solve [inv H0]; simpl; auto.
destruct H3; simpl in *; auto.
split. apply join_lifted; auto. constructor; auto.
split; apply join_unit2; auto.
split; apply join_unit1; auto.
split; apply join_unit1; auto.
split; apply join_unit1; auto.
intro a. specialize ( H a). destruct H.
unfold map_val, map_share, lookup_fpm in *.
destruct (proj1_sig m1 a) as [[sh1 a1] | ];
destruct (proj1_sig m2 a) as [[sh2 a2] | ];
destruct (proj1_sig m3 a) as [[sh3 a3] | ]; inv H0; try solve [inv H1]; auto.
constructor. split; auto.
apply join_unit2_e in H; auto. apply join_unit2; auto.
repeat f_equal. destruct sh1; destruct sh3; simpl in *; subst.
rewrite (proof_irr n n0); auto.
apply join_unit1_e in H; auto. apply join_unit1; auto.
repeat f_equal. destruct sh2; destruct sh3; simpl in *; subst.
rewrite (proof_irr n n0); auto.
constructor. constructor.
Qed.

Lemma map_gss_val: forall a v m m',
map_upd a v m = Some m' ->
map_val a m' = Some v.