Definition share_metric (n : nat) (s : canonTree) : nat :=
 match n with
 | 0 => 0
 | S n => match le_dec (height s) n with
          | left _ => countBLeafCT n s + 1
          | right _ => 0
         end
 end.

Lemma share_metric_dif_monotonic: forall s1 s2 n n0, (s1<=s2)%ba -> n<=n0 -> height s1 < n -> height s2 < n -> (share_metric n s2 - share_metric n s1 <= share_metric n0 s2 - share_metric n0 s1).