Proof: Addi Insn 2

Let's prove the following theorem:

if the following are true:
  • instruction #2 is addi dst=5 src=5 imm=1
  • the PC at time 2 = 2
  • value of cell 5 at time 2 = 8

then value of cell 5 at time 3 = 9

Proof:

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

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

Comments

Please log in to add comments