Proof with auto.
intros.
assert (forall x y, x = y <-> join bot x y).
intros;split;intro. subst.
split.
rewrite glb_commute.
apply glb_bot.
rewrite lub_commute.
apply lub_bot.
apply bot_join...
repeat rewrite H1.
generalize (decompose_bot);intro.
apply decompose_join...
Qed.

Lemma tree_avg_equal: forall sL sR sL' sR' s n,
avg n sL sR = Some s ->
avg n sL' sR' = Some s ->
sL = sL' /\ sR = sR'.