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