Proof: Write Stmt Tab Unchanged Expr33
Let's prove the following theorem:
if the following are true:
- the line at time 33 = 3
- the tab at time 33 = 2
- statement at line 3, tab 2 = self."first_name" = first_name
- expression state at time 33 = "end_expr"
then the tab at time 34 = 2
Proof:
Given
1 | the line at time 33 = 3 |
---|---|
2 | the tab at time 33 = 2 |
3 | statement at line 3, tab 2 = self."first_name" = first_name |
4 | expression state at time 33 = "end_expr" |
# | Claim | Reason |
---|---|---|
1 | the tab at time (33 + 1) = the tab at time 33 | if the line at time 33 = 3 and the tab at time 33 = 2 and statement at line 3, tab 2 = self."first_name" = first_name and expression state at time 33 = "end_expr", then the tab at time (33 + 1) = the tab at time 33 |
2 | the tab at time (33 + 1) = 2 | if the tab at time (33 + 1) = the tab at time 33 and the tab at time 33 = 2, then the tab at time (33 + 1) = 2 |
3 | 33 + 1 = 34 | 33 + 1 = 34 |
4 | the tab at time (33 + 1) = the tab at time 34 | if 33 + 1 = 34, then the tab at time (33 + 1) = the tab at time 34 |
5 | the tab at time 34 = 2 | if the tab at time (33 + 1) = the tab at time 34 and the tab at time (33 + 1) = 2, then the tab at time 34 = 2 |
Comments
Please log in to add comments