13 signature NOMINAL_THMDECLS = |
13 signature NOMINAL_THMDECLS = |
14 sig |
14 sig |
15 val print_data: Proof.context -> unit |
15 val print_data: Proof.context -> unit |
16 val eqvt_add: attribute |
16 val eqvt_add: attribute |
17 val eqvt_del: attribute |
17 val eqvt_del: attribute |
|
18 val eqvt_force_add: attribute |
|
19 val eqvt_force_del: attribute |
18 val setup: theory -> theory |
20 val setup: theory -> theory |
19 val get_eqvt_thms: theory -> thm list |
21 val get_eqvt_thms: theory -> thm list |
20 val get_fresh_thms: theory -> thm list |
22 val get_fresh_thms: theory -> thm list |
21 val get_bij_thms: theory -> thm list |
23 val get_bij_thms: theory -> thm list |
22 |
24 |
203 fun fresh_map f th (r:Data.T) = {eqvts = #eqvts r, freshs = (f th (#freshs r)), bijs = #bijs r}; |
205 fun fresh_map f th (r:Data.T) = {eqvts = #eqvts r, freshs = (f th (#freshs r)), bijs = #bijs r}; |
204 fun bij_map f th (r:Data.T) = {eqvts = #eqvts r, freshs = #freshs r, bijs = (f th (#bijs r))}; |
206 fun bij_map f th (r:Data.T) = {eqvts = #eqvts r, freshs = #freshs r, bijs = (f th (#bijs r))}; |
205 |
207 |
206 val eqvt_add = Thm.declaration_attribute (eqvt_add_del_aux (eqvt_map Drule.add_rule)); |
208 val eqvt_add = Thm.declaration_attribute (eqvt_add_del_aux (eqvt_map Drule.add_rule)); |
207 val eqvt_del = Thm.declaration_attribute (eqvt_add_del_aux (eqvt_map Drule.del_rule)); |
209 val eqvt_del = Thm.declaration_attribute (eqvt_add_del_aux (eqvt_map Drule.del_rule)); |
|
210 val eqvt_force_add = Thm.declaration_attribute (eqvt_force_add_del_aux (eqvt_map Drule.add_rule)); |
|
211 val eqvt_force_del = Thm.declaration_attribute (eqvt_force_add_del_aux (eqvt_map Drule.del_rule)); |
|
212 |
208 val bij_add = Thm.declaration_attribute (bij_add_del_aux (bij_map Drule.add_rule)); |
213 val bij_add = Thm.declaration_attribute (bij_add_del_aux (bij_map Drule.add_rule)); |
209 val bij_del = Thm.declaration_attribute (bij_add_del_aux (bij_map Drule.del_rule)); |
214 val bij_del = Thm.declaration_attribute (bij_add_del_aux (bij_map Drule.del_rule)); |
210 val fresh_add = Thm.declaration_attribute (fresh_add_del_aux (fresh_map Drule.add_rule)); |
215 val fresh_add = Thm.declaration_attribute (fresh_add_del_aux (fresh_map Drule.add_rule)); |
211 val fresh_del = Thm.declaration_attribute (fresh_add_del_aux (fresh_map Drule.del_rule)); |
216 val fresh_del = Thm.declaration_attribute (fresh_add_del_aux (fresh_map Drule.del_rule)); |
212 |
217 |
213 val eqvt_force_add = Thm.declaration_attribute (eqvt_force_add_del_aux (eqvt_map Drule.add_rule)); |
218 |
214 val eqvt_force_del = Thm.declaration_attribute (eqvt_force_add_del_aux (eqvt_map Drule.del_rule)); |
|
215 |
219 |
216 val setup = |
220 val setup = |
217 Data.init #> |
221 Data.init #> |
218 Attrib.add_attributes |
222 Attrib.add_attributes |
219 [("eqvt", Attrib.add_del_args eqvt_add eqvt_del, "equivariance theorem declaration"), |
223 [("eqvt", Attrib.add_del_args eqvt_add eqvt_del, "equivariance theorem declaration"), |
220 ("eqvt_force", Attrib.add_del_args eqvt_force_add eqvt_force_del,"equivariance theorem declaration (without checking the form of the lemma)"), |
224 ("eqvt_force", Attrib.add_del_args eqvt_force_add eqvt_force_del, |
|
225 "equivariance theorem declaration (without checking the form of the lemma)"), |
221 ("fresh", Attrib.add_del_args fresh_add fresh_del, "freshness theorem declaration"), |
226 ("fresh", Attrib.add_del_args fresh_add fresh_del, "freshness theorem declaration"), |
222 ("bij", Attrib.add_del_args bij_add bij_del, "bijection theorem declaration")]; |
227 ("bij", Attrib.add_del_args bij_add bij_del, "bijection theorem declaration")]; |
223 |
228 |
224 end; |
229 end; |
225 |
230 |