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