induction n1 as [|n1 IHn1]; simpl; intros n2 n3 Heq w; intuition.
rewrite (UIP_dec eq_nat_dec Heq (refl_equal _)); reflexivity.
rewrite (IHn1 _ _ (plus_assoc _ _ _)).
f_equal.
apply wtl_match.
Qed.

(* Specifications: *)
Theorem split1_split2 : forall n1 n2 n3 Heq w,
split1 n2 n3 (split2 n1 (n2 + n3) w) =
split2 n1 n2 (split1 (n1 + n2) n3 (match Heq in _ = N return word N with
| refl_equal => w
end)).
Theorem split2_split1 : forall n1 n2 n3 Heq w,
split2 n1 n2 (split1 (n1+n2) n3 w) =
split1 n2 n3 (split2 n1 (n2+n3) (match Heq in _ = N return word N with
| refl_equal => w
end)).
Theorem combine_0_n : forall sz2 (w: word 0) (v: word sz2),
combine w v = v.
Lemma WS_eq_rect : forall b n (w: word n) n' H H',
eq_rect _ word (@WS b n w) _ H = @WS b n' (eq_rect _ word w _ H').
Theorem combine_eq_rect2 : forall sz n n'
(H: n = n') H'
(a: word sz) (b: word n),
combine a b =
eq_rect _ word (combine a (eq_rect _ word b _ H)) _ H'.
Theorem combine_n_0 : forall sz1 (w : word sz1) (v : word 0),
combine w v = eq_rect _ word w _ (plus_n_O sz1).
Lemma whd_eq_rect : forall n w Heq,
whd (eq_rect (S n) word w (S (n + 0)) Heq) =
whd w.
Lemma wtl_eq_rect : forall n w Heq Heq',
wtl (eq_rect (S n) word w (S (n + 0)) Heq) =
eq_rect n word (wtl w) (n + 0) Heq'.
Lemma whd_eq_rect_mul : forall n w Heq,
whd (eq_rect (S n) word w (S (n * 1)) Heq) =
whd w.
Lemma wtl_eq_rect_mul : forall n w b Heq Heq',
wtl (eq_rect (S n) word (WS b w) (S (n * 1)) Heq) =
eq_rect _ word w _ Heq'.
Theorem split1_0 : forall n w Heq,
split1 n 0 (eq_rect _ word w _ Heq) = w.
Theorem split2_0 : forall n w Heq,
split2 0 n (eq_rect _ word w _ Heq) = w.
Theorem combine_end : forall n1 n2 n3 Heq w,
combine (split1 n2 n3 (split2 n1 (n2 + n3) w))
(split2 (n1 + n2) n3 (match Heq in _ = N return word N with
| refl_equal => w
end))
= split2 n1 (n2 + n3) w.