Ltac wlt_ind :=
  match goal with
  | [ |- forall (n: word ?len), ?P ] =>
    refine (well_founded_ind (@wlt_wf len) (fun n => P) _)
  end.

Lemma sext_eq_rect: forall sz (w: word sz) n nsz Hsz1, exists Hsz2, eq_rect (sz + n) word (sext w n) (nsz + n) Hsz1 = sext (eq_rect sz word w nsz Hsz2) n.