anchor.diff:                          eqlist arg_eq c1.effect_args c2.effect_args &&
                           eq_flags c1.flags c2.flags
     | _, _ -> false
  -and eq_flags f1 f2 = false // TODO
  -and branch_eq (p1,w1,t1) (p2,w2,t2) = false // TODO
  +  and eq_flags f1 f2 = true // TODO? Or just ignore?
  +and branch_eq (p1,w1,t1) (p2,w2,t2) =
  +    if eq_pat p1 p2
  +    then begin
  +        term_eq t1 t2 && (match w1, w2 with
  +                          | Some x, Some y -> term_eq x y
  +                          | None, None -> true
  +                          | _ -> false)
  +    end
  +    else false
  +
  +and letbinding_eq lb1 lb2 =
  +       eqsum bv_eq fv_eq lb1.lbname lb2.lbname
  +    && lb1.lbunivs = lb2.lbunivs
  +    && term_eq lb1.lbtyp lb2.lbtyp
  +    && term_eq lb1.lbdef lb2.lbdef
  +    // Ignoring eff and attrs..
   
   let rec bottom_fold (f : term -> term) (t : term) : term =
       let ff = bottom_fold f in
  
positive.code:   | Tm_constant c1, Tm_constant c2 -> eq_const c1 c2
    | Tm_type x, Tm_type y -> x = y
    | Tm_abs (b1,t1,k1), Tm_abs (b2,t2,k2) -> eqlist binder_eq b1 b2 && term_eq t1 t2 //&& eqopt (eqsum lcomp_eq residual_eq) k1 k2
    | Tm_app (f1,a1), Tm_app (f2,a2) -> term_eq f1 f2 && eqlist arg_eq a1 a2
    | Tm_arrow (b1,c1), Tm_arrow (b2,c2) -> eqlist binder_eq b1 b2 && comp_eq c1 c2
    | Tm_refine (b1,t1), Tm_refine (b2,t2) -> bv_eq b1 b2 && term_eq t1 t2
    | Tm_match (t1,bs1), Tm_match (t2,bs2) -> term_eq t1 t2 && eqlist branch_eq bs1 bs2
    | _, _ -> false // TODO missing cases
  and arg_eq a1 a2 = eqprod term_eq (fun q1 q2 -> q1 = q2) a1 a2
  and binder_eq b1 b2 = eqprod (fun b1 b2 -> term_eq b1.sort b2.sort) (fun q1 q2 -> q1 = q2) b1 b2
  and lcomp_eq (c1:lcomp) (c2:lcomp) = false// TODO
  
negative.code:   in
    let t1 = canon_app (unmeta_safe t1) in
    let t2 = canon_app (unmeta_safe t2) in
    match (compress t1).n, (compress t2).n with
  
    | Tm_bvar x, Tm_bvar y -> x.index = y.index
    | Tm_name x, Tm_name y -> bv_eq x y
    | Tm_fvar x, Tm_fvar y -> fv_eq x y
  