let p_let x v p = match val_of p with | Ptrue | Pfalse| Papp ("dummy",_) -> p | _ -> if p_has_var [x] p then Plet(x,v,p) else p