let p_let x a p = if p_hasvar [x] p then Plet(x,a,p) else p