src/HOL/Tools/Sledgehammer/sledgehammer_mash.ML
changeset 74927 e83e92c0bcbd
parent 73979 e5322146e7e8
child 75020 b087610592b4
equal deleted inserted replaced
74918:68a0f9a8561d 74927:e83e92c0bcbd
   193     end
   193     end
   194 
   194 
   195 fun smooth_weight_of_fact rank = Math.pow (1.3, 15.5 - 0.2 * Real.fromInt rank) + 15.0 (* FUDGE *)
   195 fun smooth_weight_of_fact rank = Math.pow (1.3, 15.5 - 0.2 * Real.fromInt rank) + 15.0 (* FUDGE *)
   196 fun steep_weight_of_fact rank = Math.pow (0.62, log2 (Real.fromInt (rank + 1))) (* FUDGE *)
   196 fun steep_weight_of_fact rank = Math.pow (0.62, log2 (Real.fromInt (rank + 1))) (* FUDGE *)
   197 
   197 
   198 fun weight_facts_smoothly facts = facts ~~ map smooth_weight_of_fact (0 upto length facts - 1)
   198 fun weight_facts_smoothly facts = map_index (swap o apfst smooth_weight_of_fact) facts
   199 fun weight_facts_steeply facts = facts ~~ map steep_weight_of_fact (0 upto length facts - 1)
   199 fun weight_facts_steeply facts = map_index (swap o apfst steep_weight_of_fact) facts
   200 
   200 
   201 fun sort_array_suffix cmp needed a =
   201 fun sort_array_suffix cmp needed a =
   202   let
   202   let
   203     exception BOTTOM of int
   203     exception BOTTOM of int
   204 
   204