Proof: Get Begin Expr State 14

Let's prove the following theorem:

if the following are true:
  • the expression at time 14 = "Smith"
  • expression state at time 14 = "begin_expr"
  • "Smith" is constant
  • parent stack at time 14 = [ Person("John", "Smith", 25), [ ] ]

then expression state at time 15 = "return"

Proof:

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

Given
1 the expression at time 14 = "Smith"
2 expression state at time 14 = "begin_expr"
3 "Smith" is constant
4 parent stack at time 14 = [ Person("John", "Smith", 25), [ ] ]
Proof Table
# Claim Reason
1 expression state at time (14 + 1) = "return" if expression state at time 14 = "begin_expr" and the expression at time 14 = "Smith" and "Smith" is constant and parent stack at time 14 = [ Person("John", "Smith", 25), [ ] ], then expression state at time (14 + 1) = "return"
2 14 + 1 = 15 14 + 1 = 15
3 expression state at time (14 + 1) = expression state at time 15 if 14 + 1 = 15, then expression state at time (14 + 1) = expression state at time 15
4 expression state at time 15 = "return" if expression state at time (14 + 1) = expression state at time 15 and expression state at time (14 + 1) = "return", then expression state at time 15 = "return"

Comments

Please log in to add comments