MemSortAndDedup.scala verified