Proof: Write Skip Line Tab 9
Let's prove the following theorem:
if the following are true:
- the line at time 9 = 9
- the tab at time 9 = 1
- statement at line 9, tab 2 =
self.y = 5
then the tab at time 10 = 1
Proof:
Given
1 | the line at time 9 = 9 |
---|---|
2 | the tab at time 9 = 1 |
3 | statement at line 9, tab 2 = self.y = 5 |
# | Claim | Reason |
---|---|---|
1 | 2 > 1 | 2 > 1 |
2 | the tab at time (9 + 1) = the tab at time 9 | if the line at time 9 = 9 and the tab at time 9 = 1 and statement at line 9, tab 2 = self.y = 5 and 2 > 1, then the tab at time (9 + 1) = the tab at time 9 |
3 | the tab at time (9 + 1) = 1 | if the tab at time (9 + 1) = the tab at time 9 and the tab at time 9 = 1, then the tab at time (9 + 1) = 1 |
4 | 9 + 1 = 10 | 9 + 1 = 10 |
5 | the tab at time (9 + 1) = the tab at time 10 | if 9 + 1 = 10, then the tab at time (9 + 1) = the tab at time 10 |
6 | the tab at time 10 = 1 | if the tab at time (9 + 1) = the tab at time 10 and the tab at time (9 + 1) = 1, then the tab at time 10 = 1 |
Comments
Please log in to add comments