Proof: Byte 2 Stays the Same 10

Let's prove the following theorem:

if the following are true:
  • instruction #4 is add dst=3 src1=1 src2=2
  • the PC at time 10 = 4
  • value of cell 2 at time 10 = 1

then value of cell 2 at time 11 = 1

Instructions
Memory Cells
Program Counter Time
0 0
LW Computer Simulator

Proof:

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

Given
1 instruction #4 is add dst=3 src1=1 src2=2
2 the PC at time 10 = 4
3 value of cell 2 at time 10 = 1
Proof Table
# Claim Reason
1 not (2 = 3) not (2 = 3)
2 value of cell 2 at time (10 + 1) = value of cell 2 at time 10 if instruction #4 is add dst=3 src1=1 src2=2 and the PC at time 10 = 4 and not (2 = 3), then value of cell 2 at time (10 + 1) = value of cell 2 at time 10
3 10 + 1 = 11 10 + 1 = 11
4 value of cell 2 at time (10 + 1) = value of cell 2 at time 11 if 10 + 1 = 11, then value of cell 2 at time (10 + 1) = value of cell 2 at time 11
5 value of cell 2 at time 11 = value of cell 2 at time 10 if value of cell 2 at time (10 + 1) = value of cell 2 at time 11 and value of cell 2 at time (10 + 1) = value of cell 2 at time 10, then value of cell 2 at time 11 = value of cell 2 at time 10
6 value of cell 2 at time 11 = 1 if value of cell 2 at time 11 = value of cell 2 at time 10 and value of cell 2 at time 10 = 1, then value of cell 2 at time 11 = 1

Comments

Please log in to add comments