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