411 val q_eqvt = map (lift_thm lthy19) raw_fv_bv_eqvt; |
411 val q_eqvt = map (lift_thm lthy19) raw_fv_bv_eqvt; |
412 val (_, lthy20) = Local_Theory.note ((Binding.empty, |
412 val (_, lthy20) = Local_Theory.note ((Binding.empty, |
413 [Attrib.internal (fn _ => Nominal_ThmDecls.eqvt_add)]), q_eqvt) lthy19; |
413 [Attrib.internal (fn _ => Nominal_ThmDecls.eqvt_add)]), q_eqvt) lthy19; |
414 val supports = map (prove_supports lthy20 q_perm) consts |
414 val supports = map (prove_supports lthy20 q_perm) consts |
415 val _ = map tracing (map PolyML.makestring supports); |
415 val _ = map tracing (map PolyML.makestring supports); |
416 val fin_supp = HOLogic.conj_elims (prove_fs lthy20 q_induct supports q_tys); |
416 val fin_supp = HOLogic.conj_elims (prove_fs lthy20 q_induct supports q_tys) handle _ => [] |
417 val thy3 = Local_Theory.exit_global lthy20; |
417 val thy3 = Local_Theory.exit_global lthy20; |
418 val lthy21 = Theory_Target.instantiation (qty_full_names, [], @{sort fs}) thy3; |
418 val lthy21 = Theory_Target.instantiation (qty_full_names, [], @{sort fs}) thy3; |
419 fun tac _ = Class.intro_classes_tac [] THEN (ALLGOALS (resolve_tac fin_supp)) |
419 fun tac _ = Class.intro_classes_tac [] THEN (ALLGOALS (resolve_tac fin_supp)) |
420 val lthy22 = Class.prove_instantiation_instance tac lthy21; |
420 val lthy22 = Class.prove_instantiation_instance tac lthy21 handle _ => lthy20 |
421 in |
421 in |
422 ((raw_dt_names, raw_bn_funs, raw_bn_eqs, raw_binds), lthy22) |
422 ((raw_dt_names, raw_bn_funs, raw_bn_eqs, raw_binds), lthy22) |
423 end |
423 end |
424 *} |
424 *} |
425 |
425 |