hopefully good invariant, and done add_neq

done with Rasmus