Proof: Byte 9 Stays the Same 19
Let's prove the following theorem:
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 19 = 5
- value of cell 9 at time 19 = 31
then value of cell 9 at time 20 = 31
Proof:
Given
1 | instruction #5 is beq left=3 right=4 imm=1 |
---|---|
2 | the PC at time 19 = 5 |
3 | value of cell 9 at time 19 = 31 |
# | Claim | Reason |
---|---|---|
1 | value of cell 9 at time (19 + 1) = value of cell 9 at time 19 | if instruction #5 is beq left=3 right=4 imm=1 and the PC at time 19 = 5, then value of cell 9 at time (19 + 1) = value of cell 9 at time 19 |
2 | 19 + 1 = 20 | 19 + 1 = 20 |
3 | value of cell 9 at time (19 + 1) = value of cell 9 at time 20 | if 19 + 1 = 20, then value of cell 9 at time (19 + 1) = value of cell 9 at time 20 |
4 | value of cell 9 at time 20 = value of cell 9 at time 19 | if value of cell 9 at time (19 + 1) = value of cell 9 at time 20 and value of cell 9 at time (19 + 1) = value of cell 9 at time 19, then value of cell 9 at time 20 = value of cell 9 at time 19 |
5 | value of cell 9 at time 20 = 31 | if value of cell 9 at time 20 = value of cell 9 at time 19 and value of cell 9 at time 19 = 31, then value of cell 9 at time 20 = 31 |
Comments
Please log in to add comments