Proof: Prove Find Method Line 58
Let's prove the following theorem:
if Class Map at time 58 = [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ], then line number of method "age_in_months" of class "Person" in (Class Map at time 58) = 6
Proof:
Given
1 | Class Map at time 58 = [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] |
---|
# | Claim | Reason |
---|---|---|
1 | definition of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] | definition of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] |
2 | value at "line" in map [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] = 6 | value at "line" in map [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] = 6 |
3 | line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = 6 | if definition of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] and value at "line" in map [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ] = 6, then line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = 6 |
4 | line number of method "age_in_months" of class "Person" in (Class Map at time 58) = line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] | if Class Map at time 58 = [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ], then line number of method "age_in_months" of class "Person" in (Class Map at time 58) = line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] |
5 | line number of method "age_in_months" of class "Person" in (Class Map at time 58) = 6 | if line number of method "age_in_months" of class "Person" in (Class Map at time 58) = line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] and line number of method "age_in_months" of class "Person" in [ entry "Person": [ entry "bases": [ ], [ entry "methods": [ entry "__init__": [ entry "params": [ self, [ first_name, [ last_name, [ age, [ ] ] ] ] ], [ entry "line": 2, [ ] ] ], [ entry "age_in_months": [ entry "params": [ self, [ ] ], [ entry "line": 6, [ ] ] ], [ ] ] ], [ entry "line": 1, [ ] ] ] ], [ ] ] = 6, then line number of method "age_in_months" of class "Person" in (Class Map at time 58) = 6 |
Comments
Please log in to add comments