src/Provers/Arith/fast_lin_arith.ML
changeset 24112 6c4e7d17f9b0
parent 24076 ae946f751c44
child 24630 351a308ab58d
equal deleted inserted replaced
24111:20e74aa5f56b 24112:6c4e7d17f9b0
    60   val pre_tac: Proof.context -> int -> tactic
    60   val pre_tac: Proof.context -> int -> tactic
    61   val number_of: IntInf.int * typ -> term
    61   val number_of: IntInf.int * typ -> term
    62 
    62 
    63   (*the limit on the number of ~= allowed; because each ~= is split
    63   (*the limit on the number of ~= allowed; because each ~= is split
    64     into two cases, this can lead to an explosion*)
    64     into two cases, this can lead to an explosion*)
    65   val fast_arith_neq_limit: int ConfigOption.T
    65   val fast_arith_neq_limit: int Config.T
    66 end;
    66 end;
    67 (*
    67 (*
    68 decomp(`x Rel y') should yield (p,i,Rel,q,j,d)
    68 decomp(`x Rel y') should yield (p,i,Rel,q,j,d)
    69    where Rel is one of "<", "~<", "<=", "~<=" and "=" and
    69    where Rel is one of "<", "~<", "<=", "~<=" and "=" and
    70          p (q, respectively) is the decomposition of the sum term x
    70          p (q, respectively) is the decomposition of the sum term x
   713     (* 'DETERM (resolve_tac [LA_Logic.notI, LA_Logic.ccontr] i)' at the *)
   713     (* 'DETERM (resolve_tac [LA_Logic.notI, LA_Logic.ccontr] i)' at the *)
   714     (* theorem/tactic level                                             *)
   714     (* theorem/tactic level                                             *)
   715     val Hs' = Hs @ [LA_Logic.neg_prop concl]
   715     val Hs' = Hs @ [LA_Logic.neg_prop concl]
   716     fun is_neq NONE                 = false
   716     fun is_neq NONE                 = false
   717       | is_neq (SOME (_,_,r,_,_,_)) = (r = "~=")
   717       | is_neq (SOME (_,_,r,_,_,_)) = (r = "~=")
   718     val neq_limit = ConfigOption.get ctxt LA_Data.fast_arith_neq_limit;
   718     val neq_limit = Config.get ctxt LA_Data.fast_arith_neq_limit;
   719   in
   719   in
   720     if count is_neq (map (LA_Data.decomp ctxt) Hs') > neq_limit then
   720     if count is_neq (map (LA_Data.decomp ctxt) Hs') > neq_limit then
   721      (trace_msg ("fast_arith_neq_limit exceeded (current value is " ^
   721      (trace_msg ("fast_arith_neq_limit exceeded (current value is " ^
   722         string_of_int neq_limit ^ ")"); NONE)
   722         string_of_int neq_limit ^ ")"); NONE)
   723     else
   723     else