45 val fresh_gs_meth_debug : Method.src -> Proof.context -> Proof.method |
45 val fresh_gs_meth_debug : Method.src -> Proof.context -> Proof.method |
46 end |
46 end |
47 |
47 |
48 structure NominalPermeq : NOMINAL_PERMEQ = |
48 structure NominalPermeq : NOMINAL_PERMEQ = |
49 struct |
49 struct |
|
50 |
|
51 val Finites_emptyI = thm "Finites.emptyI"; |
|
52 val finite_Un = thm "finite_Un"; |
50 |
53 |
51 (* pulls out dynamically a thm via the proof state *) |
54 (* pulls out dynamically a thm via the proof state *) |
52 fun dynamic_thms st name = PureThy.get_thms (theory_of_thm st) (Name name); |
55 fun dynamic_thms st name = PureThy.get_thms (theory_of_thm st) (Name name); |
53 fun dynamic_thm st name = PureThy.get_thm (theory_of_thm st) (Name name); |
56 fun dynamic_thm st name = PureThy.get_thm (theory_of_thm st) (Name name); |
54 |
57 |
276 val supports_rule' = Thm.lift_rule goal supports_rule; |
279 val supports_rule' = Thm.lift_rule goal supports_rule; |
277 val _ $ (_ $ S $ _) = |
280 val _ $ (_ $ S $ _) = |
278 Logic.strip_assums_concl (hd (prems_of supports_rule')); |
281 Logic.strip_assums_concl (hd (prems_of supports_rule')); |
279 val supports_rule'' = Drule.cterm_instantiate |
282 val supports_rule'' = Drule.cterm_instantiate |
280 [(cert (head_of S), cert s')] supports_rule' |
283 [(cert (head_of S), cert s')] supports_rule' |
281 val ss' = ss addsimps [supp_prod, supp_unit, finite_Un, Finites.emptyI] |
284 val ss' = ss addsimps [supp_prod, supp_unit, finite_Un, Finites_emptyI] |
282 in |
285 in |
283 (tactical ("guessing of the right supports-set", |
286 (tactical ("guessing of the right supports-set", |
284 EVERY [compose_tac (false, supports_rule'', 2) i, |
287 EVERY [compose_tac (false, supports_rule'', 2) i, |
285 asm_full_simp_tac ss' (i+1), |
288 asm_full_simp_tac ss' (i+1), |
286 supports_tac tactical ss i])) st |
289 supports_tac tactical ss i])) st |
314 val _ $ (_ $ S $ _) = |
317 val _ $ (_ $ S $ _) = |
315 Logic.strip_assums_concl (hd (prems_of supports_fresh_rule')); |
318 Logic.strip_assums_concl (hd (prems_of supports_fresh_rule')); |
316 val supports_fresh_rule'' = Drule.cterm_instantiate |
319 val supports_fresh_rule'' = Drule.cterm_instantiate |
317 [(cert (head_of S), cert s')] supports_fresh_rule' |
320 [(cert (head_of S), cert s')] supports_fresh_rule' |
318 val ss1 = ss addsimps [symmetric fresh_def,fresh_prod,fresh_unit] |
321 val ss1 = ss addsimps [symmetric fresh_def,fresh_prod,fresh_unit] |
319 val ss2 = ss addsimps [supp_prod,supp_unit,finite_Un,Finites.emptyI] |
322 val ss2 = ss addsimps [supp_prod,supp_unit,finite_Un,Finites_emptyI] |
320 (* FIXME sometimes these rewrite rules are already in the ss, *) |
323 (* FIXME sometimes these rewrite rules are already in the ss, *) |
321 (* which produces a warning *) |
324 (* which produces a warning *) |
322 in |
325 in |
323 (tactical ("guessing of the right set that supports the goal", |
326 (tactical ("guessing of the right set that supports the goal", |
324 EVERY [compose_tac (false, supports_fresh_rule'', 3) i, |
327 EVERY [compose_tac (false, supports_fresh_rule'', 3) i, |