Proof: Byte 13 Stays the Same Store 15
Let's prove the following theorem:
if the following are true:
- instruction #1 is
store src=7 addr=6 imm=0
- the PC at time 15 = 1
- value of cell 13 at time 15 = 31
- value of cell 6 at time 15 = 14
then value of cell 13 at time 16 = 31
Proof:
Given
1 | instruction #1 is store src=7 addr=6 imm=0 |
---|---|
2 | the PC at time 15 = 1 |
3 | value of cell 13 at time 15 = 31 |
4 | value of cell 6 at time 15 = 14 |
# | Claim | Reason |
---|---|---|
1 | (value of cell 6 at time 15) + 0 = 14 + 0 | if value of cell 6 at time 15 = 14, then (value of cell 6 at time 15) + 0 = 14 + 0 |
2 | 14 + 0 = 14 | 14 + 0 = 14 |
3 | (value of cell 6 at time 15) + 0 = 14 | if (value of cell 6 at time 15) + 0 = 14 + 0 and 14 + 0 = 14, then (value of cell 6 at time 15) + 0 = 14 |
4 | 13 = (value of cell 6 at time 15) + 0 = 13 = 14 | if (value of cell 6 at time 15) + 0 = 14, then 13 = (value of cell 6 at time 15) + 0 = 13 = 14 |
5 | not (13 = (value of cell 6 at time 15) + 0) = not (13 = 14) | if 13 = (value of cell 6 at time 15) + 0 = 13 = 14, then not (13 = (value of cell 6 at time 15) + 0) = not (13 = 14) |
6 | not (13 = 14) | not (13 = 14) |
7 | not (13 = (value of cell 6 at time 15) + 0) | if not (13 = 14) and not (13 = (value of cell 6 at time 15) + 0) = not (13 = 14), then not (13 = (value of cell 6 at time 15) + 0) |
8 | value of cell 13 at time (15 + 1) = value of cell 13 at time 15 | if instruction #1 is store src=7 addr=6 imm=0 and the PC at time 15 = 1 and not (13 = (value of cell 6 at time 15) + 0), then value of cell 13 at time (15 + 1) = value of cell 13 at time 15 |
9 | 15 + 1 = 16 | 15 + 1 = 16 |
10 | value of cell 13 at time (15 + 1) = value of cell 13 at time 16 | if 15 + 1 = 16, then value of cell 13 at time (15 + 1) = value of cell 13 at time 16 |
11 | value of cell 13 at time 16 = value of cell 13 at time 15 | if value of cell 13 at time (15 + 1) = value of cell 13 at time 16 and value of cell 13 at time (15 + 1) = value of cell 13 at time 15, then value of cell 13 at time 16 = value of cell 13 at time 15 |
12 | value of cell 13 at time 16 = 31 | if value of cell 13 at time 16 = value of cell 13 at time 15 and value of cell 13 at time 15 = 31, then value of cell 13 at time 16 = 31 |
Comments
Please log in to add comments