Proof using.
unfold tree_serialize, tree_deserialize. cheerios_crush.
rewrite serialize_deserialize_shape_id.
now rewrite serialize_deserialize_tree_elements_id.
Qed.
Global Instance tree_Serializer : Serializer (tree A) :=
{| serialize := tree_serialize;
deserialize := tree_deserialize;
serialize_deserialize_id := tree_serialize_deserialize_id
|}.
End serializer.
Module sexp.
Definition sexp := tree string.
Module examples.
(* (define (id x) x) *)
Definition id : sexp :=
node [atom "define"; node [atom "id"; atom "x"]; atom "x"]%string.

(* Specifications: *)
Lemma foo:
ByteListReader.unwrap deserialize
(IOStreamWriter.unwrap (serialize id)) = Some (id, []).