Looking for the logical equation from this PMOS circuit
Since you have connected gate of the PMOS to \$U_b\$, this voltage should be negative for the current to flow. It seems to me some kind of a ratioed logic, so I believe whenever the lower transistors are OFF we will get a logical one.
This happens for:
$$f = a + bc$$