implement Inv<out Nothing>==Inv<Nothing>,Inv<in Anything>==Inv<Anything>
and fix some logic problems in equivalence algorithm
minor