diff --git a/theories/list.v b/theories/list.v index 72dee9a4683f80733a6b33cc36a7e944bd7d0dc8..87576f64f11b96fa43d7d69c2d39616e60ae544e 100644 --- a/theories/list.v +++ b/theories/list.v @@ -2961,6 +2961,8 @@ Section fmap. intros Hi. rewrite list_lookup_fmap in Hi. destruct (l !! i) eqn:?; simplify_eq/=; eauto. Qed. + Lemma list_fmap_insert l i x: f <$> <[i:=x]>l = <[i:=f x]>(f <$> l). + Proof. revert i. by induction l; intros [|i]; f_equal/=. Qed. Lemma list_alter_fmap (g : A → A) (h : B → B) l i : Forall (λ x, f (g x) = h (f x)) l → f <$> alter g i l = alter h i (f <$> l). Proof. intros Hl. revert i. by induction Hl; intros [|i]; f_equal/=. Qed.