Proof: Addi Insn 7

Let's prove the following theorem:

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

then value of cell 5 at time 8 = 14

Proof:

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

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

Comments

Please log in to add comments