(** Shifts are morphisms *)
#[global]
Instance shiftl_wd : Proper (eq==>eq==>eq) shiftl.
(** We could also have specified shiftl with an addition on the left. *)

(* Specifications: *)
Lemma shiftl_spec_alt : forall a n m, 0<=n -> (a << n).[m+n] = a.[m].
(** Chaining several shifts. The only case for which there isn't any simple expression is a true shiftr followed by a true shiftl. *)
Lemma shiftl_shiftl : forall a n m, 0<=n ->
(a << n) << m == a << (n+m).
Lemma shiftr_shiftl_l : forall a n m, 0<=n ->
(a << n) >> m == a << (n-m).
Lemma shiftr_shiftl_r : forall a n m, 0<=n ->
(a << n) >> m == a >> (m-n).
Lemma shiftr_shiftr : forall a n m, 0<=m ->
(a >> n) >> m == a >> (n+m).