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