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