def reif2(model, expr, not_expr):
    """
    reif2(model, expr, not_expr b)

    Return the boolean variable b to express
    b <=> expr
    !b <=> not_expr
    """    
    b = model.NewBoolVar("b expr:" + str(expr) + " neg: " + str(not_expr))
    model.Add(expr).OnlyEnforceIf(b)
    model.Add(not_expr).OnlyEnforceIf(b.Not())
    return b