(** * Properties of sub *)

(* Specifications: *)
Lemma sub_full (s : string) : sub s 0 (length s) = s.
Lemma sub_len_0 (off : int) (s : string) :
sub s off 0 = ""%pstring.
Lemma split_cat_sub (s : string) (len : int) :
s = cat (sub s 0 len) (sub s len (length s - len)%uint63).
Lemma sub_sub (s : string) (off1 len1 off2 len2 : int) :
to_Z off1 + to_Z off2 = to_Z (off1 + off2)%uint63 ->
to_Z len2 <= to_Z len1 - to_Z off2 ->
sub (sub s off1 len1) off2 len2 = sub s (off1 + off2)%uint63 len2.