let pnot = function
  | Ptrue -> Pfalse
  | Pfalse -> Ptrue
  | p -> Pnot p