proposition: Lemma sublist_lookup_alter f l i n k : sublist_lookup i n l = Some k → length (f k) = n → sublist_lookup i n (sublist_alter f i n l) = f <$> sublist_lookup i n l.
proof: Proof. unfold sublist_lookup. intros Hk ?. erewrite sublist_alter_length by eauto. unfold sublist_alter; simplify_option_eq. by rewrite Hk, drop_app_length', take_app_length' by (rewrite ?take_length; lia). Qed.
imports: stdpp(options)