let p_prim f ts = 
    if not (simpl()) then Prel(f,ts) else
      match f , ts with
        | L_eq  , [a;b] when TERM.equal a b -> Ptrue
        | L_neq , [a;b] when TERM.equal a b -> Pfalse
        | L_eq  , [Tint x;Tint y] -> i_compare (fun r -> r=0)  x y
        | L_neq , [Tint x;Tint y] -> i_compare (fun r -> r<>0) x y
        | I_lt  , [Tint x;Tint y] -> i_compare (fun r -> r<0)  x y
        | I_leq  , [Tint x;Tint y] -> i_compare (fun r -> r<=0) x y
        | B_true , [t] -> p_bool t
        | B_false , [t] -> p_not (p_bool t)
        | _ -> Prel(f,ts)