(** Normalization on little-endian numbers *)

Fixpoint nztail d :=
  match d with
  | Nil => Nil
  | D0 d => match nztail d with Nil => Nil | d' => D0 d' end
  | D1 d => D1 (nztail d)
  | D2 d => D2 (nztail d)
  | D3 d => D3 (nztail d)
  | D4 d => D4 (nztail d)
  | D5 d => D5 (nztail d)
  | D6 d => D6 (nztail d)
  | D7 d => D7 (nztail d)
  | D8 d => D8 (nztail d)
  | D9 d => D9 (nztail d)
  | Da d => Da (nztail d)
  | Db d => Db (nztail d)
  | Dc d => Dc (nztail d)
  | Dd d => Dd (nztail d)
  | De d => De (nztail d)
  | Df d => Df (nztail d)
  end.Definition lnorm d :=
  match nztail d with
  | Nil => zero
  | d => d
  end.

Lemma rev_rev d : rev (rev d) = d.