equal
deleted
inserted
replaced
70 val filter_substs = |
70 val filter_substs = |
71 @{thms at_left_to_top at_right_to_top at_left_to_top' at_right_to_top' at_bot_mirror} |
71 @{thms at_left_to_top at_right_to_top at_left_to_top' at_right_to_top' at_bot_mirror} |
72 val filterlim_substs = map (fn thm => thm RS @{thm filterlim_conv_filtermap}) filter_substs |
72 val filterlim_substs = map (fn thm => thm RS @{thm filterlim_conv_filtermap}) filter_substs |
73 val eventually_substs = map (fn thm => thm RS @{thm eventually_conv_filtermap}) filter_substs |
73 val eventually_substs = map (fn thm => thm RS @{thm eventually_conv_filtermap}) filter_substs |
74 |
74 |
75 fun changed_conv conv ct = |
|
76 let |
|
77 val thm = conv ct |
|
78 in |
|
79 if Thm.is_reflexive thm then raise CTERM ("changed_conv", [ct]) else thm |
|
80 end |
|
81 |
|
82 val repeat'_conv = Conv.repeat_conv o changed_conv |
|
83 |
|
84 fun preproc_exp_log_natintfun_conv ctxt = |
75 fun preproc_exp_log_natintfun_conv ctxt = |
85 let |
76 let |
86 fun reify_power_conv x _ ct = |
77 fun reify_power_conv x _ ct = |
87 let |
78 let |
88 val thm = Conv.rewr_conv @{thm reify_power} ct |
79 val thm = Conv.rewr_conv @{thm reify_power} ct |
98 Named_Theorems.get ctxt \<^named_theorems>\<open>real_asymp_nat_reify\<close> |
89 Named_Theorems.get ctxt \<^named_theorems>\<open>real_asymp_nat_reify\<close> |
99 val thms2 = |
90 val thms2 = |
100 Named_Theorems.get ctxt \<^named_theorems>\<open>real_asymp_int_reify\<close> |
91 Named_Theorems.get ctxt \<^named_theorems>\<open>real_asymp_int_reify\<close> |
101 val ctxt' = put_simpset HOL_basic_ss ctxt addsimps (thms1 @ thms2) |
92 val ctxt' = put_simpset HOL_basic_ss ctxt addsimps (thms1 @ thms2) |
102 in |
93 in |
103 repeat'_conv ( |
94 Conv.repeat_changed_conv |
104 Simplifier.rewrite ctxt' |
95 (Simplifier.rewrite ctxt' |
105 then_conv Conv.bottom_conv (Conv.try_conv o reify_power_conv (Thm.term_of x)) ctxt) |
96 then_conv Conv.bottom_conv (Conv.try_conv o reify_power_conv (Thm.term_of x)) ctxt) |
106 end |
97 end |
107 in |
98 in |
108 Thm.eta_long_conversion |
99 Thm.eta_long_conversion |
109 then_conv Conv.abs_conv conv ctxt |
100 then_conv Conv.abs_conv conv ctxt |