equal
deleted
inserted
replaced
40 (* the implicational case it is also checked that the variables and permutation fit *) |
40 (* the implicational case it is also checked that the variables and permutation fit *) |
41 (* together, i.e. are of the right "pt_class", so that a stronger version of the *) |
41 (* together, i.e. are of the right "pt_class", so that a stronger version of the *) |
42 (* equality-lemma can be derived. *) |
42 (* equality-lemma can be derived. *) |
43 exception EQVT_FORM of string |
43 exception EQVT_FORM of string |
44 |
44 |
45 val (nominal_eqvt_debug, setup_nominal_eqvt_debug) = |
45 val nominal_eqvt_debug = Attrib.setup_config_bool @{binding nominal_eqvt_debug} (K false); |
46 Attrib.config_bool "nominal_eqvt_debug" (K false); |
|
47 |
46 |
48 fun tactic ctxt (msg, tac) = |
47 fun tactic ctxt (msg, tac) = |
49 if Config.get ctxt nominal_eqvt_debug |
48 if Config.get ctxt nominal_eqvt_debug |
50 then tac THEN' (K (print_tac ("after " ^ msg))) |
49 then tac THEN' (K (print_tac ("after " ^ msg))) |
51 else tac |
50 else tac |
168 val eqvt_force_del = Thm.declaration_attribute (Data.map o Thm.del_thm); |
167 val eqvt_force_del = Thm.declaration_attribute (Data.map o Thm.del_thm); |
169 |
168 |
170 val get_eqvt_thms = Context.Proof #> Data.get; |
169 val get_eqvt_thms = Context.Proof #> Data.get; |
171 |
170 |
172 val setup = |
171 val setup = |
173 setup_nominal_eqvt_debug #> |
|
174 Attrib.setup @{binding eqvt} (Attrib.add_del eqvt_add eqvt_del) |
172 Attrib.setup @{binding eqvt} (Attrib.add_del eqvt_add eqvt_del) |
175 "equivariance theorem declaration" #> |
173 "equivariance theorem declaration" #> |
176 Attrib.setup @{binding eqvt_force} (Attrib.add_del eqvt_force_add eqvt_force_del) |
174 Attrib.setup @{binding eqvt_force} (Attrib.add_del eqvt_force_add eqvt_force_del) |
177 "equivariance theorem declaration (without checking the form of the lemma)" #> |
175 "equivariance theorem declaration (without checking the form of the lemma)" #> |
178 Global_Theory.add_thms_dynamic (@{binding eqvts}, Data.get); |
176 Global_Theory.add_thms_dynamic (@{binding eqvts}, Data.get); |