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