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