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