Proof: Byte 4 Stays the Same 3

Let's prove the following theorem:

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

then value of cell 4 at time 4 = 0

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

Comments

Please log in to add comments