src/HOL/Nominal/nominal_inductive.ML
changeset 26337 44473c957672
parent 25824 f56dd9745d1b
child 26343 0dd2eab7b296
equal deleted inserted replaced
26336:a0e2b706ce73 26337:44473c957672
   271         (mk_distinct bvars @
   271         (mk_distinct bvars @
   272          maps (fn (t, T) => map (fn (u, U) => HOLogic.mk_Trueprop
   272          maps (fn (t, T) => map (fn (u, U) => HOLogic.mk_Trueprop
   273            (NominalPackage.fresh_const U T $ u $ t)) bvars)
   273            (NominalPackage.fresh_const U T $ u $ t)) bvars)
   274              (ts ~~ binder_types (fastype_of p)))) prems;
   274              (ts ~~ binder_types (fastype_of p)))) prems;
   275 
   275 
   276     val perm_pi_simp = PureThy.get_thms thy (Name "perm_pi_simp");
   276     val perm_pi_simp = dynamic_thms thy "perm_pi_simp";
   277     val pt2_atoms = map (fn aT => PureThy.get_thm thy
   277     val pt2_atoms = map (fn aT => dynamic_thm thy
   278       (Name ("pt_" ^ Sign.base_name (fst (dest_Type aT)) ^ "2"))) atomTs;
   278       ("pt_" ^ Sign.base_name (fst (dest_Type aT)) ^ "2")) atomTs;
   279     val eqvt_ss = HOL_basic_ss addsimps (eqvt_thms @ perm_pi_simp @ pt2_atoms)
   279     val eqvt_ss = HOL_basic_ss addsimps (eqvt_thms @ perm_pi_simp @ pt2_atoms)
   280       addsimprocs [mk_perm_bool_simproc ["Fun.id"]];
   280       addsimprocs [mk_perm_bool_simproc ["Fun.id"]];
   281     val fresh_bij = PureThy.get_thms thy (Name "fresh_bij");
   281     val fresh_bij = dynamic_thms thy "fresh_bij";
   282     val perm_bij = PureThy.get_thms thy (Name "perm_bij");
   282     val perm_bij = dynamic_thms thy "perm_bij";
   283     val fs_atoms = map (fn aT => PureThy.get_thm thy
   283     val fs_atoms = map (fn aT => dynamic_thm thy
   284       (Name ("fs_" ^ Sign.base_name (fst (dest_Type aT)) ^ "1"))) atomTs;
   284       ("fs_" ^ Sign.base_name (fst (dest_Type aT)) ^ "1")) atomTs;
   285     val exists_fresh' = PureThy.get_thms thy (Name "exists_fresh'");
   285     val exists_fresh' = dynamic_thms thy "exists_fresh'";
   286     val fresh_atm = PureThy.get_thms thy (Name "fresh_atm");
   286     val fresh_atm = dynamic_thms thy "fresh_atm";
   287     val calc_atm = PureThy.get_thms thy (Name "calc_atm");
   287     val calc_atm = dynamic_thms thy "calc_atm";
   288     val perm_fresh_fresh = PureThy.get_thms thy (Name "perm_fresh_fresh");
   288     val perm_fresh_fresh = dynamic_thms thy "perm_fresh_fresh";
   289 
   289 
   290     fun obtain_fresh_name ts T (freshs1, freshs2, ctxt) =
   290     fun obtain_fresh_name ts T (freshs1, freshs2, ctxt) =
   291       let
   291       let
   292         (** protect terms to avoid that supp_prod interferes with   **)
   292         (** protect terms to avoid that supp_prod interferes with   **)
   293         (** pairs used in introduction rules of inductive predicate **)
   293         (** pairs used in introduction rules of inductive predicate **)
   602          case atoms \\ atoms' of
   602          case atoms \\ atoms' of
   603              [] => ()
   603              [] => ()
   604            | xs => error ("No such atoms: " ^ commas xs);
   604            | xs => error ("No such atoms: " ^ commas xs);
   605          atoms)
   605          atoms)
   606       end;
   606       end;
   607     val perm_pi_simp = PureThy.get_thms thy (Name "perm_pi_simp");
   607     val perm_pi_simp = dynamic_thms thy "perm_pi_simp";
   608     val eqvt_ss = HOL_basic_ss addsimps
   608     val eqvt_ss = HOL_basic_ss addsimps
   609       (NominalThmDecls.get_eqvt_thms ctxt @ perm_pi_simp) addsimprocs
   609       (NominalThmDecls.get_eqvt_thms ctxt @ perm_pi_simp) addsimprocs
   610       [mk_perm_bool_simproc names];
   610       [mk_perm_bool_simproc names];
   611     val t = Logic.unvarify (concl_of raw_induct);
   611     val t = Logic.unvarify (concl_of raw_induct);
   612     val pi = Name.variant (add_term_names (t, [])) "pi";
   612     val pi = Name.variant (add_term_names (t, [])) "pi";