Proof: Addi Zero Insn 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

then value of cell 5 at time 4 = 4

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

Comments

Please log in to add comments