anchor.diff:                         :qid __prelude_valid_elim)))\n"
      in
      basic
  +   ^ bcons
      ^ lex_ordering
  -   ^ bcons
      ^ (if FStar.Options.smtencoding_valid_intro()
         then valid_intro
         else "")
  
positive.code:                                  (fst boxIntFun,     [snd boxIntFun,  Int_sort, true],   Term_sort, 7, true);
                                   (fst boxBoolFun,    [snd boxBoolFun, Bool_sort, true],  Term_sort, 8, true);
                                   (fst boxStringFun,  [snd boxStringFun, String_sort, true], Term_sort, 9, true);
                                   (fst boxRealFun,    [snd boxRealFun, Sort "Real", true], Term_sort, 10, true)]
  in
     let lex_ordering =
       "(assert (forall ((t1 Term) (t2 Term) (s1 Term) (s2 Term) (a Term) (b Term))\n\
                        (! (implies (and (HasType a t1)\n\
                                         (HasType a s1)\n\
                                         (HasType b t2)\n\
                                         (HasType b s2)\n\
                                         (Valid (Prims.precedes t1 t2 a b)))\n\
                                    (Valid (Prims.precedes s1 s2 a b)))\n\
                           :pattern ((Prims.precedes s1 s2 a b)\n\
                                     (HasType a t1)\n\
                                     (HasType b t2)))))\n" in
     let bcons = constrs |> List.collect (constructor_to_decl norng)
                         |> List.map (declToSmt z3options) |> String.concat "\n" in
     let valid_intro =
       "(assert (forall ((e Term) (t Term))\n\
                        (! (implies (HasType e t)\n\
  
negative.code: let kick_partial_app t  = mk_ApplyTT (mkApp("__uu__PartialApp", []) t.rng) t t.rng |> mk_Valid
  let mk_String_const s r = mkApp ("FString_const", [mk (String s) r]) r
  let mk_Precedes x1 x2 x3 x4 r = mkApp("Prims.precedes", [x1;x2;x3;x4])  r|> mk_Valid
  let mk_LexCons x1 x2 x3 r  = mkApp("LexCons", [x1;x2;x3]) r
  let rec n_fuel n =
      if n = 0 then mkApp("ZFuel", []) norng
      else mkApp("SFuel", [n_fuel (n - 1)]) norng
  