dafny-lang / libraries

Libraries useful for Dafny programs
Other
43 stars 25 forks source link

Request: ordered maps #107

Open robin-aws opened 1 year ago

robin-aws commented 1 year ago

We already kind of have ordered sets because of definitions like https://github.com/dafny-lang/libraries/blob/master/src/Collections/Sequences/Seq.dfy#L182. In both cases it would be very nice to provide subset types for these concepts.

stefan-aws commented 1 year ago

Can you specify what you mean by an ordered map? Are you saying both domain and codomain have a partial order, and if x <= y, then m[x] <= m[y]?