def lower_bound(w_dyad):
 assert is_dyad_weight(w_dyad)
 md = get_max_denom(w_dyad)
 lb1 = (len(bin(md)) - 3)
 lb2 = (sum(((1 if (e != 0) else 0) for e in w_dyad)) - 1)
 return max(lb1, lb2)

def lower_bound ( w_dyad ) : assert is_dyad_weight ( w_dyad ) md = get_max_denom ( w_dyad ) lb1 = ( len ( bin ( md ) ) - 3 ) lb2 = ( sum ( ( ( 1 if ( e != 0 ) else 0 ) for e in w_dyad ) ) - 1 ) return max ( lb1 , lb2 )
return a lower bound on the number of cones needed to represent the tuple .