14 add_simps : (binding -> binding) -> string -> (binding -> binding) -> |
14 add_simps : (binding -> binding) -> string -> (binding -> binding) -> |
15 Attrib.src list -> thm list -> local_theory -> thm list * local_theory, |
15 Attrib.src list -> thm list -> local_theory -> thm list * local_theory, |
16 case_names : string list, |
16 case_names : string list, |
17 fs : term list, |
17 fs : term list, |
18 R : term, |
18 R : term, |
|
19 dom: term, |
19 psimps: thm list, |
20 psimps: thm list, |
20 pinducts: thm list, |
21 pinducts: thm list, |
21 simps : thm list option, |
22 simps : thm list option, |
22 inducts : thm list option, |
23 inducts : thm list option, |
23 termination : thm, |
24 termination : thm, |
35 add_simps : (binding -> binding) -> string -> (binding -> binding) -> |
36 add_simps : (binding -> binding) -> string -> (binding -> binding) -> |
36 Attrib.src list -> thm list -> local_theory -> thm list * local_theory, |
37 Attrib.src list -> thm list -> local_theory -> thm list * local_theory, |
37 case_names : string list, |
38 case_names : string list, |
38 fs : term list, |
39 fs : term list, |
39 R : term, |
40 R : term, |
|
41 dom: term, |
40 psimps: thm list, |
42 psimps: thm list, |
41 pinducts: thm list, |
43 pinducts: thm list, |
42 simps : thm list option, |
44 simps : thm list option, |
43 inducts : thm list option, |
45 inducts : thm list option, |
44 termination : thm, |
46 termination : thm, |
138 |
141 |
139 datatype function_result = FunctionResult of |
142 datatype function_result = FunctionResult of |
140 {fs: term list, |
143 {fs: term list, |
141 G: term, |
144 G: term, |
142 R: term, |
145 R: term, |
|
146 dom: term, |
143 psimps : thm list, |
147 psimps : thm list, |
144 simple_pinducts : thm list, |
148 simple_pinducts : thm list, |
145 cases : thm, |
149 cases : thm, |
146 termination : thm, |
150 termination : thm, |
147 domintros : thm list option} |
151 domintros : thm list option} |
148 |
152 |
149 fun transform_function_data ({add_simps, case_names, fs, R, psimps, pinducts, |
153 fun transform_function_data ({add_simps, case_names, fs, R, dom, psimps, pinducts, |
150 simps, inducts, termination, defname, is_partial, cases} : info) phi = |
154 simps, inducts, termination, defname, is_partial, cases} : info) phi = |
151 let |
155 let |
152 val term = Morphism.term phi |
156 val term = Morphism.term phi |
153 val thm = Morphism.thm phi |
157 val thm = Morphism.thm phi |
154 val fact = Morphism.fact phi |
158 val fact = Morphism.fact phi |
155 val name = Binding.name_of o Morphism.binding phi o Binding.name |
159 val name = Binding.name_of o Morphism.binding phi o Binding.name |
156 in |
160 in |
157 { add_simps = add_simps, case_names = case_names, |
161 { add_simps = add_simps, case_names = case_names, |
158 fs = map term fs, R = term R, psimps = fact psimps, |
162 fs = map term fs, R = term R, dom = term dom, psimps = fact psimps, |
159 pinducts = fact pinducts, simps = Option.map fact simps, |
163 pinducts = fact pinducts, simps = Option.map fact simps, |
160 inducts = Option.map fact inducts, termination = thm termination, |
164 inducts = Option.map fact inducts, termination = thm termination, |
161 defname = name defname, is_partial=is_partial, cases = thm cases } |
165 defname = name defname, is_partial=is_partial, cases = thm cases } |
162 end |
166 end |
163 |
167 |