#[local] Instance Op_max_length : ZifyClasses.CstOp max_length :=
  { TCst := 16777211%Z ; TCstInj := eq_refl }.#[local] Ltac case_if :=
  lazymatch goal with
  | |- context C [if ?b then _ else _] => destruct b eqn:?
  | H : context C [if ?b then _ else _] |- _ => destruct b eqn:?
  end.

Lemma to_list_firstn_skipn_middle (s : string) (i : int) : to_Z i < to_Z (length s) -> to_list s = List.firstn (to_nat i) (to_list s) ++ get s i :: List.skipn (to_nat (i + 1)) (to_list s).