def make_expressions(exps):
    """
    Prepare a dictionary of expressions
    together with their lower and upper bounds.
    """
    d = {}
    for e, l, u in exps:
        if e in d:
            ll, uu = d[e]
            d[e] = (max(l, ll), min(u, uu))
        else:
            d[e] = (l, u)
    return d