anchor.diff:  
       /// Introduces an assumption.
       let ASSUME tm = 
  -        if compare (Choice.get <| type_of tm) bool_ty = 0 then Choice.succeed <| Sequent([tm], tm)
  -        else Choice.failwith "ASSUME: not a proposition"
  +        type_of tm 
  +        |> Choice.bind (fun ty ->
  +            if compare ty bool_ty = 0 then Choice.succeed <| Sequent([tm], tm)
  +            else Choice.failwith "ASSUME: not a proposition")
       
       /// Equality version of the Modus Ponens rule.
       let EQ_MP thm1 thm2 =
  
positive.code:                     |> Choice.bind (fun tm -> safe_mk_eq (Comb(P, r)) tm
                                                |> Choice.map (fun tm' -> Sequent([], tm')))
          | Error _ ->
              tuple (Choice2Of2 <| Exception "new_basic_type_definition: Erroneous theorem")
  
  (* ------------------------------------------------------------------------- *)
  (* Stuff that didn't seem worth putting in.                                  *)
  
negative.code:     let MK_COMB(thm1, thm2) =
          let MK_COMB(Sequent(asl1, c1), Sequent(asl2, c2)) = 
              match (c1, c2) with
              | Comb(Comb(Const("=", _), l1), r1), Comb(Comb(Const("=", _), l2), r2) ->
                  match type_of l1, type_of l2 with
                  | Success ty1, Success ty2 -> 
                      match ty1 with
                      | Tyapp("fun", [ty; _]) when compare ty ty2 = 0 -> 
                          safe_mk_eq (Comb(l1, l2)) (Comb(r1, r2))
                          |> Choice.map (fun tm -> Sequent(term_union asl1 asl2, tm))
                      | _ -> Choice.failwith "MK_COMB: types do not agree"
                  | _ -> Choice.failwith "MK_COMB: not both equations"
              | _ -> Choice.failwith "MK_COMB: not both equations"
          Choice.bind2 (curry MK_COMB) thm1 thm2
      
  