Proof: Write Else Tab24
Let's prove the following theorem:
if the following are true:
- the line at time 24 = 5
- the tab at time 24 = 0
- statement at line 5, tab 0 =
else:
- Control Map at time 24 = [ entry 0: (pair ("if", False)), [ ] ]
then the tab at time 25 = 1
Proof:
Given
1 | the line at time 24 = 5 |
---|---|
2 | the tab at time 24 = 0 |
3 | statement at line 5, tab 0 = else: |
4 | Control Map at time 24 = [ entry 0: (pair ("if", False)), [ ] ] |
# | Claim | Reason |
---|---|---|
1 | value at 0 in map (Control Map at time 24) = pair ("if", False) | if Control Map at time 24 = [ entry 0: (pair ("if", False)), [ ] ], then value at 0 in map (Control Map at time 24) = pair ("if", False) |
2 | the tab at time (24 + 1) = 0 + 1 | if the line at time 24 = 5 and the tab at time 24 = 0 and statement at line 5, tab 0 = else: and value at 0 in map (Control Map at time 24) = pair ("if", False), then the tab at time (24 + 1) = 0 + 1 |
3 | 0 + 1 = 1 | 0 + 1 = 1 |
4 | the tab at time (24 + 1) = 1 | if the tab at time (24 + 1) = 0 + 1 and 0 + 1 = 1, then the tab at time (24 + 1) = 1 |
5 | 24 + 1 = 25 | 24 + 1 = 25 |
6 | the tab at time (24 + 1) = the tab at time 25 | if 24 + 1 = 25, then the tab at time (24 + 1) = the tab at time 25 |
7 | the tab at time 25 = 1 | if the tab at time (24 + 1) = the tab at time 25 and the tab at time (24 + 1) = 1, then the tab at time 25 = 1 |
Comments
Please log in to add comments