Proof: Load 15
Let's prove the following theorem:
if the following are true:
    
    
    
    - instruction #2 is load dst=3 addr=1 imm=1
- the PC at time 15 = 2
- value of cell 1 at time 15 = 124
- value of cell 125 at time 15 = 2
then value of cell 3 at time 16 = 2
Proof:
  
      
      Given
      
    
    
      
  
  
| 1 | instruction #2 is load dst=3 addr=1 imm=1 | 
|---|---|
| 2 | the PC at time 15 = 2 | 
| 3 | value of cell 1 at time 15 = 124 | 
| 4 | value of cell 125 at time 15 = 2 | 
| # | Claim | Reason | 
|---|---|---|
| 1 | value of cell 3 at time (15 + 1) = value of cell ((value of cell 1 at time 15) + 1) at time 15 | if instruction #2 is load dst=3 addr=1 imm=1and the PC at time 15 = 2, then value of cell 3 at time (15 + 1) = value of cell ((value of cell 1 at time 15) + 1) at time 15 | 
| 2 | (value of cell 1 at time 15) + 1 = 124 + 1 | if value of cell 1 at time 15 = 124, then (value of cell 1 at time 15) + 1 = 124 + 1 | 
| 3 | 124 + 1 = 125 | 124 + 1 = 125 | 
| 4 | (value of cell 1 at time 15) + 1 = 125 | if (value of cell 1 at time 15) + 1 = 124 + 1 and 124 + 1 = 125, then (value of cell 1 at time 15) + 1 = 125 | 
| 5 | value of cell ((value of cell 1 at time 15) + 1) at time 15 = value of cell 125 at time 15 | if (value of cell 1 at time 15) + 1 = 125, then value of cell ((value of cell 1 at time 15) + 1) at time 15 = value of cell 125 at time 15 | 
| 6 | value of cell ((value of cell 1 at time 15) + 1) at time 15 = 2 | if value of cell ((value of cell 1 at time 15) + 1) at time 15 = value of cell 125 at time 15 and value of cell 125 at time 15 = 2, then value of cell ((value of cell 1 at time 15) + 1) at time 15 = 2 | 
| 7 | value of cell 3 at time (15 + 1) = 2 | if value of cell 3 at time (15 + 1) = value of cell ((value of cell 1 at time 15) + 1) at time 15 and value of cell ((value of cell 1 at time 15) + 1) at time 15 = 2, then value of cell 3 at time (15 + 1) = 2 | 
| 8 | 15 + 1 = 16 | 15 + 1 = 16 | 
| 9 | value of cell 3 at time (15 + 1) = value of cell 3 at time 16 | if 15 + 1 = 16, then value of cell 3 at time (15 + 1) = value of cell 3 at time 16 | 
| 10 | value of cell 3 at time 16 = 2 | if value of cell 3 at time (15 + 1) = value of cell 3 at time 16 and value of cell 3 at time (15 + 1) = 2, then value of cell 3 at time 16 = 2 | 
Comments
Please log in to add comments