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