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