Proof: Addi Insn 12

Let's prove the following theorem:

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

then value of cell 4 at time 13 = 3

Proof:

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

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

Comments

Please log in to add comments