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