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