Proof: Get Begin Expr Params 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"
- arguments stack at time 3 = [ [ entry "MX": "Mexico", [ ] ], [ ] ]
then arguments stack at time 4 = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ]
Proof:
Given
1 | expression state at time 3 = "begin_expr" |
---|---|
2 | the expression at time 3 = entry "ES": "Estonia" |
3 | arguments stack at time 3 = [ [ entry "MX": "Mexico", [ ] ], [ ] ] |
# | Claim | Reason |
---|---|---|
1 | arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] | if expression state at time 3 = "begin_expr" and the expression at time 3 = entry "ES": "Estonia", then arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] |
2 | [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] | if arguments stack at time 3 = [ [ entry "MX": "Mexico", [ ] ], [ ] ], then [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] |
3 | arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] | if arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] and [ [ "ES", [ "Estonia", [ ] ] ], arguments stack at time 3 ] = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ], then arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] |
4 | 3 + 1 = 4 | 3 + 1 = 4 |
5 | arguments stack at time (3 + 1) = arguments stack at time 4 | if 3 + 1 = 4, then arguments stack at time (3 + 1) = arguments stack at time 4 |
6 | arguments stack at time 4 = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] | if arguments stack at time (3 + 1) = arguments stack at time 4 and arguments stack at time (3 + 1) = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ], then arguments stack at time 4 = [ [ "ES", [ "Estonia", [ ] ] ], [ [ entry "MX": "Mexico", [ ] ], [ ] ] ] |
Comments
Please log in to add comments