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