Proof: Addi Insn 10

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

then value of cell 6 at time 11 = 14

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 10 = 3
3 value of cell 6 at time 10 = 13
Proof Table
# Claim Reason
1 value of cell 6 at time (10 + 1) = (value of cell 6 at time 10) + 1 if instruction #3 is addi dst=6 src=6 imm=1 and the PC at time 10 = 3, then value of cell 6 at time (10 + 1) = (value of cell 6 at time 10) + 1
2 10 + 1 = 11 10 + 1 = 11
3 value of cell 6 at time (10 + 1) = value of cell 6 at time 11 if 10 + 1 = 11, then value of cell 6 at time (10 + 1) = value of cell 6 at time 11
4 value of cell 6 at time 11 = (value of cell 6 at time 10) + 1 if value of cell 6 at time (10 + 1) = value of cell 6 at time 11 and value of cell 6 at time (10 + 1) = (value of cell 6 at time 10) + 1, then value of cell 6 at time 11 = (value of cell 6 at time 10) + 1
5 value of cell 6 at time 11 = 13 + 1 if value of cell 6 at time 11 = (value of cell 6 at time 10) + 1 and value of cell 6 at time 10 = 13, then value of cell 6 at time 11 = 13 + 1
6 13 + 1 = 14 13 + 1 = 14
7 value of cell 6 at time 11 = 14 if value of cell 6 at time 11 = 13 + 1 and 13 + 1 = 14, then value of cell 6 at time 11 = 14

Comments

Please log in to add comments