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