Fixpoint elements' (x: tree) (base: list key) : list key :=
  match x with
  | EE => base
  | T _ t1 k t2 => elements' t1 (cons k (elements' t2 base))
 end.

Lemma elements'_interp : forall s x l, SetoidList.InA E.eq x (elements' s l) <-> interp s x \/ InA E.eq x l.