Proof: Write End Unchanged Class Defs At 23
Let's prove the following theorem:
if the following are true:
- the line at time 23 = 4
- the tab at time 23 = 1
- number of lines = 3
- Control Map at time 23 = [ entry 0: (pair ("while", 2)), [ ] ]
- Class Map at time 23 = [ ]
then Class Map at time 24 = [ ]
Proof:
Given
1 | the line at time 23 = 4 |
---|---|
2 | the tab at time 23 = 1 |
3 | number of lines = 3 |
4 | Control Map at time 23 = [ entry 0: (pair ("while", 2)), [ ] ] |
5 | Class Map at time 23 = [ ] |
# | 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 23) = pair ("while", 2) | if Control Map at time 23 = [ entry 0: (pair ("while", 2)), [ ] ], then value at (1 - 1) in map (Control Map at time 23) = pair ("while", 2) |
4 | Class Map at time (23 + 1) = Class Map at time 23 | if the line at time 23 = 4 and the tab at time 23 = 1 and number of lines = 4 - 1 and value at (1 - 1) in map (Control Map at time 23) = pair ("while", 2), then Class Map at time (23 + 1) = Class Map at time 23 |
5 | Class Map at time (23 + 1) = [ ] | if Class Map at time (23 + 1) = Class Map at time 23 and Class Map at time 23 = [ ], then Class Map at time (23 + 1) = [ ] |
6 | 23 + 1 = 24 | 23 + 1 = 24 |
7 | Class Map at time (23 + 1) = Class Map at time 24 | if 23 + 1 = 24, then Class Map at time (23 + 1) = Class Map at time 24 |
8 | Class Map at time 24 = [ ] | if Class Map at time (23 + 1) = Class Map at time 24 and Class Map at time (23 + 1) = [ ], then Class Map at time 24 = [ ] |
Comments
Please log in to add comments