Proof: Pc 17
Let's prove the following theorem:
if the following are true:
- instruction #3 is
addi dst=6 src=6 imm=1 - the PC at time 17 = 3
then the PC at time 18 = 4
Proof:
Given
| 1 | instruction #3 is addi dst=6 src=6 imm=1 |
|---|---|
| 2 | the PC at time 17 = 3 |
| # | Claim | Reason |
|---|---|---|
| 1 | the PC at time (17 + 1) = 3 + 1 | if instruction #3 is addi dst=6 src=6 imm=1 and the PC at time 17 = 3, then the PC at time (17 + 1) = 3 + 1 |
| 2 | 17 + 1 = 18 | 17 + 1 = 18 |
| 3 | 3 + 1 = 4 | 3 + 1 = 4 |
| 4 | the PC at time (17 + 1) = the PC at time 18 | if 17 + 1 = 18, then the PC at time (17 + 1) = the PC at time 18 |
| 5 | the PC at time 18 = 4 | if the PC at time (17 + 1) = 3 + 1 and the PC at time (17 + 1) = the PC at time 18 and 3 + 1 = 4, then the PC at time 18 = 4 |
Comments
Please log in to add comments