Proof: Delete Key Example
Let's prove the following theorem:
result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ]
In this example, we have the following map:
| Key | Value |
|---|---|
| name | John |
| city | New York |
| country | USA |
We prove that, when the key "country" and its value is deleted, the map will change to:
| Key | Value |
|---|---|
| name | John |
| city | New York |
Proof:
| # | Claim | Reason |
|---|---|---|
| 1 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] |
| 2 | output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] | output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] |
| 3 | output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 4 | output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 5 | output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 6 | reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] | reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] |
| 7 | reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] | reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] |
| 8 | reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ] | reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ] |
| 9 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] and output of function delete_entry where input key is "country", map is [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ], and processed is [ ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] |
| 10 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] and output of function delete_entry where input key is "country", map is [ entry "city": "New York", [ entry "country": "USA", [ ] ] ], and processed is [ entry "name": "John", [ ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 11 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and output of function delete_entry where input key is "country", map is [ entry "country": "USA", [ ] ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 12 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and output of function delete_entry where input key is "country", map is [ ], and processed is [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] |
| 13 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and reverse of [ entry "city": "New York", [ entry "name": "John", [ ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] |
| 14 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] and reverse of remaining stack [ entry "city": "New York", [ entry "name": "John", [ ] ] ] and already reversed stack [ ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] |
| 15 | result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ] | if result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] and reverse of remaining stack [ entry "name": "John", [ ] ] and already reversed stack [ entry "city": "New York", [ ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ], then result of deleting the entry with key "country" from map [ entry "name": "John", [ entry "city": "New York", [ entry "country": "USA", [ ] ] ] ] = [ entry "name": "John", [ entry "city": "New York", [ ] ] ] |
Comments
Please log in to add comments