Proof: Add One
Let's prove the following theorem:
sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (empty list)
Proof:
# | Claim | Reason |
---|---|---|
1 | sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) | sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) |
2 | sum of bit 0 bit 0 and bit 0 = 0 | sum of bit 0 bit 0 and bit 0 = 0 |
3 | list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) | if sum of bit 0 bit 0 and bit 0 = 0, then list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) |
4 | sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) | if sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) and list (sum of bit 0 bit 0 and bit 0) and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)), then sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) |
5 | carry on sum of bit 0 bit 0 and 0 = 0 | carry on sum of bit 0 bit 0 and 0 = 0 |
6 | sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0) = sum of (empty list) (empty list) and carry bit 0 | if carry on sum of bit 0 bit 0 and 0 = 0, then sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0) = sum of (empty list) (empty list) and carry bit 0 |
7 | list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit 0) | if sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0) = sum of (empty list) (empty list) and carry bit 0, then list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit 0) |
8 | sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit 0) | if sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) and list 0 and (sum of (empty list) (empty list) and carry bit (carry on sum of bit 0 bit 0 and 0)) = list 0 and (sum of (empty list) (empty list) and carry bit 0), then sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit 0) |
9 | sum of (empty list) (empty list) and carry bit 0 = empty list | sum of (empty list) (empty list) and carry bit 0 = empty list |
10 | list 0 and (sum of (empty list) (empty list) and carry bit 0) = list 0 and (empty list) | if sum of (empty list) (empty list) and carry bit 0 = empty list, then list 0 and (sum of (empty list) (empty list) and carry bit 0) = list 0 and (empty list) |
11 | sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (empty list) | if sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (sum of (empty list) (empty list) and carry bit 0) and list 0 and (sum of (empty list) (empty list) and carry bit 0) = list 0 and (empty list), then sum of (list 0 and (empty list)) (list 0 and (empty list)) and carry bit 0 = list 0 and (empty list) |
Comments
Please log in to add comments