Proof: Addi Insn 3

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 3 = 3
  • value of cell 6 at time 3 = 12

then value of cell 6 at time 4 = 13

Proof:

View as a tree | View dependent proofs | Try proving it

Given
1 instruction #3 is addi dst=6 src=6 imm=1
2 the PC at time 3 = 3
3 value of cell 6 at time 3 = 12
Proof Table
# Claim Reason
1 value of cell 6 at time (3 + 1) = (value of cell 6 at time 3) + 1 if instruction #3 is addi dst=6 src=6 imm=1 and the PC at time 3 = 3, then value of cell 6 at time (3 + 1) = (value of cell 6 at time 3) + 1
2 3 + 1 = 4 3 + 1 = 4
3 value of cell 6 at time (3 + 1) = value of cell 6 at time 4 if 3 + 1 = 4, then value of cell 6 at time (3 + 1) = value of cell 6 at time 4
4 value of cell 6 at time 4 = (value of cell 6 at time 3) + 1 if value of cell 6 at time (3 + 1) = value of cell 6 at time 4 and value of cell 6 at time (3 + 1) = (value of cell 6 at time 3) + 1, then value of cell 6 at time 4 = (value of cell 6 at time 3) + 1
5 value of cell 6 at time 4 = 12 + 1 if value of cell 6 at time 4 = (value of cell 6 at time 3) + 1 and value of cell 6 at time 3 = 12, then value of cell 6 at time 4 = 12 + 1
6 12 + 1 = 13 12 + 1 = 13
7 value of cell 6 at time 4 = 13 if value of cell 6 at time 4 = 12 + 1 and 12 + 1 = 13, then value of cell 6 at time 4 = 13

Comments

Please log in to add comments