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