Dependent sums and supporting typeclasses for comparing and displaying them