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