Proof: Do Stack At Unchanged 81
Let's prove the following theorem:
if the following are true:
- expression state at time 81 = "call_returned"
- stack at time 81 = [ ]
then stack at time 82 = [ ]
Proof:
Given
1 | expression state at time 81 = "call_returned" |
---|---|
2 | stack at time 81 = [ ] |
# | Claim | Reason |
---|---|---|
1 | stack at time (81 + 1) = stack at time 81 | if expression state at time 81 = "call_returned", then stack at time (81 + 1) = stack at time 81 |
2 | stack at time (81 + 1) = [ ] | if stack at time (81 + 1) = stack at time 81 and stack at time 81 = [ ], then stack at time (81 + 1) = [ ] |
3 | 81 + 1 = 82 | 81 + 1 = 82 |
4 | stack at time (81 + 1) = stack at time 82 | if 81 + 1 = 82, then stack at time (81 + 1) = stack at time 82 |
5 | stack at time 82 = [ ] | if stack at time (81 + 1) = stack at time 82 and stack at time (81 + 1) = [ ], then stack at time 82 = [ ] |
Comments
Please log in to add comments