To do this you have a live rail and a switched live rail, and two SPST each end: one switch SL hot or not; the other to break its connection to the light. Open the latter for 'off', close both for 'on', close break & open SL for 'don't care'. (Then in the 'don't care' state, SL is hot iff switched on the other end, and if so is also closed through to the light.)
Not legal, not (that I can imagine) desirable!
Proving it is actually simple if you continue your Boolean line of thought: you can't build XOR without an inverter; an SPST switch is only a sort of 'half inverter', a mux between '0' and its input. Since it can never give you '1' from '0' input, you need a schematic for your XOR where each constituent truth table in isolation has '0' out for its '0;0' in line. Which can't be done, because clearly then you could never get '0;0=>1' overall.
- parallel is or
- series is and
We can see that a 2 way switch is xor (or xnor depending on the setup).
So now, for 3 way it feels like you have to beyond 2 state (on-off) switches... i don't have a proof of impossibility that 2 state switches cannot do 3 way switching, but in practice they indeed involve more states (multi-throw etc.)