(* ========================================================================== *)
(* FLYSPECK - BOOK FORMALIZATION                                              *)
(*                                                                            *)
(* Chapter: Nonlinear                                                  *)
(* Author: Thomas C. Hales                                                    *)
(* Date: 2012-06-15                                                           *)
(* ========================================================================== *)


(* Oct 2012. thales.
This looks like junk.  Can it be deleted?
*)

Functional_equation.functional_overload();;



module Ineq_cell23 = struct
  open Sphere;;
  open Ineq;;
end;;

let newcases = ["QZECFIC wt1";
 "QZECFIC wt2";
 "GRKIBMP";
 "RQWUDDU";
 "TEWNSCJ";
 "TXQTPVC";
 "PEMKWKU";
 "FHBVYXZv2 a";
 "GLFVCVK4 2477216213 y4supercrit";
 "GLFVCVK4 2477216213 y4crit";
 "GLFVCVK4 2477216213 y4subcrit";
 "QITNPEAv2 4003532128"];;


let execute_interval bool = 
  let cases = [ 
 "GRKIBMP";
 ] in
  map (fun t -> try (Auto_lib.testsplit bool t) with Failure _ -> [()]) cases;;

type_of `dih4_x_div_sqrtdelta_posbranch`;;
Auto_lib.testsplit true "GRKIBMP";;
execute_interval true;;

let idq = hd (Ineq.getexact "GLFVCVK4 2477216213 y4crit");;
  let splits = Optimize.preprocess_split_idq idq;;
 (fun (s,tags,testineq) -> Auto_lib.execute_interval true tags s testineq) (List.nth splits 7);;
let testsplit_idq ex idq = 
  let splits = Optimize.preprocess_split_idq idq in
    map (fun (s,tags,testineq) -> execute_interval ex tags s testineq) splits;;

cfsqp newcases;;

one_cfsqp "QZECFIC wt1";;
one_cfsqp "QZECFIC wt2";;
one_cfsqp "GRKIBMP";;
one_cfsqp "RQWUDDU";;
one_cfsqp "TEWNSCJ";;
one_cfsqp "TXQTPVC";;
one_cfsqp "PEMKWKU";;
one_cfsqp "FHBVYXZv2 a";;
one_cfsqp "GLFVCVK4 2477216213 y4supercrit";;
one_cfsqp "GLFVCVK4 2477216213 y4crit";;
one_cfsqp "GLFVCVK4 2477216213 y4subcrit";;
one_cfsqp "QITNPEAv2 4003532128";;