Proof: Load 16

Let's prove the following theorem:

if the following are true:
  • instruction #3 is load dst=4 addr=1 imm=0
  • the PC at time 16 = 3
  • value of cell 1 at time 16 = 124
  • value of cell 124 at time 16 = 3

then value of cell 4 at time 17 = 3

Proof:

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

Given
1 instruction #3 is load dst=4 addr=1 imm=0
2 the PC at time 16 = 3
3 value of cell 1 at time 16 = 124
4 value of cell 124 at time 16 = 3
Proof Table
# Claim Reason
1 value of cell 4 at time (16 + 1) = value of cell ((value of cell 1 at time 16) + 0) at time 16 if instruction #3 is load dst=4 addr=1 imm=0 and the PC at time 16 = 3, then value of cell 4 at time (16 + 1) = value of cell ((value of cell 1 at time 16) + 0) at time 16
2 (value of cell 1 at time 16) + 0 = 124 + 0 if value of cell 1 at time 16 = 124, then (value of cell 1 at time 16) + 0 = 124 + 0
3 124 + 0 = 124 124 + 0 = 124
4 (value of cell 1 at time 16) + 0 = 124 if (value of cell 1 at time 16) + 0 = 124 + 0 and 124 + 0 = 124, then (value of cell 1 at time 16) + 0 = 124
5 value of cell ((value of cell 1 at time 16) + 0) at time 16 = value of cell 124 at time 16 if (value of cell 1 at time 16) + 0 = 124, then value of cell ((value of cell 1 at time 16) + 0) at time 16 = value of cell 124 at time 16
6 value of cell ((value of cell 1 at time 16) + 0) at time 16 = 3 if value of cell ((value of cell 1 at time 16) + 0) at time 16 = value of cell 124 at time 16 and value of cell 124 at time 16 = 3, then value of cell ((value of cell 1 at time 16) + 0) at time 16 = 3
7 value of cell 4 at time (16 + 1) = 3 if value of cell 4 at time (16 + 1) = value of cell ((value of cell 1 at time 16) + 0) at time 16 and value of cell ((value of cell 1 at time 16) + 0) at time 16 = 3, then value of cell 4 at time (16 + 1) = 3
8 16 + 1 = 17 16 + 1 = 17
9 value of cell 4 at time (16 + 1) = value of cell 4 at time 17 if 16 + 1 = 17, then value of cell 4 at time (16 + 1) = value of cell 4 at time 17
10 value of cell 4 at time 17 = 3 if value of cell 4 at time (16 + 1) = value of cell 4 at time 17 and value of cell 4 at time (16 + 1) = 3, then value of cell 4 at time 17 = 3

Comments

Please log in to add comments