#[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 compare_lt_spec (s1 s2 : string) : compare s1 s2 = Lt <-> exists i, to_Z i <= to_Z (length s1) /\ to_Z i <= to_Z (length s2) /\ (forall j, to_Z j < to_Z i -> get s1 j = get s2 j) /\ ((i = length s1 /\ to_Z i < to_Z (length s2)) \/ (to_Z i < to_Z (length s1) /\ to_Z i < to_Z (length s2) /\ char63_compare (get s1 i) (get s2 i) = Lt)).