Proof: Get Begin Expr State 55

Let's prove the following theorem:

if the following are true:
  • the expression at time 55 = 5
  • expression state at time 55 = "begin_expr"
  • 5 is constant
  • parent stack at time 55 = [ __add__(self.x, 5), [ self."x" = __add__(self.x, 5), [ ] ] ]

then expression state at time 56 = "return"

Proof:

View as a tree | View dependent proofs | Try proving it

Given
1 the expression at time 55 = 5
2 expression state at time 55 = "begin_expr"
3 5 is constant
4 parent stack at time 55 = [ __add__(self.x, 5), [ self."x" = __add__(self.x, 5), [ ] ] ]
Proof Table
# Claim Reason
1 expression state at time (55 + 1) = "return" if expression state at time 55 = "begin_expr" and the expression at time 55 = 5 and 5 is constant and parent stack at time 55 = [ __add__(self.x, 5), [ self."x" = __add__(self.x, 5), [ ] ] ], then expression state at time (55 + 1) = "return"
2 55 + 1 = 56 55 + 1 = 56
3 expression state at time (55 + 1) = expression state at time 56 if 55 + 1 = 56, then expression state at time (55 + 1) = expression state at time 56
4 expression state at time 56 = "return" if expression state at time (55 + 1) = expression state at time 56 and expression state at time (55 + 1) = "return", then expression state at time 56 = "return"

Comments

Please log in to add comments