Error in my theorem

It seems that there is an error in proof of this theorem.

Alleged counter-example:

$f=\bot$ and $z(p)=\top$ for infinite sets $A$ and $B$.

I am now attempting to locate the error in the proof.