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