28 |
28 |
29 val fast_hypreal_arith_simproc = |
29 val fast_hypreal_arith_simproc = |
30 Simplifier.simproc (the_context ()) |
30 Simplifier.simproc (the_context ()) |
31 "fast_hypreal_arith" |
31 "fast_hypreal_arith" |
32 ["(m::hypreal) < n", "(m::hypreal) <= n", "(m::hypreal) = n"] |
32 ["(m::hypreal) < n", "(m::hypreal) <= n", "(m::hypreal) = n"] |
33 Fast_Arith.lin_arith_prover; |
33 (K Fast_Arith.lin_arith_simproc); |
34 |
34 |
35 val hypreal_arith_setup = |
35 val hypreal_arith_setup = |
36 Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, neqE, simpset} => |
36 Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, neqE, simpset} => |
37 {add_mono_thms = add_mono_thms, |
37 {add_mono_thms = add_mono_thms, |
38 mult_mono_thms = mult_mono_thms, |
38 mult_mono_thms = mult_mono_thms, |
39 inj_thms = real_inj_thms @ inj_thms, |
39 inj_thms = real_inj_thms @ inj_thms, |
40 lessD = lessD, (*Can't change LA_Data_Ref.lessD: the hypreals are dense!*) |
40 lessD = lessD, (*Can't change LA_Data_Ref.lessD: the hypreals are dense!*) |
41 neqE = neqE, |
41 neqE = neqE, |
42 simpset = simpset addsimps simps}) #> |
42 simpset = simpset addsimps simps}) #> |
43 arith_inj_const ("StarDef.star_of", HOLogic.realT --> hyprealT) #> |
43 arith_inj_const ("StarDef.star_of", HOLogic.realT --> hyprealT) #> |
44 (fn thy => (change_simpset_of thy (fn ss => ss addsimprocs [fast_hypreal_arith_simproc]); thy)); |
44 Simplifier.map_ss (fn ss => ss addsimprocs [fast_hypreal_arith_simproc]); |
45 |
45 |
46 end; |
46 end; |