Proof: Set Attribute Begin Parent Property Example

Let's prove the following theorem:

if the following are true:
  • expression state at time 27 = "begin_expr"
  • the expression at time 27 = self."first_name" = first_name
  • parent stack at time 27 = [ ]

then parent stack at time 28 = [ self."first_name" = first_name, [ ] ]

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Proof:

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

Given
1 expression state at time 27 = "begin_expr"
2 the expression at time 27 = self."first_name" = first_name
3 parent stack at time 27 = [ ]
Proof Table
# Claim Reason
1 parent stack at time (27 + 1) = [ self."first_name" = first_name, parent stack at time 27 ] if expression state at time 27 = "begin_expr" and the expression at time 27 = self."first_name" = first_name, then parent stack at time (27 + 1) = [ self."first_name" = first_name, parent stack at time 27 ]
2 [ self."first_name" = first_name, parent stack at time 27 ] = [ self."first_name" = first_name, [ ] ] if parent stack at time 27 = [ ], then [ self."first_name" = first_name, parent stack at time 27 ] = [ self."first_name" = first_name, [ ] ]
3 parent stack at time (27 + 1) = [ self."first_name" = first_name, [ ] ] if parent stack at time (27 + 1) = [ self."first_name" = first_name, parent stack at time 27 ] and [ self."first_name" = first_name, parent stack at time 27 ] = [ self."first_name" = first_name, [ ] ], then parent stack at time (27 + 1) = [ self."first_name" = first_name, [ ] ]
4 27 + 1 = 28 27 + 1 = 28
5 parent stack at time (27 + 1) = parent stack at time 28 if 27 + 1 = 28, then parent stack at time (27 + 1) = parent stack at time 28
6 parent stack at time 28 = [ self."first_name" = first_name, [ ] ] if parent stack at time (27 + 1) = parent stack at time 28 and parent stack at time (27 + 1) = [ self."first_name" = first_name, [ ] ], then parent stack at time 28 = [ self."first_name" = first_name, [ ] ]

Comments

Please log in to add comments