Proof: Byte 3 Stays the Same 4
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 4 = 4
- value of cell 3 at time 4 = 3
then value of cell 3 at time 5 = 3
Proof:
Given
| 1 | instruction #4 is addi dst=4 src=4 imm=1 |
|---|---|
| 2 | the PC at time 4 = 4 |
| 3 | value of cell 3 at time 4 = 3 |
| # | Claim | Reason |
|---|---|---|
| 1 | not (3 = 4) | not (3 = 4) |
| 2 | value of cell 3 at time (4 + 1) = value of cell 3 at time 4 | if instruction #4 is addi dst=4 src=4 imm=1 and the PC at time 4 = 4 and not (3 = 4), then value of cell 3 at time (4 + 1) = value of cell 3 at time 4 |
| 3 | 4 + 1 = 5 | 4 + 1 = 5 |
| 4 | value of cell 3 at time (4 + 1) = value of cell 3 at time 5 | if 4 + 1 = 5, then value of cell 3 at time (4 + 1) = value of cell 3 at time 5 |
| 5 | value of cell 3 at time 5 = value of cell 3 at time 4 | if value of cell 3 at time (4 + 1) = value of cell 3 at time 5 and value of cell 3 at time (4 + 1) = value of cell 3 at time 4, then value of cell 3 at time 5 = value of cell 3 at time 4 |
| 6 | value of cell 3 at time 5 = 3 | if value of cell 3 at time 5 = value of cell 3 at time 4 and value of cell 3 at time 4 = 3, then value of cell 3 at time 5 = 3 |
Comments
Please log in to add comments