def get_last_opening_parenthesis(string):
    """
    Returns index of the the parenthesis that opens the last closing parenthesis
    For example, in "∀x ∈ f(x) (Px v (Qx v Rx))" will return the index of the parenthesis before Px
    """
    num_parentheses_left = 0
    num_parentheses_right = 0

    for char_index in range(len(string)-1, -1, -1):
        if string[char_index] == '(':
            num_parentheses_left += 1
            if num_parentheses_left == num_parentheses_right:
                return char_index
        elif string[char_index] == ')':
            num_parentheses_right += 1