In this example, we have a map that has 1 entry:

entry "name":"John"

And we want to store a new value "Mike" for the key "name"

We want to prove that, after the update, the new map will be:

[entry "name":"Mike", [ ] ]

Step 1 uses Set Key and Value Property 1 which sets the "processed" to an empty map and "key found" to false.

Step 2 says we can add entry "name": Mike to the "processed" map.

In step 3, we have the final "processed" map and we just need to reverse the entries, but there is only 1 entry in this map, so the reverse of "processed" is the same as "processed."

The rest of the proof uses the transitive property to set the original expression equal to the new map.

Quiz (1 point)

Prove that:
result of storing "Mike" at key: "name" in map: [ entry "name": "John", [ ] ] = [ entry "name": "Mike", [ ] ]

The following properties may be helpful:

Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.

Step Claim Reason (optional) Error Message (if any)
1
2
3
4
5
6
7
8
9
10

Become a subscriber to save your progress, see the correct answer, and more!