Proof: Write Stmt Tab Unchanged Expr24
Let's prove the following theorem:
if the following are true:
- the line at time 24 = 3
- the tab at time 24 = 2
- statement at line 3, tab 2 = self."x" = 0
- expression state at time 24 = "end_expr"
then the tab at time 25 = 2
Proof:
Given
1 | the line at time 24 = 3 |
---|---|
2 | the tab at time 24 = 2 |
3 | statement at line 3, tab 2 = self."x" = 0 |
4 | expression state at time 24 = "end_expr" |
# | Claim | Reason |
---|---|---|
1 | the tab at time (24 + 1) = the tab at time 24 | if the line at time 24 = 3 and the tab at time 24 = 2 and statement at line 3, tab 2 = self."x" = 0 and expression state at time 24 = "end_expr", then the tab at time (24 + 1) = the tab at time 24 |
2 | the tab at time (24 + 1) = 2 | if the tab at time (24 + 1) = the tab at time 24 and the tab at time 24 = 2, then the tab at time (24 + 1) = 2 |
3 | 24 + 1 = 25 | 24 + 1 = 25 |
4 | 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 |
5 | the tab at time 25 = 2 | if the tab at time (24 + 1) = the tab at time 25 and the tab at time (24 + 1) = 2, then the tab at time 25 = 2 |
Comments
Please log in to add comments