Proof: Byte 3 Stays the Same 3

Let's prove the following theorem:

if the following are true:
  • subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 9
  • the PC at time 3 = 9
  • value of cell 3 at time 3 = 2

then value of cell 3 at time 4 = 2

Proof:

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

Given
1 subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 9
2 the PC at time 3 = 9
3 value of cell 3 at time 3 = 2
Proof Table
# Claim Reason
1 not (3 = 1) not (3 = 1)
2 value of cell 3 at time (3 + 1) = value of cell 3 at time 3 if subtract immediate instruction with dst: 1 src: 1 and immediate: 1 at 9 and the PC at time 3 = 9 and not (3 = 1), then value of cell 3 at time (3 + 1) = value of cell 3 at time 3
3 3 + 1 = 4 3 + 1 = 4
4 value of cell 3 at time (3 + 1) = value of cell 3 at time 4 if 3 + 1 = 4, then value of cell 3 at time (3 + 1) = value of cell 3 at time 4
5 value of cell 3 at time 4 = value of cell 3 at time 3 if value of cell 3 at time (3 + 1) = value of cell 3 at time 4 and value of cell 3 at time (3 + 1) = value of cell 3 at time 3, then value of cell 3 at time 4 = value of cell 3 at time 3
6 value of cell 3 at time 4 = 2 if value of cell 3 at time 4 = value of cell 3 at time 3 and value of cell 3 at time 3 = 2, then value of cell 3 at time 4 = 2

Comments

Please log in to add comments