It looks like you simplified p(AB|B) as p(A), but in fact p(AB|B)=p(ABB)/p(B)=p(AB)/p(B)=p(A|B). (I made a similar mistake earlier.)
I get p(A|B) + p(B|B) - p(AB|B) - p(A) - p(B) + p(AB) + p(A|B) + p(~B|B) - p(A~B|B) - p(A) - p(~B) + p(A~B)
= p(A|B) + 1 - p(A|B) - p(A) - p(B) + p(AB) + p(A|B) + 0 − 0 - p(A) − 1 + p(B) + p(A~B)
= - p(A) - p(B) + p(AB) + p(A|B) - p(A) + p(B) + p(A~B)
= - p(A) + p(AB) + p(A|B) - p(A) + p(A~B)
= p(A|B) −2p(A) +p(AB) + p(A~B)
= p(A|B) −2p(A) + p(A)
= p(A|B) - p(A)
But this is quod erat demonstrandum.
Okay. Yay, a use for the retract button where it’s still good to have the text visible!
It looks like you simplified p(AB|B) as p(A), but in fact p(AB|B)=p(ABB)/p(B)=p(AB)/p(B)=p(A|B). (I made a similar mistake earlier.)
I get p(A|B) + p(B|B) - p(AB|B) - p(A) - p(B) + p(AB) + p(A|B) + p(~B|B) - p(A~B|B) - p(A) - p(~B) + p(A~B)
= p(A|B) + 1 - p(A|B) - p(A) - p(B) + p(AB) + p(A|B) + 0 − 0 - p(A) − 1 + p(B) + p(A~B)
= - p(A) - p(B) + p(AB) + p(A|B) - p(A) + p(B) + p(A~B)
= - p(A) + p(AB) + p(A|B) - p(A) + p(A~B)
= p(A|B) −2p(A) +p(AB) + p(A~B)
= p(A|B) −2p(A) + p(A)
= p(A|B) - p(A)
But this is quod erat demonstrandum.
Okay. Yay, a use for the retract button where it’s still good to have the text visible!