anchor.diff:                              (tts goal.context goal.goal_ty))
       )))
   
  +// returns pre and post
  +let lemma_or_sq (c : comp) : option<(term * term)> =
  +    let ct = U.comp_to_comp_typ_nouniv c in
  +    if lid_equals ct.effect_name PC.effect_Lemma_lid then
  +        let pre, post = match ct.effect_args with
  +                        | pre::post::_ -> fst pre, fst post
  +                        | _ -> failwith "apply_lemma: impossible: not a lemma"
  +        in
  +        // Lemma post is thunked, and is specialized to U_zero
  +        let post = U.mk_app post [S.as_arg U.exp_unit] in
  +        Some (pre, post)
  +    else if U.is_pure_effect ct.effect_name then
  +        map_opt (U.un_squash ct.result_typ) (fun post -> (U.t_true, post))
  +    else
  +        None
  +
   let apply_lemma (tm:term) : tac<unit> = wrap_err "apply_lemma" <| focus (
       mlog (fun () -> BU.print1 "apply_lemma: tm = %s\n" (Print.term_to_string tm)) (fun _ ->
       let is_unit_t t = match (SS.compress t).n with
  
positive.code: let tacprint2 (s:string) x y   = BU.print1 "TAC>> %s\n" (BU.format2 s x y)
  let tacprint3 (s:string) x y z = BU.print1 "TAC>> %s\n" (BU.format3 s x y z)
  
  (* TODO: If I define this as *)
  (*     (U.comp_to_comp_typ c).result_typ *)
  (*     then I get  *)
  (*     Unexpected error; please file a bug report, ideally with a minimized version of the source program that triggered the error. *)
  (*     Assertion failed: Computation type without universe *)
  let comp_to_typ (c:comp) : typ =
      match c.n with
      | Total (t, _)
  
negative.code:        bs
      in
      let uvs = List.rev uvs in
      let pre  = SS.subst subst pre in
      let post = SS.subst subst post in
      bind (do_unify goal.context (U.mk_squash U_zero post) goal.goal_ty) (fun b ->
      if not b
      then fail3 "Cannot instantiate lemma %s (with postcondition: %s) to match goal (%s)"
  