Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Node case:
- P(t1), P(t2) ==> P(Node t1 t2)
- (N t1) < 2^(H t1), (N t2) < 2^(H t2) ==> (N (Node t1 t2)) < 2^(H (Node t1 t2))
- (N t1) < 2^(H t1), (N t2) < 2^(H t2) ==> (N t1) + (N t2) + 1 < 2^(1 + (max (H t1) (H t2)))
- (N t1) + (N t2) + 1
- { hypothesis P(t1) }
- < 2^(H t1) + (N t2) + 1
- { hypothesis P(t2) }
- < 2^(H t1) + 2^(H t2) + 1
- { definition of < on integers }
- <= 2^(H t1) + 2^(H t2)
- { a < max a b }
- <= 2^(max (H t1) (H t2)) + 2^(max (H t1) (H t2))
- { arithmetic }
- = 2 * 2^(max (H t1) (H t2))
- { exponentiation }
- = 2^(1 + (max (H t1) (H t2)))
- so this chain proves: (N t1) + (N t2) + 1 < 2^(1 + (max (H t1) (H t2)))
Add Comment
Please, Sign In to add comment