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