anchor.diff:                  let hlits = disjuncts tm
                   let! flits = Choice.List.map (fol_of_literal [] lconsts) hlits
                   let basics = mk_contraposes 0 (Choice.result th) [] flits []
  -                if forall (fun (p, _) -> p < 0) flits then 
  +                if forall (fun (p, _) -> p < 0) flits then
                       return ((map mk_negated flits, (1, [])), (-1, Choice.result th)) :: basics
  -                else 
  +                else
                       return basics
               }
   
  -        fun thms -> 
  +        fun thms ->
               let rawrules = itlist (union' eqt << Choice.get << fol_of_hol_clause) thms []
               let prs = setify(map (fst << snd << fst) rawrules)
               let prules = map (fun t -> t, filter ((=) t << fst << snd << fst) rawrules) prs
  
positive.code:     (* Create a HOL contrapositive on demand, with a cache.                    *)
      (* ----------------------------------------------------------------------- *)
  
      let clear_contrapos_cache, make_hol_contrapos = 
          let DISJ_AC = AC DISJ_ACI
          let imp_CONV = REWR_CONV(TAUT(parse_term @"a \/ b <=> ~b ==> a"))
          let push_CONV = 
              GEN_REWRITE_CONV TOP_SWEEP_CONV [TAUT (parse_term @"~(a \/ b) <=> ~a /\ ~b");
                                               TAUT (parse_term @"~(~a) <=> a")]
          let pull_CONV = 
              GEN_REWRITE_CONV DEPTH_CONV 
                  [TAUT(parse_term @"~a \/ ~b <=> ~(a /\ b)")]
  
  
negative.code:     (* The rules are partitioned into association lists.                       *)
      (* ----------------------------------------------------------------------- *)
  
      let fol_of_hol_clauses =
          let eqt (a1, (b1, c1)) (a2, (b2, c2)) =
              ((a1 = a2) && (b1 = b2) && (equals_thm c1 c2))
  
          let mk_negated(p, a) = -p, a
  
          let rec mk_contraposes n th used unused sofar =
              match unused with
              | [] -> sofar
              | h :: t ->
                  let nw = (map mk_negated (used @ t), h), (n, th)
                  mk_contraposes (n + 1) th (used @ [h]) t (nw :: sofar)
  
          let fol_of_hol_clause th =
              choice {
                  let! th = th
                  let lconsts = freesl <| hyp th
  