Proof: Get Begin Expr State 36
Let's prove the following theorem:
if the following are true:
- the expression at time 36 = "Spain"
- expression state at time 36 = "begin_expr"
- "Spain" is constant
- parent stack at time 36 = [
__setitem__(locations, "ES", "Spain")
, [ ] ]
then expression state at time 37 = "return"
Proof:
Given
1 | the expression at time 36 = "Spain" |
---|---|
2 | expression state at time 36 = "begin_expr" |
3 | "Spain" is constant |
4 | parent stack at time 36 = [ __setitem__(locations, "ES", "Spain") , [ ] ] |
# | Claim | Reason |
---|---|---|
1 | expression state at time (36 + 1) = "return" | if expression state at time 36 = "begin_expr" and the expression at time 36 = "Spain" and "Spain" is constant and parent stack at time 36 = [ __setitem__(locations, "ES", "Spain") , [ ] ], then expression state at time (36 + 1) = "return" |
2 | 36 + 1 = 37 | 36 + 1 = 37 |
3 | expression state at time (36 + 1) = expression state at time 37 | if 36 + 1 = 37, then expression state at time (36 + 1) = expression state at time 37 |
4 | expression state at time 37 = "return" | if expression state at time (36 + 1) = expression state at time 37 and expression state at time (36 + 1) = "return", then expression state at time 37 = "return" |
Comments
Please log in to add comments