Proof: Byte 125 Stays the Same 12
Let's prove the following theorem:
if the following are true:
- subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 18
- the PC at time 12 = 18
- value of cell 125 at time 12 = 2
then value of cell 125 at time 13 = 2
Proof:
Given
1 | subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 18 |
---|---|
2 | the PC at time 12 = 18 |
3 | value of cell 125 at time 12 = 2 |
# | Claim | Reason |
---|---|---|
1 | not (125 = 1) | not (125 = 1) |
2 | value of cell 125 at time (12 + 1) = value of cell 125 at time 12 | if subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 18 and the PC at time 12 = 18 and not (125 = 1), then value of cell 125 at time (12 + 1) = value of cell 125 at time 12 |
3 | 12 + 1 = 13 | 12 + 1 = 13 |
4 | value of cell 125 at time (12 + 1) = value of cell 125 at time 13 | if 12 + 1 = 13, then value of cell 125 at time (12 + 1) = value of cell 125 at time 13 |
5 | value of cell 125 at time 13 = value of cell 125 at time 12 | if value of cell 125 at time (12 + 1) = value of cell 125 at time 13 and value of cell 125 at time (12 + 1) = value of cell 125 at time 12, then value of cell 125 at time 13 = value of cell 125 at time 12 |
6 | value of cell 125 at time 13 = 2 | if value of cell 125 at time 13 = value of cell 125 at time 12 and value of cell 125 at time 12 = 2, then value of cell 125 at time 13 = 2 |
Comments
Please log in to add comments