':param function: ``Expression`` for the function
:param argument: ``Expression`` for the argument
:param argument_indices: set for the indices of the glue formula from which the argument came
:raise LinearLogicApplicationException: If \'function\' cannot be applied to \'argument\' given \'argument_indices\'.'

def __init__(self, function, argument, argument_indices=None):

    function_simp = function.simplify()
    argument_simp = argument.simplify()
    assert isinstance(function_simp, ImpExpression)
    assert isinstance(argument_simp, Expression)
    bindings = BindingDict()
    try:
        if isinstance(function, ApplicationExpression):
            bindings += function.bindings
        if isinstance(argument, ApplicationExpression):
            bindings += argument.bindings
        bindings += function_simp.antecedent.unify(argument_simp, bindings)
    except UnificationException as e:
        raise LinearLogicApplicationException((u'Cannot    apply    %s    to    %s.    %s' % (function_simp, argument_simp, e)))
    if argument_indices:
        if (not (set(function_simp.antecedent.dependencies) < argument_indices)):
            raise LinearLogicApplicationException((u'Dependencies    unfulfilled    when    attempting    to    apply    Linear    Logic    formula    %s    to    %s' % (function_simp, argument_simp)))
        if (set(function_simp.antecedent.dependencies) == argument_indices):
            raise LinearLogicApplicationException((u'Dependencies    not    a    proper    subset    of    indices    when    attempting    to    apply    Linear    Logic    formula    %s    to    %s' % (function_simp, argument_simp)))
    self.function = function
    self.argument = argument
    self.bindings = bindings
