Proof with try tauto.
intros.
icase n.
split;intros.
subst s.
apply tree_avg_equal with bot (S n)...
apply tree_avg_bot.
destruct H0;subst.
rewrite tree_avg_bot in H. inv H...
Qed.

Lemma tree_avg_nonzero: forall sL sR s n,
avg n sL sR = Some s ->
(s <> bot <-> sL <> bot \/ sR <> bot).