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