Proof: Write End While Control Map 46
Let's prove the following theorem:
if the following are true:
- the line at time 46 = 4
- the tab at time 46 = 1
- number of lines = 3
- Control Map at time 46 = [ entry 0: (pair ("while", 2)), [ ] ]
then Control Map at time 47 = [ entry 0: (pair ("while", 2)), [ ] ]
Proof:
Given
1 | the line at time 46 = 4 |
---|---|
2 | the tab at time 46 = 1 |
3 | number of lines = 3 |
4 | Control Map at time 46 = [ entry 0: (pair ("while", 2)), [ ] ] |
# | Claim | Reason |
---|---|---|
1 | 4 - 1 = 3 | 4 - 1 = 3 |
2 | number of lines = 4 - 1 | if number of lines = 3 and 4 - 1 = 3, then number of lines = 4 - 1 |
3 | value at (1 - 1) in map (Control Map at time 46) = pair ("while", 2) | if Control Map at time 46 = [ entry 0: (pair ("while", 2)), [ ] ], then value at (1 - 1) in map (Control Map at time 46) = pair ("while", 2) |
4 | Control Map at time (46 + 1) = Control Map at time 46 | if the line at time 46 = 4 and the tab at time 46 = 1 and number of lines = 4 - 1 and value at (1 - 1) in map (Control Map at time 46) = pair ("while", 2), then Control Map at time (46 + 1) = Control Map at time 46 |
5 | Control Map at time (46 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (46 + 1) = Control Map at time 46 and Control Map at time 46 = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time (46 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] |
6 | 46 + 1 = 47 | 46 + 1 = 47 |
7 | Control Map at time (46 + 1) = Control Map at time 47 | if 46 + 1 = 47, then Control Map at time (46 + 1) = Control Map at time 47 |
8 | Control Map at time 47 = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (46 + 1) = Control Map at time 47 and Control Map at time (46 + 1) = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time 47 = [ entry 0: (pair ("while", 2)), [ ] ] |
Comments
Please log in to add comments