(** * Axioms relating string operations with list operations *)

(* Specifications: *)
Axiom length_spec :
forall (s : string),
to_nat (length s) = Datatypes.length (to_list s).
Axiom get_spec :
forall (s : string) (i : int),
get s i = ListDef.nth (to_nat i) (to_list s) 0%uint63.
Axiom make_spec :
forall (i : int) (c : char63),
to_list (make i c) =
ListDef.repeat (PrimInt63.land c 255%uint63)
(Nat.min (to_nat i) (to_nat max_length)).
Axiom sub_spec :
forall (s : string) (off len : int),
to_list (sub s off len) =
ListDef.firstn (to_nat len) (ListDef.skipn (to_nat off) (to_list s)).
Axiom cat_spec :
forall (s1 s2 : string),
to_list (cat s1 s2) =
ListDef.firstn (to_nat max_length) (to_list s1 ++ to_list s2).