Skip to content

Transformation of Map Elements in Function #5595

Answered by racko
dreamqin68 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm seeking clarification on how to establish a ghost context such that the MapToSequence function can be successfully verified.

I don't think that this is going in the right direction.

The second link I provided above explains how to implement MapToSequence. Concretely sections 2. Making the function compilable to 4. Proving there's a minimum answer it for the concrete case of set<int> comparable to your original question about map<nat, string> and sections 5. Total orders to 8. Coming back to map to sequence answer it for the generic case you are asking about here.

For the nat case, here's a bit more to help you along:

lemma MinKeyExists(m: map<nat, string>)
  requires m != map[]
  en…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@dreamqin68
Comment options

@racko
Comment options

Answer selected by dreamqin68
@dreamqin68
Comment options

Comment options

You must be logged in to vote
1 reply
@dreamqin68
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants