Proof: Write Assign End Vars 26
Let's prove the following theorem:
if the following are true:
- the line at time 26 = 1
- the tab at time 26 = 0
- statement at line 1, tab 0 =
locations = {"ES": "Estonia", "MX": "Mexico"}
- expression state at time 26 = "end_expr"
- Variables Map at time 26 = [ ]
- Return Value at time 26 = Python reference 0
then Variables Map at time 27 = [ entry locations: (Python reference 0), [ ] ]
Proof:
Given
1 | the line at time 26 = 1 |
---|---|
2 | the tab at time 26 = 0 |
3 | statement at line 1, tab 0 = locations = {"ES": "Estonia", "MX": "Mexico"} |
4 | expression state at time 26 = "end_expr" |
5 | Variables Map at time 26 = [ ] |
6 | Return Value at time 26 = Python reference 0 |
# | Claim | Reason |
---|---|---|
1 | Variables Map at time (26 + 1) = result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) | if the line at time 26 = 1 and the tab at time 26 = 0 and statement at line 1, tab 0 = locations = {"ES": "Estonia", "MX": "Mexico"} and expression state at time 26 = "end_expr", then Variables Map at time (26 + 1) = result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) |
2 | result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) | if Return Value at time 26 = Python reference 0, then result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) |
3 | Variables Map at time (26 + 1) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) | if Variables Map at time (26 + 1) = result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) and result of storing (Return Value at time 26) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26), then Variables Map at time (26 + 1) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) |
4 | result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: [ ] | if Variables Map at time 26 = [ ], then result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: [ ] |
5 | result of storing (Python reference 0) at key: locations in map: [ ] = [ entry locations: (Python reference 0), [ ] ] | result of storing (Python reference 0) at key: locations in map: [ ] = [ entry locations: (Python reference 0), [ ] ] |
6 | result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = [ entry locations: (Python reference 0), [ ] ] | if result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = result of storing (Python reference 0) at key: locations in map: [ ] and result of storing (Python reference 0) at key: locations in map: [ ] = [ entry locations: (Python reference 0), [ ] ], then result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = [ entry locations: (Python reference 0), [ ] ] |
7 | Variables Map at time (26 + 1) = [ entry locations: (Python reference 0), [ ] ] | if Variables Map at time (26 + 1) = result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) and result of storing (Python reference 0) at key: locations in map: (Variables Map at time 26) = [ entry locations: (Python reference 0), [ ] ], then Variables Map at time (26 + 1) = [ entry locations: (Python reference 0), [ ] ] |
8 | 26 + 1 = 27 | 26 + 1 = 27 |
9 | Variables Map at time (26 + 1) = Variables Map at time 27 | if 26 + 1 = 27, then Variables Map at time (26 + 1) = Variables Map at time 27 |
10 | Variables Map at time 27 = [ entry locations: (Python reference 0), [ ] ] | if Variables Map at time (26 + 1) = Variables Map at time 27 and Variables Map at time (26 + 1) = [ entry locations: (Python reference 0), [ ] ], then Variables Map at time 27 = [ entry locations: (Python reference 0), [ ] ] |
Comments
Please log in to add comments