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