Definition deserialize_tree_shape : ByteListReader.t (tree unit) :=
    ByteListReader.fold deserialize_tree_shape_step [].

(* Specifications: *)
Lemma serialize_deserialize_shape_id : forall t bytes, ByteListReader.unwrap deserialize_tree_shape (IOStreamWriter.unwrap (serialize_tree_shape t) ++ bytes) = Some (shape t, bytes).