rsetMentions g st@ returns the portion of discourse history @st@
--   in which all groups are supersets of @g@ (inclusive, not strict super)
supersetMentions :: DiscourseUnit -> RefHistory -> RefHistory
supersetMentions (Node g _) h =
    h { rhCount = Map.filterWithKey hasK (rhCount h) }
  where
    hasK (Node g2 _) _ =
        rgClass g == rgClass g2 &&
        rgIdxes g `Set.isSubsetOf` rgIdxes g2

-- | @lastMention st k@ returns the number of times @k@ has been mentioned
lastMenti
supersetMentions :: DiscourseUnit -> RefHistory -> RefHistory
supersetMentions (Node g _) h =
    h { rhCount = Map.filterWithKey hasK (rhCount h) }
  where
    hasK (Node g2 _) _ =
        rgClass g == rgClass g2 &&
        rgIdxes g `Set.isSubsetOf` rgIdxes g2

-- | @lastMention st k@ returns the number of times @k@ has been mentioned
supersetMentions (Node g _) h =
    h { rhCount = Map.filterWithKey hasK (rhCount h) }
  where
    hasK (Node g2 _) _ =
        rgClass g == rgClass g2 &&
        rgIdxes g `Set.isSubsetOf` rgIdxes g2

-- | @lastMention st k@ returns the number of times @k@ has been mentioned