def negate(a, a_neg):
    """Generates a negation constraint for variable a.

    Parameters
    ----------
    a : str
        Variable to be negated.
    a_neg : str
        Identifier of the negated variable.

    Returns
    -------
    str
        Text of the constraint.
    """
    
    return "%s + %s = 1" % (a, a_neg)