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