Fixpoint RoseS_spec (x y z : bs) :=
match z with
| nil => nil
| _ :: z' =>
if leb (length z) (length x - length y)
then false :: RoseS_spec x y z'
else hd false (skipn (length x - length z) x) :: RoseS_spec x y z'
end.

(* Specifications: *)
Lemma RoseS_spec2_false : forall x y z,
length z <= length x - length y ->
bs2nat (RoseS_spec x y z) = 0.
Lemma skipn_roseS : forall x y z,
bs2nat (skipn (length z) (RoseS_spec x y z)) = 0.
Lemma RoseS_cons : forall x y z b1 b2,
length z <= length x ->
RoseS_spec (b1 :: x) (b2 :: y) z = RoseS_spec x y z.
Lemma bs2nat_cons_eq : forall b l1 l2,
bs2nat l1 = bs2nat l2 ->
bs2nat (b :: l1) = bs2nat (b :: l2).