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