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