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