Proof: Store 2

Let's prove the following theorem:

if the following are true:
  • instruction #2 is store src=5 addr=6 imm=2
  • the PC at time 2 = 2
  • value of cell 6 at time 2 = 7
  • value of cell 5 at time 2 = 20

then value of cell 9 at time 3 = 20

Proof:

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

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

Comments

Please log in to add comments