42 struct |
42 struct |
43 val mk_coeff = mk_coeff |
43 val mk_coeff = mk_coeff |
44 val dest_coeff = dest_coeff 1 |
44 val dest_coeff = dest_coeff 1 |
45 val trans_tac = fn _ => trans_tac |
45 val trans_tac = fn _ => trans_tac |
46 fun norm_tac ss = |
46 fun norm_tac ss = |
47 let val HOL_ss' = Simplifier.inherit_bounds ss HOL_ss in |
47 let val HOL_ss' = Simplifier.inherit_context ss HOL_ss in |
48 ALLGOALS (simp_tac (HOL_ss' addsimps minus_from_mult_simps @ mult_1s)) |
48 ALLGOALS (simp_tac (HOL_ss' addsimps minus_from_mult_simps @ mult_1s)) |
49 THEN ALLGOALS (simp_tac (HOL_ss' addsimps bin_simps@mult_minus_simps)) |
49 THEN ALLGOALS (simp_tac (HOL_ss' addsimps bin_simps@mult_minus_simps)) |
50 THEN ALLGOALS (simp_tac (HOL_ss' addsimps mult_ac)) |
50 THEN ALLGOALS (simp_tac (HOL_ss' addsimps mult_ac)) |
51 end |
51 end |
52 fun numeral_simp_tac ss = |
52 fun numeral_simp_tac ss = |
53 ALLGOALS (simp_tac (Simplifier.inherit_bounds ss HOL_ss addsimps rel_number_of @ bin_simps)) |
53 ALLGOALS (simp_tac (Simplifier.inherit_context ss HOL_ss addsimps rel_number_of @ bin_simps)) |
54 val simplify_meta_eq = |
54 val simplify_meta_eq = |
55 Int_Numeral_Simprocs.simplify_meta_eq |
55 Int_Numeral_Simprocs.simplify_meta_eq |
56 [add_0, add_0_right, |
56 [add_0, add_0_right, |
57 mult_zero_left, mult_zero_right, mult_1, mult_1_right]; |
57 mult_zero_left, mult_zero_right, mult_1, mult_1_right]; |
58 end |
58 end |
249 val mk_coeff = mk_coeff |
249 val mk_coeff = mk_coeff |
250 val dest_coeff = dest_coeff |
250 val dest_coeff = dest_coeff |
251 val find_first = find_first [] |
251 val find_first = find_first [] |
252 val trans_tac = fn _ => trans_tac |
252 val trans_tac = fn _ => trans_tac |
253 fun norm_tac ss = |
253 fun norm_tac ss = |
254 ALLGOALS (simp_tac (Simplifier.inherit_bounds ss HOL_ss addsimps mult_1s @ mult_ac)) |
254 ALLGOALS (simp_tac (Simplifier.inherit_context ss HOL_ss addsimps mult_1s @ mult_ac)) |
255 end; |
255 end; |
256 |
256 |
257 (*mult_cancel_left requires an ordered comm_ring_1, such as int. The version in |
257 (*mult_cancel_left requires an ordered comm_ring_1, such as int. The version in |
258 rat_arith.ML works for all fields.*) |
258 rat_arith.ML works for all fields.*) |
259 structure EqCancelFactor = ExtractCommonTermFun |
259 structure EqCancelFactor = ExtractCommonTermFun |