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.

(* Specifications: *)
Lemma decompose_nonzero: forall sL sR s,
decompose s = (sL,sR) ->
(s <> bot <-> sL <> bot \/ sR <> bot).
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'.
Lemma tree_avg_bot: forall n,
avg (S n) bot bot = Some bot.
Lemma tree_avg_zero: forall sL sR s n,
avg n sL sR = Some s ->
(s = bot <-> sL = bot /\ sR = bot).