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