let tnot t =
  match t with
      TTrue -> TFalse
    | TFalse -> TTrue
    | TNot t -> t
    | TRel(rel,t1,t2) -> TRel(opposite_rel rel, t1, t2)
    | _ -> TNot t