Pseudocode:

data (Ord a) => BoundedOrderedList a b :: * -> a -> * where BOCons hd w tl :: a -> (hd >= b) -> BoundedOrderedList a hd -> BoundedOrderedList a b BONil :: BoundedOrderedList a b type (Ord a) => OrderedList a = exists b :: a. BoundedOrderedList a b

OrderedList is a monoid with merge as mappend. And (at least in its proof-irrelevant refinement form) it’s obviously the type you actually want to be using to define the denotation of events.

]]>merge isn’t mappend on lists … but it *is* mappend on *ordered lists*!