There's already code to effectively handle <> operators. Just the PartClauseInfo.op_is_ne needs to be set to true. get_matching_list_bounds() then handles that by taking the inverse of the partitions matching the equality operator.
Effectively, I think that's the attached patch.
I think there is a thinko here.
Sorry. It's my thinko. In cases IS_NOT_TRUE and IS_NOT_FALSE the op_is_ne is set to true. So the logic in origin patch is right.