32 val dest_coeff = dest_coeff 1 |
32 val dest_coeff = dest_coeff 1 |
33 val trans_tac = trans_tac |
33 val trans_tac = trans_tac |
34 val norm_tac = |
34 val norm_tac = |
35 ALLGOALS (simp_tac (HOL_ss addsimps real_minus_from_mult_simps @ mult_1s)) |
35 ALLGOALS (simp_tac (HOL_ss addsimps real_minus_from_mult_simps @ mult_1s)) |
36 THEN ALLGOALS (simp_tac (HOL_ss addsimps bin_simps@real_mult_minus_simps)) |
36 THEN ALLGOALS (simp_tac (HOL_ss addsimps bin_simps@real_mult_minus_simps)) |
37 THEN ALLGOALS (simp_tac (HOL_ss addsimps real_mult_ac)) |
37 THEN ALLGOALS (simp_tac (HOL_ss addsimps mult_ac)) |
38 val numeral_simp_tac = |
38 val numeral_simp_tac = |
39 ALLGOALS (simp_tac (HOL_ss addsimps rel_real_number_of@bin_simps)) |
39 ALLGOALS (simp_tac (HOL_ss addsimps rel_real_number_of@bin_simps)) |
40 val simplify_meta_eq = simplify_meta_eq |
40 val simplify_meta_eq = simplify_meta_eq |
41 end |
41 end |
42 |
42 |
153 val dest_sum = dest_prod |
153 val dest_sum = dest_prod |
154 val mk_coeff = mk_coeff |
154 val mk_coeff = mk_coeff |
155 val dest_coeff = dest_coeff |
155 val dest_coeff = dest_coeff |
156 val find_first = find_first [] |
156 val find_first = find_first [] |
157 val trans_tac = trans_tac |
157 val trans_tac = trans_tac |
158 val norm_tac = ALLGOALS (simp_tac (HOL_ss addsimps mult_1s@real_mult_ac)) |
158 val norm_tac = ALLGOALS (simp_tac (HOL_ss addsimps mult_1s@mult_ac)) |
159 end; |
159 end; |
160 |
160 |
161 structure EqCancelFactor = ExtractCommonTermFun |
161 structure EqCancelFactor = ExtractCommonTermFun |
162 (open CancelFactorCommon |
162 (open CancelFactorCommon |
163 val prove_conv = Bin_Simprocs.prove_conv |
163 val prove_conv = Bin_Simprocs.prove_conv |
208 *) |
208 *) |
209 |
209 |
210 (****Augmentation of real linear arithmetic with |
210 (****Augmentation of real linear arithmetic with |
211 rational coefficient handling****) |
211 rational coefficient handling****) |
212 |
212 |
213 val divide_1 = thm"divide_1"; |
|
214 |
|
215 val times_divide_eq_left = thm"times_divide_eq_left"; |
|
216 val times_divide_eq_right = thm"times_divide_eq_right"; |
|
217 |
|
218 local |
213 local |
219 |
214 |
220 (* reduce contradictory <= to False *) |
215 (* reduce contradictory <= to False *) |
221 val simps = [True_implies_equals, |
216 val simps = [True_implies_equals, |
222 inst "w" "number_of ?v" real_add_mult_distrib2, |
217 inst "a" "(number_of ?v)::real" right_distrib, |
223 divide_1,times_divide_eq_right,times_divide_eq_left]; |
218 divide_1,times_divide_eq_right,times_divide_eq_left]; |
224 |
219 |
225 val simprocs = [real_cancel_numeral_factors_divide, |
220 val simprocs = [real_cancel_numeral_factors_divide, |
226 real_cancel_numeral_factors_divide]; |
221 real_cancel_numeral_factors_divide]; |
227 |
222 |
228 fun cvar(th,_ $ (_ $ _ $ var)) = cterm_of (#sign(rep_thm th)) var; |
223 fun cvar(th,_ $ (_ $ _ $ var)) = cterm_of (#sign(rep_thm th)) var; |
229 |
224 |
230 val real_mult_mono_thms = |
225 val real_mult_mono_thms = |
231 [(rotate_prems 1 real_mult_less_mono2, |
226 [(rotate_prems 1 real_mult_less_mono2, |
232 cvar(real_mult_less_mono2, hd(prems_of real_mult_less_mono2))), |
227 cvar(real_mult_less_mono2, hd(prems_of real_mult_less_mono2))), |
233 (real_mult_le_mono2, |
228 (real_mult_left_mono, |
234 cvar(real_mult_le_mono2, hd(tl(prems_of real_mult_le_mono2))))] |
229 cvar(real_mult_left_mono, hd(tl(prems_of real_mult_left_mono))))] |
235 |
230 |
236 in |
231 in |
237 |
232 |
238 val real_arith_setup = |
233 val real_arith_setup = |
239 [Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, simpset} => |
234 [Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, simpset} => |