Proof: Addi Insn 22

Let's prove the following theorem:

if the following are true:
  • instruction #22 is addi dst=1 src=1 imm=3
  • the PC at time 22 = 22
  • value of cell 1 at time 22 = 123

then value of cell 1 at time 23 = 126

Proof:

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

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

Comments

Please log in to add comments