equality and ancestry for modules